From 9a810b9c2b413e9e6f6431b37bf787355b014b5a Mon Sep 17 00:00:00 2001 From: enudler Date: Tue, 1 Dec 2020 23:31:27 +0200 Subject: [PATCH] fix(reports): add tag param to reports (#551) --- docs/devguide/docs/swagger-docs.yaml | 5 ++++- docs/openapi3.yaml | 6 +++++- src/reports/models/reportsManager.js | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/devguide/docs/swagger-docs.yaml b/docs/devguide/docs/swagger-docs.yaml index 88f88e7d5..e978f67de 100644 --- a/docs/devguide/docs/swagger-docs.yaml +++ b/docs/devguide/docs/swagger-docs.yaml @@ -2563,6 +2563,9 @@ components: notes: type: string description: notes about the test + tag: + description: tag of the machine type/region that the job will run on (currently supported in aws fargate) + example: eu-west-1 config_body: additionalProperties: false properties: @@ -2843,4 +2846,4 @@ components: $ref: '#/components/schemas/webhook_format_types' url: type: string - description: Webhook url to post events \ No newline at end of file + description: Webhook url to post events diff --git a/docs/openapi3.yaml b/docs/openapi3.yaml index a122022c2..12f26857b 100644 --- a/docs/openapi3.yaml +++ b/docs/openapi3.yaml @@ -2575,6 +2575,7 @@ components: - start_time - end_time - duration_seconds + - tag properties: test_id: type: string @@ -2624,6 +2625,9 @@ components: notes: type: string description: notes about the test + tag: + description: tag of the machine type/region that the job will run on (currently supported in aws fargate) + example: eu-west-1 config_body: additionalProperties: false properties: @@ -2904,4 +2908,4 @@ components: $ref: '#/components/schemas/webhook_format_types' url: type: string - description: Webhook url to post events \ No newline at end of file + description: Webhook url to post events diff --git a/src/reports/models/reportsManager.js b/src/reports/models/reportsManager.js index 5261fe2c3..6012dcd83 100644 --- a/src/reports/models/reportsManager.js +++ b/src/reports/models/reportsManager.js @@ -95,7 +95,8 @@ module.exports.postReport = async (reportId, test, job, startTime) => { duration: job.duration, parallelism: job.parallelism || 1, max_virtual_users: job.max_virtual_users, - environment: job.environment + environment: job.environment, + tag: job.tag }; if (job.type === JOB_TYPE_FUNCTIONAL_TEST) { @@ -191,6 +192,7 @@ function getReportResponse(summaryRow, config) { ramp_to: testConfiguration.ramp_to, parallelism: testConfiguration.parallelism, max_virtual_users: testConfiguration.max_virtual_users, + tag: testConfiguration.tag, last_updated_at: summaryRow.last_updated_at, notes: summaryRow.notes, environment: testConfiguration.environment,