From 4016c5396d59a4d7b4ce63136385e8d1df850121 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 14 Sep 2026 20:57:01 +0200 Subject: [PATCH] fix(ci): add bash unittests --- .gitea/workflows/bash.yaml | 21 ++++++++++++ Makefile | 7 ++++ .../helm/tests/test-http-connection.yaml | 34 ------------------- 3 files changed, 28 insertions(+), 34 deletions(-) create mode 100644 .gitea/workflows/bash.yaml delete mode 100644 unittests/helm/tests/test-http-connection.yaml diff --git a/.gitea/workflows/bash.yaml b/.gitea/workflows/bash.yaml new file mode 100644 index 0000000..af3169c --- /dev/null +++ b/.gitea/workflows/bash.yaml @@ -0,0 +1,21 @@ +name: Bash + +on: + pull_request: + types: [ "opened", "reopened", "synchronize" ] + push: + branches: + - '**' + tags-ignore: + - '**' + workflow_dispatch: {} + +jobs: + bash-unittest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + submodules: true + - name: Run bash unittests + run: make bash/unittest diff --git a/Makefile b/Makefile index 65496ba..4298838 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,13 @@ PHONY+=helm/unittest helm/unittest: helm unittest --strict --file 'unittests/helm/**/*.yaml' --file 'unittests/helm/values-conflicting-checks.yaml' ./ +# BASH PREPARE +# ============================================================================== +PHONY+=bash/prepare +bash/prepare: + git submodule init + git submodule update + # BASH UNITTESTS # ============================================================================== PHONY+=bash/unittest diff --git a/unittests/helm/tests/test-http-connection.yaml b/unittests/helm/tests/test-http-connection.yaml deleted file mode 100644 index 24b3fd1..0000000 --- a/unittests/helm/tests/test-http-connection.yaml +++ /dev/null @@ -1,34 +0,0 @@ -suite: test connection template -release: - name: gitea-unittests - namespace: testing -templates: - - templates/tests/test-http-connection.yaml -tests: - - it: renders openshift-compatible defaults for the test pod - set: - openshift.enabled: true - asserts: - - notExists: - path: spec.hostUsers - - equal: - path: spec.containers[0].securityContext - value: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - - - it: renders an explicit hostUsers=false override for the test pod - set: - openshift: - enabled: true - deployment: - hostUsers: false - asserts: - - equal: - path: spec.hostUsers - value: false