func TestDeleteFCNetwork(t *testing.T) { var ( d *OVTest c *ov.OVClient testName string testFcNet ov.FCNetwork ) if os.Getenv("ONEVIEW_TEST_ACCEPTANCE") == "true" { d, c = getTestDriverA("test_fc_network") if c == nil { t.Fatalf("Failed to execute getTestDriver() ") } testName = d.Tc.GetTestData(d.Env, "Name").(string) err := c.DeleteFCNetwork(testName) assert.NoError(t, err, "DeleteFcNetwork err-> %s", err) testFcNet, err = c.GetFCNetworkByName(testName) assert.NoError(t, err, "GetFcNetworkByName with deleted fc network-> %+v", err) assert.Equal(t, "", testFcNet.Name, fmt.Sprintf("Problem getting fcnet name, %+v", testFcNet)) } else { _, c = getTestDriverU("test_fc_network") err := c.DeleteFCNetwork("footest") assert.Error(t, err, fmt.Sprintf("ALL ok, no error, caught as expected: %s,%+v\n", err, testFcNet)) } }