@@ -41,7 +41,7 @@ func (m *mockClient) ListSimilarIncidents(context.Context, string, int) (*flashd
4141 return nil , fmt .Errorf ("mockClient: ListSimilarIncidents not implemented" )
4242}
4343
44- func (m * mockClient ) CreateIncident (context.Context , * flashduty.CreateIncidentInput ) (any , error ) {
44+ func (m * mockClient ) CreateIncident (context.Context , * flashduty.CreateIncidentInput ) (* flashduty. CreateIncidentOutput , error ) {
4545 return nil , fmt .Errorf ("mockClient: CreateIncident not implemented" )
4646}
4747
@@ -149,7 +149,7 @@ func (m *mockClient) ListStatusChanges(context.Context, *flashduty.ListStatusCha
149149 return nil , fmt .Errorf ("mockClient: ListStatusChanges not implemented" )
150150}
151151
152- func (m * mockClient ) CreateStatusIncident (context.Context , * flashduty.CreateStatusIncidentInput ) (any , error ) {
152+ func (m * mockClient ) CreateStatusIncident (context.Context , * flashduty.CreateStatusIncidentInput ) (* flashduty. CreateStatusIncidentOutput , error ) {
153153 return nil , fmt .Errorf ("mockClient: CreateStatusIncident not implemented" )
154154}
155155
@@ -435,9 +435,9 @@ func TestCommandIncidentGetEmptyResults(t *testing.T) {
435435
436436type mockCreateNoID struct { mockClient }
437437
438- func (m * mockCreateNoID ) CreateIncident (_ context.Context , _ * flashduty.CreateIncidentInput ) (any , error ) {
439- // Return a plain string instead of a map with "incident_id" .
440- return "ok" , nil
438+ func (m * mockCreateNoID ) CreateIncident (_ context.Context , _ * flashduty.CreateIncidentInput ) (* flashduty. CreateIncidentOutput , error ) {
439+ // Return an output with no incident_id to exercise the success fallback .
440+ return & flashduty. CreateIncidentOutput {} , nil
441441}
442442
443443func TestCommandIncidentCreateWithoutIncidentID (t * testing.T ) {
@@ -506,8 +506,8 @@ func TestCommandIncidentTimelineEmpty(t *testing.T) {
506506
507507type mockStatusCreateWithID struct { mockClient }
508508
509- func (m * mockStatusCreateWithID ) CreateStatusIncident (_ context.Context , _ * flashduty.CreateStatusIncidentInput ) (any , error ) {
510- return map [ string ] any { "change_id" : float64 ( 12345 ) }, nil
509+ func (m * mockStatusCreateWithID ) CreateStatusIncident (_ context.Context , _ * flashduty.CreateStatusIncidentInput ) (* flashduty. CreateStatusIncidentOutput , error ) {
510+ return & flashduty. CreateStatusIncidentOutput { ChangeID : 12345 }, nil
511511}
512512
513513func TestCommandStatusPageCreateIncidentWithChangeID (t * testing.T ) {
@@ -549,8 +549,8 @@ func TestCommandStatusPageCreateIncidentWithChangeID_JSON(t *testing.T) {
549549
550550type mockStatusCreateNoID struct { mockClient }
551551
552- func (m * mockStatusCreateNoID ) CreateStatusIncident (_ context.Context , _ * flashduty.CreateStatusIncidentInput ) (any , error ) {
553- return "ok" , nil
552+ func (m * mockStatusCreateNoID ) CreateStatusIncident (_ context.Context , _ * flashduty.CreateStatusIncidentInput ) (* flashduty. CreateStatusIncidentOutput , error ) {
553+ return & flashduty. CreateStatusIncidentOutput {} , nil
554554}
555555
556556func TestCommandStatusPageCreateIncidentWithoutChangeID (t * testing.T ) {
0 commit comments