summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/10-mixed-load-test.js
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2024-06-06 20:43:21 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-06-06 20:43:21 +0100
commit0e006004acf07ee044c9a4c258cee5518ffd0988 (patch)
treebccdc93713c756dbb5327fdd4773bfc6f4fc16ee /k6-tests/ncmp/10-mixed-load-test.js
parent43d0451a27311e4154536a66cb22eb4d68a21e7a (diff)
[k6] Refactor k6 tests for CM handle searches
A cleanup of the k6 tests to avoid code duplication Issue-ID: CPS-2208 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If1e58ee87300cd28ed72b365d9a86e2709dc6c13
Diffstat (limited to 'k6-tests/ncmp/10-mixed-load-test.js')
-rw-r--r--k6-tests/ncmp/10-mixed-load-test.js22
1 files changed, 3 insertions, 19 deletions
diff --git a/k6-tests/ncmp/10-mixed-load-test.js b/k6-tests/ncmp/10-mixed-load-test.js
index 829219b4e5..4bb0297d63 100644
--- a/k6-tests/ncmp/10-mixed-load-test.js
+++ b/k6-tests/ncmp/10-mixed-load-test.js
@@ -21,7 +21,7 @@
import http from 'k6/http';
import { check } from 'k6';
import { NCMP_BASE_URL, getRandomCmHandleId, makeCustomSummaryReport } from './utils.js'
-import { searchRequest } from './search-base.js';
+import { executeCmHandleSearch, executeCmHandleIdSearch } from './search-base.js';
export const options = {
scenarios: {
@@ -66,27 +66,11 @@ export function passthrough_read() {
}
export function id_search_module() {
- const search_filter = {
- "cmHandleQueryParameters": [
- {
- "conditionName": "hasAllModules",
- "conditionParameters": [{"moduleName": "ietf-yang-types-1"}]
- }
- ]
- };
- searchRequest('id-searches', JSON.stringify(search_filter));
+ executeCmHandleIdSearch('module');
}
export function cm_search_module() {
- const search_filter = {
- "cmHandleQueryParameters": [
- {
- "conditionName": "hasAllModules",
- "conditionParameters": [{"moduleName": "ietf-yang-types-1"}]
- }
- ]
- };
- searchRequest('searches', JSON.stringify(search_filter));
+ executeCmHandleSearch('module');
}
export function handleSummary(data) {