@@ -28,15 +28,15 @@ var (
28
28
func TestList (t * testing.T ) {
29
29
th .SetupHTTP ()
30
30
defer th .TeardownHTTP ()
31
- fixture .SetupHandler (t , _baseURL , "GET" , "" , os . ListConfigsJSON , 200 )
31
+ fixture .SetupHandler (t , _baseURL , "GET" , "" , listConfigsJSON , 200 )
32
32
33
33
count := 0
34
34
err := List (fake .ServiceClient ()).EachPage (func (page pagination.Page ) (bool , error ) {
35
35
count ++
36
36
actual , err := os .ExtractConfigs (page )
37
37
th .AssertNoErr (t , err )
38
38
39
- expected := []os.Config {os . ExampleConfig }
39
+ expected := []os.Config {exampleConfig }
40
40
th .AssertDeepEquals (t , expected , actual )
41
41
42
42
return true , nil
@@ -49,17 +49,17 @@ func TestList(t *testing.T) {
49
49
func TestGet (t * testing.T ) {
50
50
th .SetupHTTP ()
51
51
defer th .TeardownHTTP ()
52
- fixture .SetupHandler (t , resURL , "GET" , "" , os . GetConfigJSON , 200 )
52
+ fixture .SetupHandler (t , resURL , "GET" , "" , getConfigJSON , 200 )
53
53
54
54
config , err := Get (fake .ServiceClient (), configID ).Extract ()
55
55
th .AssertNoErr (t , err )
56
- th .AssertDeepEquals (t , & os . ExampleConfig , config )
56
+ th .AssertDeepEquals (t , & exampleConfig , config )
57
57
}
58
58
59
59
func TestCreate (t * testing.T ) {
60
60
th .SetupHTTP ()
61
61
defer th .TeardownHTTP ()
62
- fixture .SetupHandler (t , _baseURL , "POST" , os . CreateReq , os . CreateConfigJSON , 200 )
62
+ fixture .SetupHandler (t , _baseURL , "POST" , createReq , createConfigJSON , 200 )
63
63
64
64
opts := os.CreateOpts {
65
65
Datastore : & os.DatastoreOpts {
@@ -76,13 +76,13 @@ func TestCreate(t *testing.T) {
76
76
77
77
config , err := Create (fake .ServiceClient (), opts ).Extract ()
78
78
th .AssertNoErr (t , err )
79
- th .AssertDeepEquals (t , & os . ExampleConfigWithValues , config )
79
+ th .AssertDeepEquals (t , & exampleConfigWithValues , config )
80
80
}
81
81
82
82
func TestUpdate (t * testing.T ) {
83
83
th .SetupHTTP ()
84
84
defer th .TeardownHTTP ()
85
- fixture .SetupHandler (t , resURL , "PATCH" , os . UpdateReq , "" , 200 )
85
+ fixture .SetupHandler (t , resURL , "PATCH" , updateReq , "" , 200 )
86
86
87
87
opts := os.UpdateOpts {
88
88
Values : map [string ]interface {}{
@@ -97,7 +97,7 @@ func TestUpdate(t *testing.T) {
97
97
func TestReplace (t * testing.T ) {
98
98
th .SetupHTTP ()
99
99
defer th .TeardownHTTP ()
100
- fixture .SetupHandler (t , resURL , "PUT" , os . UpdateReq , "" , 202 )
100
+ fixture .SetupHandler (t , resURL , "PUT" , updateReq , "" , 202 )
101
101
102
102
opts := os.UpdateOpts {
103
103
Values : map [string ]interface {}{
@@ -121,7 +121,7 @@ func TestDelete(t *testing.T) {
121
121
func TestListInstances (t * testing.T ) {
122
122
th .SetupHTTP ()
123
123
defer th .TeardownHTTP ()
124
- fixture .SetupHandler (t , resURL + "/instances" , "GET" , "" , os . ListInstancesJSON , 200 )
124
+ fixture .SetupHandler (t , resURL + "/instances" , "GET" , "" , listInstancesJSON , 200 )
125
125
126
126
expectedInstance := instances.Instance {
127
127
ID : "d4603f69-ec7e-4e9b-803f-600b9205576f" ,
@@ -149,7 +149,7 @@ func TestListInstances(t *testing.T) {
149
149
func TestListDSParams (t * testing.T ) {
150
150
th .SetupHTTP ()
151
151
defer th .TeardownHTTP ()
152
- fixture .SetupHandler (t , dsParamListURL , "GET" , "" , os . ListParamsJSON , 200 )
152
+ fixture .SetupHandler (t , dsParamListURL , "GET" , "" , listParamsJSON , 200 )
153
153
154
154
pages := 0
155
155
err := ListDatastoreParams (fake .ServiceClient (), dsID , versionID ).EachPage (func (page pagination.Page ) (bool , error ) {
@@ -179,7 +179,7 @@ func TestListDSParams(t *testing.T) {
179
179
func TestGetDSParam (t * testing.T ) {
180
180
th .SetupHTTP ()
181
181
defer th .TeardownHTTP ()
182
- fixture .SetupHandler (t , dsParamGetURL , "GET" , "" , os . GetParamJSON , 200 )
182
+ fixture .SetupHandler (t , dsParamGetURL , "GET" , "" , getParamJSON , 200 )
183
183
184
184
param , err := GetDatastoreParam (fake .ServiceClient (), dsID , versionID , paramID ).Extract ()
185
185
th .AssertNoErr (t , err )
@@ -194,7 +194,7 @@ func TestGetDSParam(t *testing.T) {
194
194
func TestListGlobalParams (t * testing.T ) {
195
195
th .SetupHTTP ()
196
196
defer th .TeardownHTTP ()
197
- fixture .SetupHandler (t , globalParamListURL , "GET" , "" , os . ListParamsJSON , 200 )
197
+ fixture .SetupHandler (t , globalParamListURL , "GET" , "" , listParamsJSON , 200 )
198
198
199
199
pages := 0
200
200
err := ListGlobalParams (fake .ServiceClient (), versionID ).EachPage (func (page pagination.Page ) (bool , error ) {
@@ -224,7 +224,7 @@ func TestListGlobalParams(t *testing.T) {
224
224
func TestGetGlobalParam (t * testing.T ) {
225
225
th .SetupHTTP ()
226
226
defer th .TeardownHTTP ()
227
- fixture .SetupHandler (t , globalParamGetURL , "GET" , "" , os . GetParamJSON , 200 )
227
+ fixture .SetupHandler (t , globalParamGetURL , "GET" , "" , getParamJSON , 200 )
228
228
229
229
param , err := GetGlobalParam (fake .ServiceClient (), versionID , paramID ).Extract ()
230
230
th .AssertNoErr (t , err )
0 commit comments