File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,9 +118,17 @@ status: check-fleet
118118stop : check-fleet
119119 $(FLEETCTL ) stop -block-attempts=600 $(strip $(call deis_units,launched,active) )
120120
121+ test : .PHONY
122+ @$(foreach C,$(ALL_COMPONENTS ) , \
123+ echo \\ nTesting deis/$(C ) ; \
124+ $(MAKE ) -C $(C ) test ; \
125+ )
126+
121127tests :
122128 cd test && bundle install && bundle exec rake
123129
124130uninstall : check-fleet stop
125131 $(FLEETCTL ) unload $(call deis_units,launched,.)
126132 $(FLEETCTL ) destroy $(strip $(call deis_units,.,.) )
133+
134+ .PHONY :
Original file line number Diff line number Diff line change @@ -26,3 +26,11 @@ clean: uninstall
2626
2727full-clean : clean
2828 $(call ssh_all,'sudo docker rmi deis/builder')
29+
30+ test : test-unit test-functional
31+
32+ test-unit :
33+ @echo no unit tests
34+
35+ test-functional :
36+ @echo no functional tests
Original file line number Diff line number Diff line change @@ -26,3 +26,11 @@ clean: uninstall
2626
2727full-clean : clean
2828 $(call ssh_all,'sudo docker rmi deis/cache')
29+
30+ test : test-unit test-functional
31+
32+ test-unit :
33+ @echo no unit tests
34+
35+ test-functional :
36+ @echo no functional tests
Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ clean: uninstall
3131full-clean : clean
3232 $(call ssh_all,'sudo docker rmi deis/controller')
3333
34- test :
35- python manage.py test --noinput api
36-
3734runserver :
3835 python manage.py runserver
3936
@@ -46,3 +43,13 @@ coverage:
4643
4744flake8 :
4845 flake8
46+
47+ test : test-unit test-functional
48+
49+ test-unit :
50+ @if [ ! -d venv ]; then virtualenv venv; fi
51+ venv/bin/pip install -q -r requirements.txt
52+ venv/bin/python manage.py test --noinput api
53+
54+ test-functional :
55+ @echo no functional tests
Original file line number Diff line number Diff line change @@ -26,3 +26,11 @@ clean: uninstall
2626
2727full-clean : clean
2828 $(call ssh_all,'sudo docker rmi deis/database')
29+
30+ test : test-unit test-functional
31+
32+ test-unit :
33+ @echo no unit tests
34+
35+ test-functional :
36+ @echo no functional tests
Original file line number Diff line number Diff line change @@ -26,3 +26,11 @@ clean: uninstall
2626
2727full-clean : clean
2828 $(call ssh_all,'sudo docker rmi deis/logger')
29+
30+ test : test-unit test-functional
31+
32+ test-unit :
33+ @echo no unit tests
34+
35+ test-functional :
36+ go test -v ./...
Original file line number Diff line number Diff line change 1+ # test-unit temporary files
2+ test-unit /
Original file line number Diff line number Diff line change @@ -26,3 +26,21 @@ clean: uninstall
2626
2727full-clean : clean
2828 $(call ssh_all,'sudo docker rmi deis/registry')
29+
30+ test : test-unit test-functional
31+
32+ test-unit : .PHONY
33+ @if [ ! -d test-unit ]; then \
34+ git clone -b 0.6.8 https://github.com/dotcloud/docker-registry test-unit; \
35+ fi
36+ @if [ ! -d venv ]; then virtualenv venv; fi
37+ venv/bin/pip install -q -r test-unit/requirements.txt
38+ venv/bin/pip install -q -r test-unit/test-requirements.txt
39+ cd test-unit && \
40+ DOCKER_REGISTRY_CONFIG=config_test.yml SETTINGS_FLAVOR=test PYTHONPATH=test \
41+ ../venv/bin/python -m unittest discover -s test
42+
43+ test-functional :
44+ @echo no functional tests
45+
46+ .PHONY :
Original file line number Diff line number Diff line change @@ -42,3 +42,11 @@ clean: uninstall
4242
4343full-clean : clean
4444 $(call ssh_all,'sudo docker rmi deis/router')
45+
46+ test : test-unit test-functional
47+
48+ test-unit :
49+ @echo no unit tests
50+
51+ test-functional :
52+ @echo no functional tests
You can’t perform that action at this time.
0 commit comments