Open sevein opened 7 years ago
I've been staring at the second docker command for ages but I still can't see a difference. Did you paste the wrong thing? The two commands look identical!
Hahaha! Sorry, I totally forgot to update it! Done now, thanks!
Something like the following should work now and --user=root
shouldn't be needed anymore after #25 being merged. This could be added to the Makefile
in our Compose environment.
test-storage-service:
docker-compose run \
--workdir /src \
--rm --no-deps \
--entrypoint py.test \
-e "DJANGO_SETTINGS_MODULE=storage_service.settings.test" \
archivematica-storage-service
Preferably we should use tox as the entrypoint, that's something we should try. If you do that, you don't need to worry about setting DJANGO_SETTINGS_MODULE
. It'd also be nice if we could pass arguments to tox. E.g. as a developer I always do things like this: tox -e py36 -- -x
where -x
is passed down to py.test.
Once #7 is merged and you've built the Docker image (
docker build -t ss .
) you can run the test suite with:But I think we should relax the requirements of
storage_service.settings.test
so we can just do:It also should not require
root
, which is an easy fix. The problem is that pytest is trying to create the.cache
folder in the source directory which is not owned byarchivematica
.