Skip to content

Commit

Permalink
Fix containers names for new compose
Browse files Browse the repository at this point in the history
  • Loading branch information
secwall committed Apr 5, 2024
1 parent 66aabf2 commit 7456900
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/images/jepsen/save_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7456900

Please sign in to comment.