예제 #1
0
// Verifies that share type deletion works
func TestDelete(t *testing.T) {
	th.SetupHTTP()
	defer th.TeardownHTTP()

	MockDeleteResponse(t)
	res := sharetypes.Delete(client.ServiceClient(), "shareTypeID")
	th.AssertNoErr(t, res.Err)
}
예제 #2
0
// DeleteShareType will delete a share type. An error will occur if
// the share type was unable to be deleted.
func DeleteShareType(t *testing.T, client *gophercloud.ServiceClient, shareType *sharetypes.ShareType) {
	err := sharetypes.Delete(client, shareType.ID).ExtractErr()
	if err != nil {
		t.Fatalf("Failed to delete share type %s: %v", shareType.ID, err)
	}

	t.Logf("Deleted share type: %s", shareType.ID)
}