summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
diff options
context:
space:
mode:
authorDaniel Hanrahan <daniel.hanrahan@est.tech>2024-05-28 10:16:20 +0000
committerGerrit Code Review <gerrit@onap.org>2024-05-28 10:16:20 +0000
commit1e4bf345c21586491ee4767ed9f44de22a99a8c2 (patch)
tree3a660fba69b3d44331c709ccc0e489fd1b22b970 /k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
parentc69ce470ecabedc9df59b9a9d3888338850fd502 (diff)
parent0613fbd654bacb9324e07bb2f9f4244302c48aaa (diff)
Merge "Print summary report for K6 tests"
Diffstat (limited to 'k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js')
-rw-r--r--k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js b/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
index 04a5c21dd6..4ecadde2b4 100644
--- a/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
+++ b/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
@@ -20,18 +20,18 @@
import http from 'k6/http';
import { sleep, fail } from 'k6';
-import { NCMP_BASE_URL, TOTAL_CM_HANDLES } from './utils.js';
+import { makeCustomSummaryReport, NCMP_BASE_URL, TOTAL_CM_HANDLES } from './utils.js';
export const options = {
- vus: 1,
- iterations: 1,
- thresholds: {
- http_req_failed: ['rate == 0'],
- iteration_duration: ['max <= 300_000'], // 5 minutes
- },
+ vus: 1,
+ iterations: 1,
+ thresholds: {
+ http_req_failed: ['rate == 0'],
+ iteration_duration: ['max <= 300_000'], // 5 minutes
+ },
};
-export default function() {
+export default function () {
waitForCmHandlesToBeReady(TOTAL_CM_HANDLES);
}
@@ -62,3 +62,9 @@ function getNumberOfReadyCmHandles() {
const cmHandles = jsonData[0]["dmi-reg:dmi-registry"]["cm-handles"];
return cmHandles.filter(cmhandle => cmhandle['state']['cm-handle-state'] === 'READY').length;
}
+
+export function handleSummary(data) {
+ return {
+ stdout: makeCustomSummaryReport(data, options),
+ };
+} \ No newline at end of file