Skip to content

Commit 62c7b33

Browse files
committed
fix(ci): add notifyPush test - WIP
Signed-off-by: WrenIX <dev.github@wrenix.eu>
1 parent 92c744e commit 62c7b33

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/workflows/lint-test.yaml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ jobs:
8383
- name: Horizontal Pod Autoscaling Enabled
8484
helm_args: '--helm-extra-set-args "--values charts/nextcloud/test-values/hpa.yaml"'
8585

86-
# test the helm chart with notify push enabled
87-
- name: Notify Push Enabled
88-
helm_args: '--helm-extra-set-args "--values charts/nextcloud/test-values/notify_push.yaml"'
89-
9086
# test the helm chart with s3 as the primary storage
9187
- name: S3 Enabled as Primary Storage
9288
# we need to skip the clean up so we can test adding a file
@@ -96,7 +92,8 @@ jobs:
9692

9793
# test the helm chart with imaginary
9894
- name: Imaginary Enabled
99-
helm_args: --namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/imaginary.yaml"
95+
helm_args: |
96+
--namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/imaginary.yaml"
10097
test: true
10198

10299
# test the helm chart with extra manifests
@@ -107,6 +104,12 @@ jobs:
107104
helm_args: --namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/extra-manifests-map.yaml"
108105
test: true
109106

107+
# test the helm chart with notify push enabled
108+
- name: Notify Push Enabled
109+
helm_args: |
110+
--namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/notify_push.yaml"
111+
testNotifyPush: true
112+
110113
steps:
111114
- name: Checkout
112115
uses: actions/checkout@v6
@@ -173,6 +176,20 @@ jobs:
173176
kubectl logs --ignore-errors --prefix -l app.kubernetes.io/name=nextcloud
174177
exit $EXIT
175178
179+
- name: Run test for Notify Push
180+
if: matrix.test_cases.testNotifyPush
181+
# applies a kubernetes job that uploads a file and then checks log of finished pod
182+
run: |
183+
EXIT=0
184+
kubectl config set-context --current --namespace=nextcloud
185+
POD=$(kubectl get pods -o name --selector "app.kubernetes.io/component=app")
186+
(kubectl wait --for=condition=Ready --timeout=2m "${POD}" && sleep 60) || EXIT=1
187+
kubectl exec --stdin "${POD}" -c nextcloud -- sh -c '
188+
chsh -s /bin/sh www-data
189+
su -l www-data -c "/var/www/html/occ notify_push:self-test"
190+
' || EXIT=1
191+
exit $EXIT
192+
176193
summary:
177194
runs-on: ubuntu-latest-low
178195
needs: [changes, test]

charts/nextcloud/test-values/notify_push.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
fullnameOverride: nextcloud
2+
3+
nextcloud:
4+
host: "nextcloud.nextcloud.svc.cluster.local"
5+
trustedDomains:
6+
- 'nextcloud.nextcloud.svc.cluster.local'
7+
- 'nextcloud'
8+
19
redis:
210
enabled: true
311

@@ -8,3 +16,4 @@ mariadb:
816

917
notifyPush:
1018
enabled: true
19+
autoSetup: true

0 commit comments

Comments
 (0)