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 {
51
51
public triggerAction < T extends { action_id : string } > (
52
52
action : ActionRequest
53
53
) : 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
+ }
54
60
return this . #request< T > ( "POST" , "/action" , action ) ;
55
61
}
56
62
@@ -88,12 +94,14 @@ export class FaultInjectorClient {
88
94
const action = await this . getActionStatus < ActionStatus > ( actionId ) ;
89
95
90
96
if ( action . status === "failed" ) {
97
+ console . log ( `action ${ actionId } failed` ) ;
91
98
throw new Error (
92
99
`Action id: ${ actionId } failed! Error: ${ action . error } `
93
100
) ;
94
101
}
95
102
96
103
if ( [ "finished" , "failed" , "success" ] . includes ( action . status ) ) {
104
+ console . log ( `action ${ actionId } complete` ) ;
97
105
return action ;
98
106
}
99
107
You can’t perform that action at this time.
0 commit comments