@@ -49,7 +49,7 @@ func TestActionsService_GetActionsPermissionsInEnterprise(t *testing.T) {
49
49
})
50
50
}
51
51
52
- func TestActionsService_EditActionsPermissionsInEnterprise (t * testing.T ) {
52
+ func TestActionsService_UpdateActionsPermissionsInEnterprise (t * testing.T ) {
53
53
t .Parallel ()
54
54
client , mux , _ := setup (t )
55
55
@@ -68,24 +68,24 @@ func TestActionsService_EditActionsPermissionsInEnterprise(t *testing.T) {
68
68
})
69
69
70
70
ctx := context .Background ()
71
- ent , _ , err := client .Actions .EditActionsPermissionsInEnterprise (ctx , "e" , * input )
71
+ ent , _ , err := client .Actions .UpdateActionsPermissionsInEnterprise (ctx , "e" , * input )
72
72
if err != nil {
73
- t .Errorf ("Actions.EditActionsPermissionsInEnterprise returned error: %v" , err )
73
+ t .Errorf ("Actions.UpdateActionsPermissionsInEnterprise returned error: %v" , err )
74
74
}
75
75
76
76
want := & ActionsPermissionsEnterprise {EnabledOrganizations : Ptr ("all" ), AllowedActions : Ptr ("selected" )}
77
77
if ! cmp .Equal (ent , want ) {
78
- t .Errorf ("Actions.EditActionsPermissionsInEnterprise returned %+v, want %+v" , ent , want )
78
+ t .Errorf ("Actions.UpdateActionsPermissionsInEnterprise returned %+v, want %+v" , ent , want )
79
79
}
80
80
81
- const methodName = "EditActionsPermissionsInEnterprise "
81
+ const methodName = "UpdateActionsPermissionsInEnterprise "
82
82
testBadOptions (t , methodName , func () (err error ) {
83
- _ , _ , err = client .Actions .EditActionsPermissionsInEnterprise (ctx , "\n " , * input )
83
+ _ , _ , err = client .Actions .UpdateActionsPermissionsInEnterprise (ctx , "\n " , * input )
84
84
return err
85
85
})
86
86
87
87
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
88
- got , resp , err := client .Actions .EditActionsPermissionsInEnterprise (ctx , "e" , * input )
88
+ got , resp , err := client .Actions .UpdateActionsPermissionsInEnterprise (ctx , "e" , * input )
89
89
if got != nil {
90
90
t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
91
91
}
@@ -254,7 +254,7 @@ func TestActionsService_GetActionsAllowedInEnterprise(t *testing.T) {
254
254
})
255
255
}
256
256
257
- func TestActionsService_EditActionsAllowedInEnterprise (t * testing.T ) {
257
+ func TestActionsService_UpdateActionsAllowedInEnterprise (t * testing.T ) {
258
258
t .Parallel ()
259
259
client , mux , _ := setup (t )
260
260
@@ -273,24 +273,24 @@ func TestActionsService_EditActionsAllowedInEnterprise(t *testing.T) {
273
273
})
274
274
275
275
ctx := context .Background ()
276
- ent , _ , err := client .Actions .EditActionsAllowedInEnterprise (ctx , "e" , * input )
276
+ ent , _ , err := client .Actions .UpdateActionsAllowedInEnterprise (ctx , "e" , * input )
277
277
if err != nil {
278
- t .Errorf ("Actions.EditActionsAllowedInEnterprise returned error: %v" , err )
278
+ t .Errorf ("Actions.UpdateActionsAllowedInEnterprise returned error: %v" , err )
279
279
}
280
280
281
281
want := & ActionsAllowed {GithubOwnedAllowed : Ptr (true ), VerifiedAllowed : Ptr (false ), PatternsAllowed : []string {"a/b" }}
282
282
if ! cmp .Equal (ent , want ) {
283
- t .Errorf ("Actions.EditActionsAllowedInEnterprise returned %+v, want %+v" , ent , want )
283
+ t .Errorf ("Actions.UpdateActionsAllowedInEnterprise returned %+v, want %+v" , ent , want )
284
284
}
285
285
286
- const methodName = "EditActionsAllowedInEnterprise "
286
+ const methodName = "UpdateActionsAllowedInEnterprise "
287
287
testBadOptions (t , methodName , func () (err error ) {
288
- _ , _ , err = client .Actions .EditActionsAllowedInEnterprise (ctx , "\n " , * input )
288
+ _ , _ , err = client .Actions .UpdateActionsAllowedInEnterprise (ctx , "\n " , * input )
289
289
return err
290
290
})
291
291
292
292
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
293
- got , resp , err := client .Actions .EditActionsAllowedInEnterprise (ctx , "e" , * input )
293
+ got , resp , err := client .Actions .UpdateActionsAllowedInEnterprise (ctx , "e" , * input )
294
294
if got != nil {
295
295
t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
296
296
}
@@ -332,7 +332,7 @@ func TestActionsService_GetDefaultWorkflowPermissionsInEnterprise(t *testing.T)
332
332
})
333
333
}
334
334
335
- func TestActionsService_EditDefaultWorkflowPermissionsInEnterprise (t * testing.T ) {
335
+ func TestActionsService_UpdateDefaultWorkflowPermissionsInEnterprise (t * testing.T ) {
336
336
t .Parallel ()
337
337
client , mux , _ := setup (t )
338
338
@@ -351,24 +351,24 @@ func TestActionsService_EditDefaultWorkflowPermissionsInEnterprise(t *testing.T)
351
351
})
352
352
353
353
ctx := context .Background ()
354
- ent , _ , err := client .Actions .EditDefaultWorkflowPermissionsInEnterprise (ctx , "e" , * input )
354
+ ent , _ , err := client .Actions .UpdateDefaultWorkflowPermissionsInEnterprise (ctx , "e" , * input )
355
355
if err != nil {
356
- t .Errorf ("Actions.EditDefaultWorkflowPermissionsInEnterprise returned error: %v" , err )
356
+ t .Errorf ("Actions.UpdateDefaultWorkflowPermissionsInEnterprise returned error: %v" , err )
357
357
}
358
358
359
359
want := & DefaultWorkflowPermissionEnterprise {DefaultWorkflowPermissions : Ptr ("read" ), CanApprovePullRequestReviews : Ptr (true )}
360
360
if ! cmp .Equal (ent , want ) {
361
- t .Errorf ("Actions.EditDefaultWorkflowPermissionsInEnterprise returned %+v, want %+v" , ent , want )
361
+ t .Errorf ("Actions.UpdateDefaultWorkflowPermissionsInEnterprise returned %+v, want %+v" , ent , want )
362
362
}
363
363
364
- const methodName = "EditDefaultWorkflowPermissionsInEnterprise "
364
+ const methodName = "UpdateDefaultWorkflowPermissionsInEnterprise "
365
365
testBadOptions (t , methodName , func () (err error ) {
366
- _ , _ , err = client .Actions .EditDefaultWorkflowPermissionsInEnterprise (ctx , "\n " , * input )
366
+ _ , _ , err = client .Actions .UpdateDefaultWorkflowPermissionsInEnterprise (ctx , "\n " , * input )
367
367
return err
368
368
})
369
369
370
370
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
371
- got , resp , err := client .Actions .EditDefaultWorkflowPermissionsInEnterprise (ctx , "e" , * input )
371
+ got , resp , err := client .Actions .UpdateDefaultWorkflowPermissionsInEnterprise (ctx , "e" , * input )
372
372
if got != nil {
373
373
t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
374
374
}
@@ -414,7 +414,7 @@ func TestActionsService_GetArtifactAndLogRetentionPeriodInEnterprise(t *testing.
414
414
})
415
415
}
416
416
417
- func TestActionsService_EditArtifactAndLogRetentionPeriodInEnterprise (t * testing.T ) {
417
+ func TestActionsService_UpdateArtifactAndLogRetentionPeriodInEnterprise (t * testing.T ) {
418
418
t .Parallel ()
419
419
client , mux , _ := setup (t )
420
420
@@ -432,23 +432,23 @@ func TestActionsService_EditArtifactAndLogRetentionPeriodInEnterprise(t *testing
432
432
})
433
433
434
434
ctx := context .Background ()
435
- resp , err := client .Actions .EditArtifactAndLogRetentionPeriodInEnterprise (ctx , "e" , * input )
435
+ resp , err := client .Actions .UpdateArtifactAndLogRetentionPeriodInEnterprise (ctx , "e" , * input )
436
436
if err != nil {
437
- t .Errorf ("Actions.EditArtifactAndLogRetentionPeriodInEnterprise returned error: %v" , err )
437
+ t .Errorf ("Actions.UpdateArtifactAndLogRetentionPeriodInEnterprise returned error: %v" , err )
438
438
}
439
439
440
440
if resp .StatusCode != http .StatusNoContent {
441
- t .Errorf ("Actions.EditArtifactAndLogRetentionPeriodInEnterprise = %d, want %d" , resp .StatusCode , http .StatusNoContent )
441
+ t .Errorf ("Actions.UpdateArtifactAndLogRetentionPeriodInEnterprise = %d, want %d" , resp .StatusCode , http .StatusNoContent )
442
442
}
443
443
444
- const methodName = "EditArtifactAndLogRetentionPeriodInEnterprise "
444
+ const methodName = "UpdateArtifactAndLogRetentionPeriodInEnterprise "
445
445
testBadOptions (t , methodName , func () (err error ) {
446
- _ , err = client .Actions .EditArtifactAndLogRetentionPeriodInEnterprise (ctx , "\n " , * input )
446
+ _ , err = client .Actions .UpdateArtifactAndLogRetentionPeriodInEnterprise (ctx , "\n " , * input )
447
447
return err
448
448
})
449
449
450
450
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
451
- return client .Actions .EditArtifactAndLogRetentionPeriodInEnterprise (ctx , "e" , * input )
451
+ return client .Actions .UpdateArtifactAndLogRetentionPeriodInEnterprise (ctx , "e" , * input )
452
452
})
453
453
}
454
454
@@ -486,7 +486,7 @@ func TestActionsService_GetSelfHostedRunnerPermissionsInEnterprise(t *testing.T)
486
486
})
487
487
}
488
488
489
- func TestActionsService_EditSelfHostedRunnerPermissionsInEnterprise (t * testing.T ) {
489
+ func TestActionsService_UpdateSelfHostedRunnerPermissionsInEnterprise (t * testing.T ) {
490
490
t .Parallel ()
491
491
client , mux , _ := setup (t )
492
492
@@ -504,23 +504,23 @@ func TestActionsService_EditSelfHostedRunnerPermissionsInEnterprise(t *testing.T
504
504
})
505
505
506
506
ctx := context .Background ()
507
- resp , err := client .Actions .EditSelfHostedRunnerPermissionsInEnterprise (ctx , "e" , * input )
507
+ resp , err := client .Actions .UpdateSelfHostedRunnerPermissionsInEnterprise (ctx , "e" , * input )
508
508
if err != nil {
509
- t .Errorf ("Actions.EditSelfHostedRunnerPermissionsInEnterprise returned error: %v" , err )
509
+ t .Errorf ("Actions.UpdateSelfHostedRunnerPermissionsInEnterprise returned error: %v" , err )
510
510
}
511
511
512
512
if resp .StatusCode != http .StatusNoContent {
513
- t .Errorf ("Actions.EditSelfHostedRunnerPermissionsInEnterprise = %d, want %d" , resp .StatusCode , http .StatusNoContent )
513
+ t .Errorf ("Actions.UpdateSelfHostedRunnerPermissionsInEnterprise = %d, want %d" , resp .StatusCode , http .StatusNoContent )
514
514
}
515
515
516
- const methodName = "EditSelfHostedRunnerPermissionsInEnterprise "
516
+ const methodName = "UpdateSelfHostedRunnerPermissionsInEnterprise "
517
517
testBadOptions (t , methodName , func () (err error ) {
518
- _ , err = client .Actions .EditSelfHostedRunnerPermissionsInEnterprise (ctx , "\n " , * input )
518
+ _ , err = client .Actions .UpdateSelfHostedRunnerPermissionsInEnterprise (ctx , "\n " , * input )
519
519
return err
520
520
})
521
521
522
522
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
523
- return client .Actions .EditSelfHostedRunnerPermissionsInEnterprise (ctx , "e" , * input )
523
+ return client .Actions .UpdateSelfHostedRunnerPermissionsInEnterprise (ctx , "e" , * input )
524
524
})
525
525
}
526
526
0 commit comments