Skip to content

Commit f130d22

Browse files
committed
tidying test stuff
* rename workflow to a more meaningful name * move docker stuff to tests folder as it is directly connected with testing
1 parent 95fd902 commit f130d22

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: push
33

44
jobs:
55
test:
6-
name: run tests
6+
name: end to end tests
77
runs-on: ubuntu-latest
88
services:
99
database:
@@ -44,15 +44,15 @@ jobs:
4444
PHPIPAM_APPID: "ansible"
4545
PHPIPAM_USERNAME: "admin"
4646
PHPIPAM_PASSWORD: "ipamadmin"
47-
# - name: "waiting for database to come online"
48-
# run: |
49-
# for i in `seq 1 10`;
50-
# do
51-
# nc -z 127.0.0.1 3306 && echo Success && exit 0
52-
# echo -n .
53-
# sleep 1
54-
# done
55-
# echo Failed waiting for MySQL && exit 1
47+
- name: "waiting for database to come online"
48+
run: |
49+
for i in `seq 1 10`;
50+
do
51+
nc -z 127.0.0.1 3306 && echo Success && exit 0
52+
echo -n .
53+
sleep 1
54+
done
55+
echo Failed waiting for MySQL && exit 1
5656
- name: load data into database
5757
run: |
5858
mysql -h 127.0.0.1 -u phpipam -pphpipamadmin phpipam < phpipam/db/SCHEMA.sql
@@ -62,12 +62,12 @@ jobs:
6262
- name: add api key for tests
6363
run: |
6464
mysql -h 127.0.0.1 -u phpipam -pphpipamadmin phpipam --execute="INSERT INTO api (app_id, app_code, app_permissions, app_security, app_lock_wait) VALUES ('ansible','aAbBcCdDeEfF00112233445566778899',2,'ssl_token',0);"
65-
- name: run single test
65+
- name: run example setup
6666
run: |
6767
make test-example_setup
6868
env:
6969
PHPIPAM_VALIDATE_CERTS: false
70-
- name: run tests
70+
- name: run playbook tests
7171
run: |
7272
make test-all
7373
env:

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ clean:
6565
find . -name '*~' -exec rm -f {} +
6666
find . -name '__pycache__' -exec rm -rf {} +
6767
find . -name '*.tar.gz' -delete
68-
docker-compose -f docker/docker-compose.yml stop
69-
docker-compose -f docker/docker-compose.yml rm --force
68+
docker-compose -f tests/docker/docker-compose.yml stop
69+
docker-compose -f tests/docker/docker-compose.yml rm --force
7070

7171
doc-setup:
7272
pip install -r docs/requirements.txt
@@ -92,9 +92,9 @@ install-deps:
9292
pip install -r requirements-dev.txt
9393

9494
setup-phpipam: test-setup
95-
docker-compose -f docker/docker-compose.yml up -d
95+
docker-compose -f tests/docker/docker-compose.yml up -d
9696
sleep 30
97-
docker/setup_database.sh
97+
tests/docker/setup_database.sh
9898

9999
FORCE:
100100

0 commit comments

Comments
 (0)