maven-index-exporter: Update tests to check the image behavior
This splits the current test image script in 2:
- one to (locally) build and test the image
- one to only test the image
This introduces a Makefile to trigger simple test targets intended to be used by the ci.
As an implementation (and gory) detail, this opens a conditional within the python
script to not do anything during the download phase when the base url starts with
test://. While i'm not a fan, it's simple enough to allow this make test
to work
without too much complication.
Related to swh/infra/sysadm-environment#3746 (closed) Depends on !4 (closed)
Test Plan
$ time make test # or from top-level, make -C tests test
./test_image.sh
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has been created.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has 10 docs.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has 35 fields.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has sprova4j-0.1.0-sources.jar.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has sprova4j-0.1.0.pom.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has sprova4j-0.1.1-sources.jar.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/repository_test/export/_1.fld] has sprova4j-0.1.1.pom.
PASS: file [/home/tony/work/inria/repo/swh/maven-index-exporter/tests/publish/export.fld] exists.
make test 0.04s user 0.02s system 4% cpu 1.236 total
Migrated from D7509 (view on Phabricator)