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