Skip to content

Commit

Permalink
wip: change test definition id type in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuhster committed Nov 15, 2024
1 parent 83b63ae commit edfd983
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/cli/src/evaluation/test-definitions.controller.ee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,12 @@ export class TestDefinitionsController {

@Post('/:id/run')
async runTest(req: TestDefinitionsRequest.Run) {
if (!isPositiveInteger(req.params.id)) {
throw new BadRequestError('Test ID is not a number');
}
const { id: testDefinitionId } = req.params;

const workflowIds = await getSharedWorkflowIds(req.user, ['workflow:read']);

// We do not await for the test run to complete
void this.testRunnerService.runTest(req.user, Number(req.params.id), workflowIds);
void this.testRunnerService.runTest(req.user, testDefinitionId, workflowIds);

return { success: true };
}
Expand Down

0 comments on commit edfd983

Please sign in to comment.