Use flag instead of build tag to run integration tests

This commit is contained in:
Alexander Neumann
2015-06-05 22:33:39 +02:00
parent 7c107acf0b
commit 12677b4f8a
5 changed files with 17 additions and 12 deletions
-2
View File
@@ -1,5 +1,3 @@
// +build integration
package main
import (
+5 -3
View File
@@ -1,5 +1,3 @@
// +build integration
package main
import (
@@ -119,8 +117,12 @@ func cmdFsck(t testing.TB) {
}
func TestBackup(t *testing.T) {
if !*RunIntegrationTest {
t.Skip("integration tests disabled, use `-test.integration` to enable")
}
if *TestDataFile == "" {
t.Fatal("no data tar file specified, use flag '-test.datafile'")
t.Fatal("no data tar file specified, use flag `-test.datafile`")
}
tempdir := setupTempdir(t)