diff options
author | 2025-01-17 16:40:43 +0000 | |
---|---|---|
committer | 2025-01-17 16:40:43 +0000 | |
commit | 5dca9700c5cd7feff013195cfc3992b1e3f9d7eb (patch) | |
tree | b4278777b3cc26015d0ee6d159cbb7e2bfe23c05 /k6-tests/ncmp/common/passthrough-crud.js | |
parent | 1f8e0369f4eb540ee98bf86a374fe757529a7c30 (diff) | |
parent | e7492d1818605845a550581bb9a9e43254e46722 (diff) |
Merge "Realistic Examples: K6 Test-ware"
Diffstat (limited to 'k6-tests/ncmp/common/passthrough-crud.js')
-rw-r--r-- | k6-tests/ncmp/common/passthrough-crud.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/k6-tests/ncmp/common/passthrough-crud.js b/k6-tests/ncmp/common/passthrough-crud.js index 86fcef6242..251ddf8890 100644 --- a/k6-tests/ncmp/common/passthrough-crud.js +++ b/k6-tests/ncmp/common/passthrough-crud.js @@ -29,7 +29,7 @@ import { export function passthroughRead(useAlternateId) { const cmHandleReference = getRandomCmHandleReference(useAlternateId); - const resourceIdentifier = 'my-resource-identifier'; + const resourceIdentifier = 'NRCellDU/attributes/cellLocalId'; const datastoreName = 'ncmp-datastore:passthrough-operational'; const includeDescendants = true; const url = generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants); @@ -38,11 +38,14 @@ export function passthroughRead(useAlternateId) { export function passthroughWrite(useAlternateId) { const cmHandleReference = getRandomCmHandleReference(useAlternateId); - const resourceIdentifier = 'my-resource-identifier'; + const resourceIdentifier = 'NRCellDU/attributes/cellLocalId'; const datastoreName = 'ncmp-datastore:passthrough-running'; const includeDescendants = false; const url = generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants); - const payload = JSON.stringify({"neType": "BaseStation"}); + const payload = JSON.stringify({ + "id": "123", + "attributes": {"userLabel": "test"} + }); return performPostRequest(url, payload, 'passthroughWrite'); } @@ -51,10 +54,10 @@ export function legacyBatchRead(cmHandleIds) { const payload = JSON.stringify({ "operations": [ { - "resourceIdentifier": "parent/child", + "resourceIdentifier": "NRCellDU/attributes/cellLocalId", "targetIds": cmHandleIds, "datastore": "ncmp-datastore:passthrough-operational", - "options": "(fields=schemas/schema)", + "options": "(fields=NRCellDU/attributes/cellLocalId)", "operationId": "12", "operation": "read" } @@ -64,8 +67,8 @@ export function legacyBatchRead(cmHandleIds) { } function getRandomCmHandleReference(useAlternateId) { - const prefix = useAlternateId ? 'alt' : 'ch'; - return `${prefix}-${randomIntBetween(1, TOTAL_CM_HANDLES)}`; + const prefix = useAlternateId ? 'Subnetwork=Europe,ManagedElement=' : 'ch-'; + return `${prefix}${randomIntBetween(1, TOTAL_CM_HANDLES)}`; } function generatePassthroughUrl(cmHandleReference, datastoreName, resourceIdentifier, includeDescendants) { |