Enable the container logs and disable the container restart for 37/140237/3
authorhalil.cakal <halil.cakal@est.tech>
Mon, 17 Feb 2025 10:15:59 +0000 (10:15 +0000)
committerhalil.cakal <halil.cakal@est.tech>
Mon, 17 Feb 2025 16:00:17 +0000 (16:00 +0000)
cps-and-ncmp

Issue-ID: CPS-2643

Change-Id: I57ba18dcaa71f4c2c5d985e9c870569e40d26880
Signed-off-by: halil.cakal <halil.cakal@est.tech>
docker-compose/docker-compose.yml
k6-tests/teardown.sh

index 2747996..cc01c1b 100644 (file)
@@ -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:
index c323391..10db7ac 100755 (executable)
@@ -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.
 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"