From 745690081b7eb21e12f7166b4bff5ea94b9cb83a Mon Sep 17 00:00:00 2001 From: secwall Date: Fri, 5 Apr 2024 10:55:47 +0200 Subject: [PATCH] Fix containers names for new compose --- Makefile | 20 ++++++++++---------- tests/images/jepsen/save_logs.sh | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index ec9c34f..1e997e7 100644 --- a/Makefile +++ b/Makefile @@ -47,13 +47,13 @@ start_sentinel_env: base_image redis/src/redis-server cmd/rdsync/rdsync recreate rm -rf ./tests/images/redis/redis-senticache && cp redis/src/redis-senticache ./tests/images/redis/redis-senticache rm -rf ./tests/images/redis/redis-cli && cp redis/src/redis-cli ./tests/images/redis/redis-cli docker compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build - timeout 600 docker exec rdsync_zoo1_1 setup_zk.sh - timeout 600 docker exec rdsync_redis1_1 setup_sentinel.sh - timeout 600 docker exec rdsync_redis2_1 setup_sentinel.sh redis1 - timeout 600 docker exec rdsync_redis3_1 setup_sentinel.sh redis1 + timeout 600 docker exec rdsync-zoo1-1 setup_zk.sh + timeout 600 docker exec rdsync-redis1-1 setup_sentinel.sh + timeout 600 docker exec rdsync-redis2-1 setup_sentinel.sh redis1 + timeout 600 docker exec rdsync-redis3-1 setup_sentinel.sh redis1 run_jepsen_sentinel_test: recreate_logs start_sentinel_env - (docker exec rdsync_jepsen_1 /root/jepsen/run.sh >tests/logs/jepsen.log 2>&1 && tail -n 4 tests/logs/jepsen.log) || ./tests/images/jepsen/save_logs.sh + (docker exec rdsync-jepsen-1 /root/jepsen/run.sh >tests/logs/jepsen.log 2>&1 && tail -n 4 tests/logs/jepsen.log) || ./tests/images/jepsen/save_logs.sh jepsen_sentinel_test: run_jepsen_sentinel_test clean @@ -63,13 +63,13 @@ start_cluster_env: base_image redis/src/redis-server cmd/rdsync/rdsync recreate_ rm -rf ./tests/images/redis/redis-senticache && cp redis/src/redis-senticache ./tests/images/redis/redis-senticache rm -rf ./tests/images/redis/redis-cli && cp redis/src/redis-cli ./tests/images/redis/redis-cli docker compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build - timeout 600 docker exec rdsync_zoo1_1 setup_zk.sh - timeout 600 docker exec rdsync_redis1_1 setup_cluster.sh - timeout 600 docker exec rdsync_redis2_1 setup_cluster.sh redis1 - timeout 600 docker exec rdsync_redis3_1 setup_cluster.sh redis1 + timeout 600 docker exec rdsync-zoo1-1 setup_zk.sh + timeout 600 docker exec rdsync-redis1-1 setup_cluster.sh + timeout 600 docker exec rdsync-redis2-1 setup_cluster.sh redis1 + timeout 600 docker exec rdsync-redis3-1 setup_cluster.sh redis1 run_jepsen_cluster_test: recreate_logs start_cluster_env - (docker exec rdsync_jepsen_1 /root/jepsen/run.sh >tests/logs/jepsen.log 2>&1 && tail -n 4 tests/logs/jepsen.log) || ./tests/images/jepsen/save_logs.sh + (docker exec rdsync-jepsen-1 /root/jepsen/run.sh >tests/logs/jepsen.log 2>&1 && tail -n 4 tests/logs/jepsen.log) || ./tests/images/jepsen/save_logs.sh jepsen_cluster_test: run_jepsen_cluster_test clean diff --git a/tests/images/jepsen/save_logs.sh b/tests/images/jepsen/save_logs.sh index 7698f02..5f95ac8 100755 --- a/tests/images/jepsen/save_logs.sh +++ b/tests/images/jepsen/save_logs.sh @@ -8,10 +8,10 @@ do for logfile in /var/log/rdsync.log /var/log/redis/server.log /var/log/redis/senticache.log /var/log/supervisor.log do logname=$(echo "${logfile}" | rev | cut -d/ -f1 | rev) - docker exec rdsync_redis${i}_1 cat "${logfile}" > "tests/logs/redis${i}/${logname}" + docker exec rdsync-redis${i}-1 cat "${logfile}" > "tests/logs/redis${i}/${logname}" done - docker exec rdsync_zoo${i}_1 cat /var/log/zookeeper/zookeeper.log > tests/logs/zookeeper${i}/zookeeper.log 2>&1 + docker exec rdsync-zoo${i}-1 cat /var/log/zookeeper/zookeeper.log > tests/logs/zookeeper${i}/zookeeper.log 2>&1 done tail -n 18 tests/logs/jepsen.log