@@ -430,6 +430,7 @@ func TestCommandIncidentUnack(t *testing.T) {
430430 saveAndResetGlobals (t )
431431 stub := newGFStub (t )
432432
433+ // unack is served by the generated twin (positional ids → incident_ids).
433434 out , err := execCommand ("incident" , "unack" , "inc-1" , "inc-2" )
434435 if err != nil {
435436 t .Fatalf ("[incident-unack] unexpected error: %v" , err )
@@ -440,7 +441,7 @@ func TestCommandIncidentUnack(t *testing.T) {
440441 if got , want := strings .Join (stub .bodyStrings ("incident_ids" ), "," ), "inc-1,inc-2" ; got != want {
441442 t .Fatalf ("[incident-unack] expected ids %q, got %q" , want , got )
442443 }
443- if ! strings .Contains (out , "Unacknowledged 2 incident(s). " ) {
444+ if ! strings .Contains (out , "OK: POST / incident/unack " ) {
444445 t .Fatalf ("[incident-unack] unexpected output:\n %s" , out )
445446 }
446447}
@@ -449,6 +450,7 @@ func TestCommandIncidentWake(t *testing.T) {
449450 saveAndResetGlobals (t )
450451 stub := newGFStub (t )
451452
453+ // wake is served by the generated twin (positional id → incident_ids).
452454 out , err := execCommand ("incident" , "wake" , "inc-1" )
453455 if err != nil {
454456 t .Fatalf ("[incident-wake] unexpected error: %v" , err )
@@ -459,7 +461,7 @@ func TestCommandIncidentWake(t *testing.T) {
459461 if got , want := strings .Join (stub .bodyStrings ("incident_ids" ), "," ), "inc-1" ; got != want {
460462 t .Fatalf ("[incident-wake] expected ids %q, got %q" , want , got )
461463 }
462- if ! strings .Contains (out , "Restored notifications for 1 incident(s). " ) {
464+ if ! strings .Contains (out , "OK: POST / incident/wake " ) {
463465 t .Fatalf ("[incident-wake] unexpected output:\n %s" , out )
464466 }
465467}
@@ -500,13 +502,15 @@ func TestCommandIncidentCommentAllows1024UnicodeRunes(t *testing.T) {
500502 }
501503}
502504
505+ // TestCommandIncidentLifecycleRejectsMoreThan100IDs covers the curated
506+ // commands that still enforce the 100-id batch cap client-side. unack and wake
507+ // were dropped in favor of their generated twins, which carry no client-side
508+ // cap (the backend enforces the limit), so they are intentionally absent here.
503509func TestCommandIncidentLifecycleRejectsMoreThan100IDs (t * testing.T ) {
504510 commands := []struct {
505511 name string
506512 args []string
507513 }{
508- {name : "unack" , args : []string {"incident" , "unack" }},
509- {name : "wake" , args : []string {"incident" , "wake" }},
510514 {name : "comment" , args : []string {"incident" , "comment" , "--comment" , "too many" }},
511515 {name : "remove" , args : []string {"incident" , "remove" }},
512516 }
@@ -612,6 +616,7 @@ func TestCommandIncidentDisableMerge(t *testing.T) {
612616 saveAndResetGlobals (t )
613617 stub := newGFStub (t )
614618
619+ // disable-merge is served by the generated twin (positional ids → incident_ids).
615620 out , err := execCommand ("incident" , "disable-merge" , "inc-1" , "inc-2" )
616621 if err != nil {
617622 t .Fatalf ("[incident-disable-merge] unexpected error: %v" , err )
@@ -622,7 +627,7 @@ func TestCommandIncidentDisableMerge(t *testing.T) {
622627 if got , want := strings .Join (stub .bodyStrings ("incident_ids" ), "," ), "inc-1,inc-2" ; got != want {
623628 t .Fatalf ("[incident-disable-merge] expected ids %q, got %q" , want , got )
624629 }
625- if ! strings .Contains (out , "Disabled auto-merge for 2 incident(s). " ) {
630+ if ! strings .Contains (out , "OK: POST / incident/disable-merge " ) {
626631 t .Fatalf ("[incident-disable-merge] unexpected output:\n %s" , out )
627632 }
628633}
0 commit comments