func TestGetStorageVolumes(t *testing.T) { var ( c *ov.OVClient ) if os.Getenv("ONEVIEW_TEST_ACCEPTANCE") == "true" { _, c = getTestDriverA("test_storage_volume") if c == nil { t.Fatalf("Failed to execute getTestDriver() ") } sVols, err := c.GetStorageVolumes("", "") assert.NoError(t, err, "GetStorageVolumes threw error -> %s, %+v\n", err, sVols) sVols, err = c.GetStorageVolumes("", "name:asc") assert.NoError(t, err, "GetStorageVolumes name:asc error -> %s, %+v\n", err, sVols) } else { _, c = getTestDriverU("test_storage_volume") data, err := c.GetStorageVolumes("", "") assert.Error(t, err, fmt.Sprintf("ALL ok, no error, caught as expected: %s,%+v\n", err, data)) } }