diff options
author | halil.cakal <halil.cakal@est.tech> | 2024-11-06 15:05:22 +0000 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2024-11-18 12:24:04 +0000 |
commit | b685df03750be0ee1b9c55632dceedb7dbf4961a (patch) | |
tree | 1e2daa9df4c0ea4503e1b29230d4a960144b58e4 /k6-tests/setup.sh | |
parent | 37962e3faca4f2306546c4f70d480b0c323d2c68 (diff) |
Add new k6 test profile for running edurance tests
- assign a profile name to the existing k6 tests (kpi)
- add control which profile is run using k6 config file
- both test profiles can run in parallel
Issue-ID: CPS-2464
Change-Id: I9fea13f12e2da46bd55b4315c68209843c1abe06
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'k6-tests/setup.sh')
-rwxr-xr-x | k6-tests/setup.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/k6-tests/setup.sh b/k6-tests/setup.sh index a4508e180d..c794c64dd0 100755 --- a/k6-tests/setup.sh +++ b/k6-tests/setup.sh @@ -15,14 +15,20 @@ # limitations under the License. # -docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub up --quiet-pull -d +testProfile=$1 +echo "Spinning off the CPS and NCMP containers for $testProfile testing..." + +if [[ "$testProfile" == "endurance" ]]; then + docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub --project-name "$testProfile" --env-file ../docker-compose/config/endurance.env up --quiet-pull -d + CONTAINER_IDS=$(docker ps --filter "name=endurance-cps-and-ncmp" --format "{{.ID}}") +else + docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub --project-name "$testProfile" up --quiet-pull -d + CONTAINER_IDS=$(docker ps --filter "name=kpi-cps-and-ncmp" --format "{{.ID}}") +fi echo "Waiting for CPS to start..." READY_MESSAGE="Inventory Model updated successfully" -# Get the container IDs of the cps-and-ncmp replicas -CONTAINER_IDS=$(docker ps --filter "name=cps-and-ncmp" --format "{{.ID}}") - # Check the logs for each container for CONTAINER_ID in $CONTAINER_IDS; do echo "Checking logs for container: $CONTAINER_ID" |