Skip to content

Commit f23ea84

Browse files
committed
--wip-- [skip ci]
1 parent b28950e commit f23ea84

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/client/lib/tests/test-scenario/fault-injector-client.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)