2017-11-14 00:02:46 +03:00
|
|
|
package driver
|
2017-10-26 00:51:54 +03:00
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestResourcePoolAcc(t *testing.T) {
|
2017-11-14 00:02:46 +03:00
|
|
|
d := newTestDriver(t)
|
2018-11-01 00:42:24 +03:00
|
|
|
p, err := d.FindResourcePool("", "esxi-1.vsphere65.test", "pool1/pool2")
|
2017-10-26 00:51:54 +03:00
|
|
|
if err != nil {
|
2017-11-08 19:47:29 +03:00
|
|
|
t.Fatalf("Cannot find the default resource pool '%v': %v", "pool1/pool2", err)
|
2017-10-26 00:51:54 +03:00
|
|
|
}
|
2017-11-14 00:02:46 +03:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
2017-10-26 00:51:54 +03:00
|
|
|
}
|