Skip to content

Commit

Permalink
tests: improve test scenarios
Browse files Browse the repository at this point in the history
remove reload file for interactive tests
  • Loading branch information
sni committed Apr 8, 2024
1 parent 5c42337 commit aa8a2e2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions t/scenarios/_common/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,20 @@ extra_failed_test:
ifdef INTERACTIVE
non_interactive_only:
exit 1
remove_interactive_only_reload_file:
@echo "### $@: $$(date "+%FT%T.%N")"
@for svc in $$(docker compose config --services | sort); do \
index=0; \
for container in $$(docker compose ps -q $$svc); do \
index=$$(( index + 1 )); \
docker exec -t --user root $$container rm -f /opt/omd/sites/demo/.THRUK_RESTARTER_DISABLED; \
done; \
done
else
non_interactive_only:
:
remove_interactive_only_reload_file:
:
endif

server:
Expand All @@ -124,10 +135,10 @@ server:
web:
@python3 -m webbrowser ${PLACK_TEST_EXTERNALSERVER_URI}thruk/

preprepare:
preparepre:

prepare: base_images
$(MAKE) preprepare
$(MAKE) preparepre
@echo "### $@: $$(date "+%FT%T.%N")"
docker compose build
docker compose up --remove-orphans -d
Expand All @@ -142,6 +153,7 @@ prepare: base_images
@echo "### $@: $$(date "+%FT%T.%N")"
$(MAKE) extra_prepare
@echo "### $@: $$(date "+%FT%T.%N")"
$(MAKE) remove_interactive_only_reload_file

clean:
@echo "### $@: $$(date "+%FT%T.%N")"
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/agents-plugin/http-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/consol/omd-labs-docker/omd-labs-rocky:nightly
FROM local/thruk-labs-rocky:nightly

COPY playbook.yml /root/ansible_dropin/
ENV ANSIBLE_ROLES_PATH /thruk/t/scenarios/_common/ansible/roles
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/agents-plugin/livestatus-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/consol/omd-labs-docker/omd-labs-rocky:nightly
FROM local/thruk-labs-rocky:nightly

COPY playbook.yml /root/ansible_dropin/
ENV ANSIBLE_ROLES_PATH /thruk/t/scenarios/_common/ansible/roles
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/agents-plugin/omd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/consol/omd-labs-docker/omd-labs-rocky:nightly
FROM local/thruk-labs-rocky:nightly

COPY playbook.yml /root/ansible_dropin/
ENV ANSIBLE_ROLES_PATH /thruk/t/scenarios/_common/ansible/roles
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/citest/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../_common/Makefile.common

preprepare:
preparepre:
cp -p ../../../.ci/prepare_machine.sh citest/
wget https://raw.githubusercontent.com/abbbi/github-actions-tune/master/speedup.sh -O citest/speedup.sh
chmod 755 citest/speedup.sh
Expand Down

0 comments on commit aa8a2e2

Please sign in to comment.