From 39e43a7a74ce678b7ddcdc514fc48018ed525084 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Tue, 29 Dec 2020 13:57:51 +0100 Subject: [PATCH] Remove the requirement on docker-compose for running tests Besides simplifying the setup it also has the nice side-effect of being able to override the docker image on the command line: $ make test IMAGE=foobar --- .github/CONTRIBUTING.md | 2 +- Makefile | 8 ++------ docker-compose.yml | 7 ------- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 docker-compose.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 23d1d9a..392a24d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -207,7 +207,7 @@ these principles when making changes. ``` 4. Verify you can run the test harness. _(This will require dependencies: - `make`, `docker`, and `docker-compose`)_. + `make` and `docker`)_. ```text $ make test diff --git a/Makefile b/Makefile index 9154355..1a5cfc4 100644 --- a/Makefile +++ b/Makefile @@ -93,12 +93,8 @@ test: cd /yadm && \ py.test -v $(testargs); \ else \ - if command -v "docker-compose" > /dev/null 2>&1; then \ - docker-compose run --rm testbed make test testargs="$(testargs)"; \ - else \ - echo "Sorry, this make test requires docker-compose to be installed."; \ - false; \ - fi \ + $(MAKE) -s require-docker && \ + docker run --rm -it -v "$(CURDIR):/yadm:ro" $(IMAGE) make test testargs="$(testargs)"; \ fi .PHONY: testhost diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 2247667..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -version: '3' -services: - testbed: - volumes: - - .:/yadm:ro - image: yadm/testbed:2020-12-21