Remove checks of test launching parameters
This commit is contained in:
parent
8ee5ff0189
commit
6d2225f9de
|
@ -5,8 +5,6 @@ import (
|
|||
)
|
||||
|
||||
func TestDatastoreAcc(t *testing.T) {
|
||||
initDriverAcceptanceTest(t)
|
||||
|
||||
d := newTestDriver(t)
|
||||
ds, err := d.FindDatastore("datastore1", "")
|
||||
if err != nil {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -5,8 +5,6 @@ import (
|
|||
)
|
||||
|
||||
func TestHostAcc(t *testing.T) {
|
||||
initDriverAcceptanceTest(t)
|
||||
|
||||
d := newTestDriver(t)
|
||||
host, err := d.FindHost(TestHostName)
|
||||
if err != nil {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -8,8 +8,6 @@ import (
|
|||
)
|
||||
|
||||
func TestVMAcc_clone(t *testing.T) {
|
||||
initDriverAcceptanceTest(t)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
config *CloneConfig
|
||||
|
|
|
@ -6,8 +6,6 @@ import (
|
|||
)
|
||||
|
||||
func TestVMAcc_create(t *testing.T) {
|
||||
initDriverAcceptanceTest(t)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
config *CreateConfig
|
||||
|
|
Loading…
Reference in New Issue