File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/client/lib/tests/test-scenario Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ export class FaultInjectorClient {
5151 public triggerAction < T extends { action_id : string } > (
5252 action : ActionRequest
5353 ) : Promise < T > {
54+ if ( action . type === 'sequence_of_actions' ) {
55+ //@ts -ignore
56+ console . log ( `trigger sequence: ${ action . parameters . actions . map ( a => a . type ) . join ( ', ' ) } ` ) ;
57+ } else {
58+ console . log ( `trigger action: ${ action . type } ` ) ;
59+ }
5460 return this . #request< T > ( "POST" , "/action" , action ) ;
5561 }
5662
@@ -88,12 +94,14 @@ export class FaultInjectorClient {
8894 const action = await this . getActionStatus < ActionStatus > ( actionId ) ;
8995
9096 if ( action . status === "failed" ) {
97+ console . log ( `action ${ actionId } failed` ) ;
9198 throw new Error (
9299 `Action id: ${ actionId } failed! Error: ${ action . error } `
93100 ) ;
94101 }
95102
96103 if ( [ "finished" , "failed" , "success" ] . includes ( action . status ) ) {
104+ console . log ( `action ${ actionId } complete` ) ;
97105 return action ;
98106 }
99107
You can’t perform that action at this time.
0 commit comments