@@ -368,6 +368,7 @@ describe('step event publishing', () => {
368368 expect ( onEmitEvent ) . toHaveBeenNthCalledWith ( 8 , {
369369 name : 'step_failure' ,
370370 level : PublishEventLevel . Error ,
371+ eventCode : expect . toBeString ( ) ,
371372 description : expect . stringMatching (
372373 new RegExp (
373374 `Step "Mochi" failed to complete due to error. \\(errorCode="${ error . code } ", reason="ripperoni"\\)$` ,
@@ -423,6 +424,7 @@ describe('provider auth error details', () => {
423424 expect ( onEmitEvent ) . toHaveBeenCalledWith ( {
424425 name : 'step_failure' ,
425426 level : PublishEventLevel . Error ,
427+ eventCode : expect . toBeString ( ) ,
426428 description : expect . stringMatching (
427429 new RegExp (
428430 '^Step "Mochi" failed to complete due to error.' +
@@ -439,6 +441,7 @@ describe('provider auth error details', () => {
439441 expect ( onEmitEvent ) . toHaveBeenCalledWith ( {
440442 name : 'validation_failure' ,
441443 level : PublishEventLevel . Error ,
444+ eventCode : expect . toBeString ( ) ,
442445 description : expect . stringMatching (
443446 new RegExp (
444447 '^Error occurred while validating integration configuration.' +
@@ -503,6 +506,7 @@ describe('validation failure logging', () => {
503506 expect ( onEmitEvent ) . toHaveBeenNthCalledWith ( 1 , {
504507 name : 'validation_failure' ,
505508 level : PublishEventLevel . Error ,
509+ eventCode : expect . toBeString ( ) ,
506510 description : expect . stringMatching ( expectedDescriptionRegex ) ,
507511 } ) ;
508512
@@ -535,6 +539,7 @@ describe('validation failure logging', () => {
535539 expect ( onEmitEvent ) . toHaveBeenNthCalledWith ( 1 , {
536540 name : 'validation_failure' ,
537541 level : PublishEventLevel . Error ,
542+ eventCode : expect . toBeString ( ) ,
538543 description : expect . stringMatching ( expectedDescriptionRegex ) ,
539544 } ) ;
540545
@@ -731,13 +736,15 @@ describe('#publishEvent', () => {
731736 logger . publishWarnEvent ( {
732737 name : IntegrationWarnEventName [ key ] ,
733738 description : 'the description' ,
739+ eventCode : 'AWS-PER-ECS' ,
734740 } ) ;
735741
736742 expect ( onEmitEvent ) . toHaveBeenCalledTimes ( 1 ) ;
737743 expect ( onEmitEvent ) . toHaveBeenCalledWith ( {
738744 name : IntegrationWarnEventName [ key ] ,
739745 level : PublishEventLevel . Warn ,
740746 description : 'the description' ,
747+ eventCode : 'AWS-PER-ECS' ,
741748 } ) ;
742749 } ,
743750 ) ;
@@ -756,6 +763,7 @@ describe('#publishEvent', () => {
756763 logger . publishErrorEvent ( {
757764 name : IntegrationErrorEventName [ key ] ,
758765 description : 'the description' ,
766+ eventCode : 'AWS-PER-ECS' ,
759767 } ) ;
760768
761769 expect ( onEmitEvent ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -764,6 +772,7 @@ describe('#publishEvent', () => {
764772 name : IntegrationErrorEventName [ key ] ,
765773 level : PublishEventLevel . Error ,
766774 description : 'the description' ,
775+ eventCode : 'AWS-PER-ECS' ,
767776 } ) ;
768777 } ,
769778 ) ;
0 commit comments