Skip to content

Commit 351027f

Browse files
committed
fix(registry/tests): recreate venv and clean up temp dir
1 parent 07383e6 commit 351027f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

registry/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ full-clean: clean
3030
test: test-unit test-functional
3131

3232
test-unit:
33+
# Requires libevent-dev, libffi-dev, libpython-dev, libssl-dev, liblzma-dev on Ubuntu
3334
@if [ ! -d test-unit.tmp ]; then \
3435
git clone -b 0.6.8 https://github.com/dotcloud/docker-registry test-unit.tmp; \
3536
fi
36-
@if [ ! -d venv ]; then virtualenv venv; fi
37+
virtualenv venv
3738
venv/bin/pip install -q -r test-unit.tmp/requirements.txt
3839
venv/bin/pip install -q -r test-unit.tmp/test-requirements.txt
40+
@if [ -d /tmp/test ]; then \
41+
rm -rf /tmp/test; \
42+
fi
3943
cd test-unit.tmp && \
4044
DOCKER_REGISTRY_CONFIG=config_test.yml SETTINGS_FLAVOR=test PYTHONPATH=test \
4145
../venv/bin/python -m unittest discover -s test

0 commit comments

Comments
 (0)