-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (26 loc) · 1.32 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ifndef DOCKER_COMPOSE
DOCKER_COMPOSE := $(shell command -v docker-compose 2> /dev/null)
endif
ifndef DOCKER_COMPOSE
DOCKER_COMPOSE := docker compose
endif
build:
rm -rf tests/identity
cp -rp identity tests/
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml --profile test build
run:
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml up &
for i in $$( seq 1 10 ) ; do docker logs django-identity-external_setup_1 2>&1 | grep '^OK /setup' && break ; sleep 5 ; done
restart-app:
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml exec -T app cp /var/www/django/project/db.sqlite3.initial /var/www/django/project/db.sqlite3
test:
tests/test.pl http://www:8079/admin bob 'bobovo heslo' djadmin djnimda david 'davidovo heslo'
$(MAKE) restart-app
tests/test.pl http://www:8080/admin bob 'bobovo heslo' djadmin djnimda david 'davidovo heslo'
test-client-container:
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml --profile test run -T test-client-saml
$(MAKE) restart-app
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml --profile test run -T test-client-openidc
stop:
$(DOCKER_COMPOSE) -p django-identity-external -f tests/podman-compose.yml down -v
.PHONY: build run restart-app test test-client-container stop