aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-03-27 08:17:34 +0000
committerGerrit Code Review <gerrit@onap.org>2023-03-27 08:17:34 +0000
commit209082fed03f8e710f81c62c31600346724d9b3d (patch)
tree78d459d65f9f5e1450900a08bde771ea1da4e7bf
parent0b8d85da2003f6e9f56b0c2b6cb0b07d6c42181b (diff)
parentaaf1a809ed48d0c6cf97d4ebbe14540dd218ef68 (diff)
Merge "Fixes for CM-handle de-registration test script"
-rwxr-xr-x.gitignore1
-rw-r--r--test-tools/.gitignore1
-rwxr-xr-xtest-tools/test-deregistration.sh19
3 files changed, 7 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 4f80c2b8a..fbd729606 100755
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,3 @@ tmp/
/docs/docs/
/docs/.vscode/
-/metrics-reports/
diff --git a/test-tools/.gitignore b/test-tools/.gitignore
new file mode 100644
index 000000000..28b8c3477
--- /dev/null
+++ b/test-tools/.gitignore
@@ -0,0 +1 @@
+/metrics-reports/
diff --git a/test-tools/test-deregistration.sh b/test-tools/test-deregistration.sh
index bf38e3b24..d0cbbf1d2 100755
--- a/test-tools/test-deregistration.sh
+++ b/test-tools/test-deregistration.sh
@@ -70,15 +70,14 @@ remove_handles_and_record_time() {
--location 'http://localhost:8883/ncmpInventory/v1/ch' \
--header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
--header 'Content-Type: application/json' \
- --header 'Cookie: JSESSIONID=node018g80wfn6qfk9yihx8pne7bc31.node0' \
--data @$REMOVE_REQUEST >> $REPORT_FILE
}
create_request_bodies() {
local CREATE_SIZE=$1
local REMOVE_SIZE=$2
- echo -n '{"dmiPlugin": "http://ncmp-dmi-plugin-stub:8783","createdCmHandles":[' > $CREATE_REQUEST
- echo -n '{"dmiPlugin": "http://ncmp-dmi-plugin-stub:8783","removedCmHandles":[' > $REMOVE_REQUEST
+ echo -n '{"dmiPlugin": "http://ncmp-dmi-plugin-stub:8080","createdCmHandles":[' > $CREATE_REQUEST
+ echo -n '{"dmiPlugin": "http://ncmp-dmi-plugin-stub:8080","removedCmHandles":[' > $REMOVE_REQUEST
for i in $(seq 1 $CREATE_SIZE); do
local CMHANDLE=$(uuidgen | tr -d '-')
echo -n "{\"cmHandle\": \"$CMHANDLE\",\"cmHandleProperties\":{\"neType\":\"RadioNode\"}}" \
@@ -141,22 +140,16 @@ test_deregistration() {
cleanup() {
rm -f "$CREATE_REQUEST" "$REMOVE_REQUEST"
stop_docker
+ popd
}
trap cleanup EXIT
+pushd -- "$(dirname -- "${BASH_SOURCE[0]}")"
+
mkdir -p $(dirname $REPORT_FILE)
echo -e "Removed\tTotal\tTime" > $REPORT_FILE
-# Delete N/N: 100/100, 200/200... 20000/20000
-for number_to_delete in 100 200 300 400 500 600 700 800 900 1000 2000 3000 4000 5000 10000 15000 20000; do
+for number_to_delete in 100 500 1000 5000 10000 20000; do
test_deregistration $number_to_delete $number_to_delete
done
-# Delete N/C: 1000/5000, 2000/5000... 5000/5000
-for number_to_delete in 1000 2000 3000 4000 5000; do
- test_deregistration $number_to_delete 5000
-done
-# Delete C/N: 1000/1000, 1000/2000... 1000/5000
-for total in 1000 2000 3000 4000 5000; do
- test_deregistration 1000 $total
-done