diff --git a/driver/datastore_acc_test.go b/driver/datastore_acc_test.go index 0b2686fe5..3b13535af 100644 --- a/driver/datastore_acc_test.go +++ b/driver/datastore_acc_test.go @@ -5,8 +5,6 @@ import ( ) func TestDatastoreAcc(t *testing.T) { - initDriverAcceptanceTest(t) - d := newTestDriver(t) ds, err := d.FindDatastore("datastore1", "") if err != nil { diff --git a/driver/driver_test.go b/driver/driver_test.go index 5a9747b3d..e46729ad4 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -1,7 +1,6 @@ package driver import ( - "os" "fmt" "testing" "time" @@ -9,7 +8,6 @@ import ( ) // Defines whether acceptance tests should be run -const TestEnvVar = "VSPHERE_DRIVER_ACC" const TestHostName = "esxi-1.vsphere65.test" func newTestDriver(t *testing.T) *Driver { @@ -29,18 +27,3 @@ func newVMName() string { rand.Seed(time.Now().UTC().UnixNano()) return fmt.Sprintf("test-%v", rand.Intn(1000)) } - -func initDriverAcceptanceTest(t *testing.T) { - // We only run acceptance tests if an env var is set because they're - // slow and require outside configuration. - if os.Getenv(TestEnvVar) == "" { - t.Skip(fmt.Sprintf( - "Acceptance tests skipped unless env '%s' set", - TestEnvVar)) - } - - // We require verbose mode so that the user knows what is going on. - if !testing.Verbose() { - t.Fatal("Acceptance tests must be run with the -v flag on tests") - } -} diff --git a/driver/folder_acc_test.go b/driver/folder_acc_test.go index 220f1195e..29d1364e0 100644 --- a/driver/folder_acc_test.go +++ b/driver/folder_acc_test.go @@ -3,8 +3,6 @@ package driver import "testing" func TestFolderAcc(t *testing.T) { - initDriverAcceptanceTest(t) - d := newTestDriver(t) f, err := d.FindFolder("folder1/folder2") if err != nil { diff --git a/driver/host_acc_test.go b/driver/host_acc_test.go index 037987bb4..765550551 100644 --- a/driver/host_acc_test.go +++ b/driver/host_acc_test.go @@ -5,8 +5,6 @@ import ( ) func TestHostAcc(t *testing.T) { - initDriverAcceptanceTest(t) - d := newTestDriver(t) host, err := d.FindHost(TestHostName) if err != nil { diff --git a/driver/resource_pool_acc_test.go b/driver/resource_pool_acc_test.go index af4cba868..3d49282b2 100644 --- a/driver/resource_pool_acc_test.go +++ b/driver/resource_pool_acc_test.go @@ -3,8 +3,6 @@ package driver import "testing" func TestResourcePoolAcc(t *testing.T) { - initDriverAcceptanceTest(t) - d := newTestDriver(t) p, err := d.FindResourcePool("","esxi-1.vsphere65.test", "pool1/pool2") if err != nil { diff --git a/driver/vm_clone_acc_test.go b/driver/vm_clone_acc_test.go index 3fb7df639..629e5f6b2 100644 --- a/driver/vm_clone_acc_test.go +++ b/driver/vm_clone_acc_test.go @@ -8,8 +8,6 @@ import ( ) func TestVMAcc_clone(t *testing.T) { - initDriverAcceptanceTest(t) - testCases := []struct { name string config *CloneConfig diff --git a/driver/vm_create_acc_test.go b/driver/vm_create_acc_test.go index cc8dcb051..5b53dbcca 100644 --- a/driver/vm_create_acc_test.go +++ b/driver/vm_create_acc_test.go @@ -6,8 +6,6 @@ import ( ) func TestVMAcc_create(t *testing.T) { - initDriverAcceptanceTest(t) - testCases := []struct { name string config *CreateConfig