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