Files
Packer-Cn/builder/vsphere/driver/host_acc_test.go
T

23 lines
495 B
Go
Raw Normal View History

package driver
2017-10-26 01:07:25 +03:00
import (
"testing"
)
func TestHostAcc(t *testing.T) {
t.Skip("Acceptance tests not configured yet.")
d := newTestDriver(t)
host, err := d.FindHost(TestHostName)
2017-10-26 01:07:25 +03:00
if err != nil {
2017-11-08 19:47:29 +03:00
t.Fatalf("Cannot find the default host '%v': %v", "datastore1", err)
2017-10-26 01:07:25 +03:00
}
info, err := host.Info("name")
if err != nil {
t.Fatalf("Cannot read host properties: %v", err)
}
if info.Name != TestHostName {
t.Errorf("Wrong host name: expected '%v', got: '%v'", TestHostName, info.Name)
2017-10-26 01:07:25 +03:00
}
}