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