From 5f00f0cff15d7db8bb6511e8fd6d382a1de756eb Mon Sep 17 00:00:00 2001 From: "halil.cakal" Date: Mon, 17 Feb 2025 10:15:59 +0000 Subject: [PATCH] Enable the container logs and disable the container restart for cps-and-ncmp Issue-ID: CPS-2643 Change-Id: I57ba18dcaa71f4c2c5d985e9c870569e40d26880 Signed-off-by: halil.cakal --- docker-compose/docker-compose.yml | 2 +- k6-tests/teardown.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 274799679f..cc01c1b645 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -79,7 +79,7 @@ services: JAVA_TOOL_OPTIONS: "-XX:InitialRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0" ### DEBUG: Uncomment next line to enable java debugging # JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 - restart: unless-stopped + restart: no depends_on: - dbpostgresql deploy: diff --git a/k6-tests/teardown.sh b/k6-tests/teardown.sh index c3233919dc..10db7ac7e0 100755 --- a/k6-tests/teardown.sh +++ b/k6-tests/teardown.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2024 Nordix Foundation. +# Copyright 2024-2025 Nordix Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,6 +18,12 @@ echo '================================== docker info ==========================' docker ps -a +echo '================================== CPS-NCMP Logs ========================' +for CONTAINER_ID in $(docker ps --filter "name=cps-and-ncmp" --format "{{.ID}}"); do + echo "CPS-NCMP Logs for container: $CONTAINER_ID" + docker logs "$CONTAINER_ID" +done + testProfile=$1 docker_compose_shutdown_cmd="docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub --project-name $testProfile down --volumes" -- 2.16.6