| "github.com/rackspace/gophercloud" |
| osServiceAssets "github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets" |
| "github.com/rackspace/gophercloud/rackspace/cdn/v1/serviceassets" |
| th "github.com/rackspace/gophercloud/testhelper" |
| func TestServiceAsset(t *testing.T) { |
| t.Log("Creating Service") |
| loc := testServiceCreate(t, client, "test-site-2") |
| t.Logf("Created service at location: %s", loc) |
| t.Log("Deleting Service Assets") |
| testServiceAssetDelete(t, client, loc) |
| func testServiceAssetDelete(t *testing.T, client *gophercloud.ServiceClient, url string) { |
| deleteOpts := osServiceAssets.DeleteOpts{ |
| err := serviceassets.Delete(client, url, deleteOpts).ExtractErr() |
| t.Log("Successfully deleted all Service Assets") |