@@ -13,7 +13,7 @@ import (
13
13
"github.com/fastly/cli/pkg/mock"
14
14
"github.com/fastly/cli/pkg/testutil"
15
15
"github.com/fastly/cli/pkg/update"
16
- "github.com/fastly/go-fastly/fastly"
16
+ "github.com/fastly/go-fastly/v2/ fastly"
17
17
)
18
18
19
19
func TestBackendCreate (t * testing.T ) {
@@ -186,7 +186,7 @@ func TestBackendUpdate(t *testing.T) {
186
186
wantError : errTest .Error (),
187
187
},
188
188
{
189
- args : []string {"backend" , "update" , "--service-id" , "123" , "--version" , "1" , "--name" , "www.test.com" , "--new-name" , "www.example.com" },
189
+ args : []string {"backend" , "update" , "--service-id" , "123" , "--version" , "1" , "--name" , "www.test.com" , "--new-name" , "www.example.com" , "--comment" , "" },
190
190
api : mock.API {
191
191
GetBackendFn : getBackendOK ,
192
192
UpdateBackendFn : updateBackendOK ,
@@ -259,10 +259,10 @@ var errTest = errors.New("fixture error")
259
259
260
260
func createBackendOK (i * fastly.CreateBackendInput ) (* fastly.Backend , error ) {
261
261
return & fastly.Backend {
262
- ServiceID : i . Service ,
263
- Version : i . Version ,
264
- Name : i .Name ,
265
- Comment : i .Comment ,
262
+ ServiceID : i . ServiceID ,
263
+ ServiceVersion : i . ServiceVersion ,
264
+ Name : i .Name ,
265
+ Comment : i .Comment ,
266
266
}, nil
267
267
}
268
268
@@ -272,21 +272,21 @@ func createBackendError(i *fastly.CreateBackendInput) (*fastly.Backend, error) {
272
272
273
273
func listBackendsOK (i * fastly.ListBackendsInput ) ([]* fastly.Backend , error ) {
274
274
return []* fastly.Backend {
275
- & fastly. Backend {
276
- ServiceID : i . Service ,
277
- Version : i . Version ,
278
- Name : "test.com" ,
279
- Address : "www.test.com" ,
280
- Port : 80 ,
281
- Comment : "test" ,
275
+ {
276
+ ServiceID : i . ServiceID ,
277
+ ServiceVersion : i . ServiceVersion ,
278
+ Name : "test.com" ,
279
+ Address : "www.test.com" ,
280
+ Port : 80 ,
281
+ Comment : "test" ,
282
282
},
283
- & fastly. Backend {
284
- ServiceID : i . Service ,
285
- Version : i . Version ,
286
- Name : "example.com" ,
287
- Address : "www.example.com" ,
288
- Port : 443 ,
289
- Comment : "example" ,
283
+ {
284
+ ServiceID : i . ServiceID ,
285
+ ServiceVersion : i . ServiceVersion ,
286
+ Name : "example.com" ,
287
+ Address : "www.example.com" ,
288
+ Port : 443 ,
289
+ Comment : "example" ,
290
290
},
291
291
}, nil
292
292
}
@@ -358,12 +358,12 @@ var listBackendsVerboseOutput = strings.Join([]string{
358
358
359
359
func getBackendOK (i * fastly.GetBackendInput ) (* fastly.Backend , error ) {
360
360
return & fastly.Backend {
361
- ServiceID : i . Service ,
362
- Version : i . Version ,
363
- Name : "test.com" ,
364
- Address : "www.test.com" ,
365
- Port : 80 ,
366
- Comment : "test" ,
361
+ ServiceID : i . ServiceID ,
362
+ ServiceVersion : i . ServiceVersion ,
363
+ Name : "test.com" ,
364
+ Address : "www.test.com" ,
365
+ Port : 80 ,
366
+ Comment : "test" ,
367
367
}, nil
368
368
}
369
369
@@ -401,10 +401,10 @@ var describeBackendOutput = strings.Join([]string{
401
401
402
402
func updateBackendOK (i * fastly.UpdateBackendInput ) (* fastly.Backend , error ) {
403
403
return & fastly.Backend {
404
- ServiceID : i . Service ,
405
- Version : i . Version ,
406
- Name : i .NewName ,
407
- Comment : i .Comment ,
404
+ ServiceID : i . ServiceID ,
405
+ ServiceVersion : i . ServiceVersion ,
406
+ Name : * i .NewName ,
407
+ Comment : * i .Comment ,
408
408
}, nil
409
409
}
410
410
0 commit comments