From 9ec6a0db5ad60c9aefb42db40dca4c64d95b2341 Mon Sep 17 00:00:00 2001 From: Puneet Kala Date: Mon, 28 Oct 2024 13:13:15 +0530 Subject: [PATCH] Handle Versions Update pmm-framework.sh (#744) --- pmm-tests/pmm-framework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmm-tests/pmm-framework.sh b/pmm-tests/pmm-framework.sh index 0f059cab..eeb1a6ec 100755 --- a/pmm-tests/pmm-framework.sh +++ b/pmm-tests/pmm-framework.sh @@ -1730,7 +1730,7 @@ add_clients(){ modb_service_name=$(prepare_service_name mongodb_node_$j) docker run -d -p $MODB_PORT:27017 -v /tmp/modb_${MODB_PORT}/:/tmp/ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=${MODB_PASSWORD} -e UMASK=0777 --name $modb_service_name mongo:${modb_version} sleep 20 - if [ "${modb_version}" -gt "5" ]; then + if (( $(echo "$modb_version > 5" | bc -l) )); then docker exec $modb_service_name mongosh -u mongoadmin -p ${MODB_PASSWORD} --eval 'db.setProfilingLevel(2)' docker cp $SCRIPT_PWD/mongodb_user_setup.js $modb_service_name:/ docker exec $modb_service_name mongosh -u mongoadmin -p ${MODB_PASSWORD} mongodb_user_setup.js