Skip to content

Commit beda1fd

Browse files
ToreMerkelyclaude
andauthored
Makefile: fixed setup_test_to_use_xxx to only clean up the cli containers and not all containers (#837)
* fix(make): scope setup_test_to_use_local_image cleanup to the compose stack The previous target ran `docker ps -aq | xargs -r docker rm -fv`, which force-removes EVERY container on the host — not just the kosli test stack defined in docker-compose.yml. That's a footgun for anyone running unrelated containers (other projects, dev DBs, sidecar tools) on the same machine. `docker compose down -v` only touches the project's own containers plus its named volumes — exactly what's needed when switching to a locally-built server image. Same approach already used by bin/reset-or-start-server.sh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(make): scope setup_test_to_use_staging_server_image cleanup to the compose stack Same broad-cleanup footgun as setup_test_to_use_local_image fixed in the previous commit — `docker ps -aq | xargs -r docker rm -fv` force- removes EVERY container on the host. Replaced with `docker compose down -v`, which only touches the project's own compose stack. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 346ca39 commit beda1fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ test_setup_restart_server: ensure_gotestsum
108108

109109
setup_test_to_use_local_image:
110110
@echo merkely > /tmp/server-image.txt
111-
@docker ps -aq | xargs -r docker rm -fv
111+
@docker compose down -v
112112
@echo "Run make build in the server repo you want to use"
113113
@echo "Then run make test_integration"
114114
@echo "To look at the logs from local kosli server run: make follow_integration_test_server"
115115

116116
setup_test_to_use_staging_server_image:
117117
@rm /tmp/server-image.txt
118-
@docker ps -aq | xargs -r docker rm -fv
118+
@docker compose down -v
119119
@echo "Now run make test_integration"
120120
@echo "To look at the logs from kosli server run: make follow_integration_test_server"
121121

0 commit comments

Comments
 (0)