From ff68cc82006444645b9f51a826a090cfdfbf62ee3e9945c51e65b2d1d32b5b11 Mon Sep 17 00:00:00 2001 From: Andrii Nikitin Date: Mon, 23 Feb 2026 13:30:21 +0100 Subject: [PATCH 1/2] ci: Add integration test config --- .gitea/workflows/t.yaml | 51 +++++++++++++++++++++++++++++++++++++++++ integration/Makefile | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/t.yaml diff --git a/.gitea/workflows/t.yaml b/.gitea/workflows/t.yaml new file mode 100644 index 0000000..c697920 --- /dev/null +++ b/.gitea/workflows/t.yaml @@ -0,0 +1,51 @@ +name: Integration tests + +on: + push: + branches: ['main'] + pull_request: + workflow_dispatch: + +env: + HOME: /var/lib/gitea-runner + REPO_URL: http://src.opensuse.org//git-workflow/autogits.git + +jobs: + t: + runs-on: linux-x86_64 + steps: + - name: whoami + run: whoami + - name: pwd + run: pwd + - name: vars + run: | + set | grep GITEA_ + - name: Clone + run: | + git clone -q ${{ env.REPO_URL }} + - name: Checkout + run: | + echo ${{ gitea.ref }} + git fetch origin ${{ gitea.ref }} + git checkout FETCH_HEAD + working-directory: ./autogits + - name: Prepare binaries + run: make build + working-directory: ./autogits + - name: Prepare images + run: make build + working-directory: ./autogits/integration + - name: Make sure the pod is down + run: make down + working-directory: ./autogits/integration + - name: Start images + run: make up + working-directory: ./autogits/integration + - name: Run tests + run: py.test-3.11 -v tests + working-directory: ./autogits/integration + - name: Make sure the pod is down + run: make down + working-directory: ./autogits/integration + diff --git a/integration/Makefile b/integration/Makefile index 5047bdb..f2d381f 100644 --- a/integration/Makefile +++ b/integration/Makefile @@ -44,7 +44,7 @@ build_container: # Run tests in topology 1 test_container: - podman run --rm --privileged -t --network integration_gitea-network -e GIWTF_IMAGE_SUFFIX=$(GIWTF_IMAGE_SUFFIX) autogits_integration /usr/bin/bash -c "make build && make up && sleep 25 && pytest -v tests/*" + podman run --rm --privileged -t -e GIWTF_IMAGE_SUFFIX=$(GIWTF_IMAGE_SUFFIX) autogits_integration /usr/bin/bash -c "make build && make up && sleep 25 && pytest -v tests/*" build_local: AUTO_DETECT_MODE=.local -- 2.51.1 From 0456fc114ebc2cb61b39fc4de15792098dbb0e70ed2fb68d3513d75f495f4e5f Mon Sep 17 00:00:00 2001 From: Andrii Nikitin Date: Tue, 24 Feb 2026 16:26:26 +0100 Subject: [PATCH 2/2] t: allow tracking of integration config files Update .gitignore to exempt .conf files within the integration/ directory from the global *.conf ignore rule. This ensures that essential test configurations, like rabbitmq.conf, are preserved and shared across environments, preventing issues where empty directories were automatically created by Podman-compose. --- .gitignore | 1 + integration/rabbitmq-config/rabbitmq.conf | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 integration/rabbitmq-config/rabbitmq.conf diff --git a/.gitignore b/.gitignore index ede2242..1f67e63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.osc *.conf +!/integration/**/*.conf /integration/gitea-data /integration/gitea-logs /integration/rabbitmq-data diff --git a/integration/rabbitmq-config/rabbitmq.conf b/integration/rabbitmq-config/rabbitmq.conf new file mode 100644 index 0000000..299c064 --- /dev/null +++ b/integration/rabbitmq-config/rabbitmq.conf @@ -0,0 +1,7 @@ +listeners.ssl.default = 5671 + +ssl_options.certfile = /etc/rabbitmq/certs/cert.pem +ssl_options.keyfile = /etc/rabbitmq/certs/key.pem +ssl_options.verify = verify_none +ssl_options.fail_if_no_peer_cert = false +management.load_definitions = /etc/rabbitmq/definitions.json -- 2.51.1