test fixes
diff --git a/rackspace/db/v1/configurations/delegate_test.go b/rackspace/db/v1/configurations/delegate_test.go
index af5e8aa..580f02a 100644
--- a/rackspace/db/v1/configurations/delegate_test.go
+++ b/rackspace/db/v1/configurations/delegate_test.go
@@ -28,7 +28,7 @@
func TestList(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, _baseURL, "GET", "", os.ListConfigsJSON, 200)
+ fixture.SetupHandler(t, _baseURL, "GET", "", listConfigsJSON, 200)
count := 0
err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
@@ -36,7 +36,7 @@
actual, err := os.ExtractConfigs(page)
th.AssertNoErr(t, err)
- expected := []os.Config{os.ExampleConfig}
+ expected := []os.Config{exampleConfig}
th.AssertDeepEquals(t, expected, actual)
return true, nil
@@ -49,17 +49,17 @@
func TestGet(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, resURL, "GET", "", os.GetConfigJSON, 200)
+ fixture.SetupHandler(t, resURL, "GET", "", getConfigJSON, 200)
config, err := Get(fake.ServiceClient(), configID).Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &os.ExampleConfig, config)
+ th.AssertDeepEquals(t, &exampleConfig, config)
}
func TestCreate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, _baseURL, "POST", os.CreateReq, os.CreateConfigJSON, 200)
+ fixture.SetupHandler(t, _baseURL, "POST", createReq, createConfigJSON, 200)
opts := os.CreateOpts{
Datastore: &os.DatastoreOpts{
@@ -76,13 +76,13 @@
config, err := Create(fake.ServiceClient(), opts).Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &os.ExampleConfigWithValues, config)
+ th.AssertDeepEquals(t, &exampleConfigWithValues, config)
}
func TestUpdate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, resURL, "PATCH", os.UpdateReq, "", 200)
+ fixture.SetupHandler(t, resURL, "PATCH", updateReq, "", 200)
opts := os.UpdateOpts{
Values: map[string]interface{}{
@@ -97,7 +97,7 @@
func TestReplace(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, resURL, "PUT", os.UpdateReq, "", 202)
+ fixture.SetupHandler(t, resURL, "PUT", updateReq, "", 202)
opts := os.UpdateOpts{
Values: map[string]interface{}{
@@ -121,7 +121,7 @@
func TestListInstances(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, resURL+"/instances", "GET", "", os.ListInstancesJSON, 200)
+ fixture.SetupHandler(t, resURL+"/instances", "GET", "", listInstancesJSON, 200)
expectedInstance := instances.Instance{
ID: "d4603f69-ec7e-4e9b-803f-600b9205576f",
@@ -149,7 +149,7 @@
func TestListDSParams(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, dsParamListURL, "GET", "", os.ListParamsJSON, 200)
+ fixture.SetupHandler(t, dsParamListURL, "GET", "", listParamsJSON, 200)
pages := 0
err := ListDatastoreParams(fake.ServiceClient(), dsID, versionID).EachPage(func(page pagination.Page) (bool, error) {
@@ -179,7 +179,7 @@
func TestGetDSParam(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, dsParamGetURL, "GET", "", os.GetParamJSON, 200)
+ fixture.SetupHandler(t, dsParamGetURL, "GET", "", getParamJSON, 200)
param, err := GetDatastoreParam(fake.ServiceClient(), dsID, versionID, paramID).Extract()
th.AssertNoErr(t, err)
@@ -194,7 +194,7 @@
func TestListGlobalParams(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, globalParamListURL, "GET", "", os.ListParamsJSON, 200)
+ fixture.SetupHandler(t, globalParamListURL, "GET", "", listParamsJSON, 200)
pages := 0
err := ListGlobalParams(fake.ServiceClient(), versionID).EachPage(func(page pagination.Page) (bool, error) {
@@ -224,7 +224,7 @@
func TestGetGlobalParam(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, globalParamGetURL, "GET", "", os.GetParamJSON, 200)
+ fixture.SetupHandler(t, globalParamGetURL, "GET", "", getParamJSON, 200)
param, err := GetGlobalParam(fake.ServiceClient(), versionID, paramID).Extract()
th.AssertNoErr(t, err)