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

View file

@ -1,5 +1,3 @@
// +build integration
package backend_test
import (
@ -37,6 +35,10 @@ func teardownSFTPBackend(t *testing.T, b *sftp.SFTP) {
}
func TestSFTPBackend(t *testing.T) {
if !*RunIntegrationTest {
t.Skip("integration tests disabled, use `-test.integration` to enable")
}
if *sftpPath == "" {
t.Skipf("sftppath not set, skipping TestSFTPBackend")
}