Skip to content

Commit

Permalink
Merge branch 'main' into renovate/zod-3.x-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole White committed May 3, 2024
2 parents aec73f4 + 13538e8 commit 5397f75
Show file tree
Hide file tree
Showing 9 changed files with 523 additions and 149 deletions.
11 changes: 10 additions & 1 deletion e2e/python/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,20 @@ def gen_test_cases(n: int) -> list[MyTestCase]:

if __name__ == "__main__":
run_test_suite(
id="my-test-suite",
id="python-e2e-test-suite-1",
fn=test_fn,
test_cases=gen_test_cases(4),
evaluators=[
HasAllSubstrings(),
IsFriendly(),
],
)
run_test_suite(
id="python-e2e-test-suite-2",
fn=test_fn,
test_cases=gen_test_cases(10),
evaluators=[
HasAllSubstrings(),
IsFriendly(),
],
)
23 changes: 16 additions & 7 deletions e2e/typescript/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,20 @@ function genTestCases(n: number): MyTestCase[] {
}

(async () => {
await runTestSuite<MyTestCase, string>({
id: 'my-test-suite',
fn: testFn,
testCaseHash: ['input'],
testCases: genTestCases(4),
evaluators: [new HasAllSubstrings(), new IsFriendly()],
});
await Promise.allSettled([
runTestSuite<MyTestCase, string>({
id: 'typescript-e2e-test-suite-1',
fn: testFn,
testCaseHash: ['input'],
testCases: genTestCases(4),
evaluators: [new HasAllSubstrings(), new IsFriendly()],
}),
runTestSuite<MyTestCase, string>({
id: 'typescript-e2e-test-suite-2',
fn: testFn,
testCaseHash: ['input'],
testCases: genTestCases(10),
evaluators: [new HasAllSubstrings(), new IsFriendly()],
}),
]);
})();
96 changes: 48 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/handlers/testing/align/util/hono-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function createHonoApp(sessionManager: SessionManager): Hono {
event: z.object({
message: z.string(),
traceId: z.string(),
timestamp: z.string(),
timestamp: z.string().datetime({ offset: true }),
properties: z.unknown(),
}),
}),
Expand Down
20 changes: 9 additions & 11 deletions src/handlers/testing/exec/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,15 @@ export async function exec(args: {
.finally(async () => {
runManager.setEndTime();

if (args.slackWebhookUrl) {
// Post to Slack if a webhook URL has been set.
// Note: this doesn't happen in cleanup() because that
// function is also called during unexpected termination
// and makes a best effort to clean up resources, whereas
// we only want to post to Slack if the command has
// successfully executed.
await runManager.postSlackMessage({
webhookUrl: args.slackWebhookUrl,
});
}
// Post comments to Slack and GitHub (if set up)
// Note: this doesn't happen in cleanup() because that
// function is also called during unexpected termination
// and makes a best effort to clean up resources, whereas
// we only want to post comments if the command has
// successfully executed.
await runManager.postComments({
slackWebhookUrl: args.slackWebhookUrl,
});

await cleanup();
});
Expand Down
Loading

0 comments on commit 5397f75

Please sign in to comment.