summaryrefslogtreecommitdiffstats
path: root/k6-tests
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2024-08-14 14:25:33 +0100
committeremaclee <lee.anjella.macabuhay@est.tech>2024-08-14 15:26:45 +0100
commitf11aad9f7e2035ce174e486773a98fcc910e0930 (patch)
treeae43b0ba4560d2a45a6177d5755e64a2c2d52933 /k6-tests
parentc3fb2570df38b7d802c7eef22fcb213e80d8d639 (diff)
Add moduleSetTag on k6 test
Issue-ID: CPS-2357 Change-Id: I21b980b1e36988d3b5daf07e4f6a14fe4309cd20 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Diffstat (limited to 'k6-tests')
-rw-r--r--k6-tests/ncmp/common/cmhandle-crud.js5
-rw-r--r--k6-tests/ncmp/common/utils.js1
2 files changed, 4 insertions, 2 deletions
diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
index 6eb1923d39..fa99270f39 100644
--- a/k6-tests/ncmp/common/cmhandle-crud.js
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -20,7 +20,7 @@
import http from 'k6/http';
import { check, sleep } from 'k6';
-import { NCMP_BASE_URL, DMI_PLUGIN_URL, TOTAL_CM_HANDLES, REGISTRATION_BATCH_SIZE, CONTENT_TYPE_JSON_PARAM, makeBatchOfCmHandleIds } from './utils.js';
+import { NCMP_BASE_URL, DMI_PLUGIN_URL, TOTAL_CM_HANDLES, MODULE_SET_TAGS, REGISTRATION_BATCH_SIZE, CONTENT_TYPE_JSON_PARAM, makeBatchOfCmHandleIds } from './utils.js';
import { executeCmHandleIdSearch } from './search-base.js';
export function registerAllCmHandles() {
@@ -44,9 +44,10 @@ function createCmHandles(cmHandleIds) {
const url = `${NCMP_BASE_URL}/ncmpInventory/v1/ch`;
const payload = {
"dmiPlugin": DMI_PLUGIN_URL,
- "createdCmHandles": cmHandleIds.map(cmHandleId => ({
+ "createdCmHandles": cmHandleIds.((cmHandleId, index) => ({
"cmHandle": cmHandleId,
"alternateId": `alt-${cmHandleId}`,
+ "moduleSetTag": MODULE_SET_TAGS[index % MODULE_SET_TAGS.length],
"cmHandleProperties": {"neType": "RadioNode"},
"publicCmHandleProperties": {
"Color": "yellow",
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index b0e39c0867..58c958dce0 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -28,6 +28,7 @@ export const CONTENT_TYPE_JSON_PARAM = { headers: {'Content-Type': 'application/
export const DATA_OPERATION_READ_BATCH_SIZE = 200;
export const TOPIC_DATA_OPERATIONS_BATCH_READ = 'topic-data-operations-batch-read';
export const KAFKA_BOOTSTRAP_SERVERS = ['localhost:9092'];
+export const MODULE_SET_TAGS = ['tagA','tagB','tagC',' tagD']
export function recordTimeInSeconds(functionToExecute) {
const startTimeInMillis = Date.now();