packer-cn/driver/resource_pool_acc_test.go

20 lines
473 B
Go
Raw Normal View History

package driver
import "testing"
func TestResourcePoolAcc(t *testing.T) {
d := newTestDriver(t)
2018-10-31 17:42:24 -04:00
p, err := d.FindResourcePool("", "esxi-1.vsphere65.test", "pool1/pool2")
if err != nil {
2017-11-08 11:47:29 -05:00
t.Fatalf("Cannot find the default resource pool '%v': %v", "pool1/pool2", err)
}
path, err := p.Path()
if err != nil {
t.Fatalf("Cannot read resource pool name: %v", err)
}
if path != "pool1/pool2" {
t.Errorf("Wrong folder. expected: 'pool1/pool2', got: '%v'", path)
}
}