packer-cn/driver/datastore_acc_test.go

21 lines
461 B
Go
Raw Normal View History

package driver
import (
"testing"
)
func TestDatastoreAcc(t *testing.T) {
d := newTestDriver(t)
2018-03-20 19:03:47 -04:00
ds, err := d.FindDatastore("datastore1", "")
if err != nil {
t.Fatalf("Cannot find the default datastore '%v': %v", "datastore1", err)
}
info, err := ds.Info("name")
if err != nil {
t.Fatalf("Cannot read datastore properties: %v", err)
}
if info.Name != "datastore1" {
t.Errorf("Wrong datastore. expected: 'datastore1', got: '%v'", info.Name)
}
}