-
Notifications
You must be signed in to change notification settings - Fork 299
helm unittests #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MichaelSp
wants to merge
22
commits into
nextcloud:main
Choose a base branch
from
MichaelSp:helm_unittest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
helm unittests #462
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a78f299
helm unittests
MichaelSp 2c871d9
avoid changes in the unittests due to updates in the appVersion
MichaelSp 9a2c2f1
Merge pull request #20 from nextcloud/main
MichaelSp 7b025fd
Merge branch 'main' into helm_unittest
jessebot f649ead
Update defaults_test.yaml.snap
jessebot 11ba09e
Update lint-test.yaml - fix on parameter; add tests directory to chan…
jessebot 80bd9ba
Merge branch 'main' into helm_unittest
MichaelSp 0532dd5
Merge branch 'main' into helm_unittest
jessebot 3133bbc
Merge branch 'main' into helm_unittest
jessebot e81d9d0
Merge branch 'main' into helm_unittest
MichaelSp ffaa7c5
chore(doc): add hint on unittesting in CONTRIBUTING.md
MichaelSp 59d5922
chore(version): bump helm chart version
MichaelSp 996ed9b
fix(test): update nextcloud-config-hash
MichaelSp cdc852b
Merge branch 'main' into helm_unittest
MichaelSp e54276e
Merge branch 'main' into helm_unittest
MichaelSp 10123bb
Merge branch 'main' into helm_unittest
MichaelSp 9f76fc0
Merge branch 'main' into helm_unittest
MichaelSp a537038
Merge branch 'main' into helm_unittest
MichaelSp f8f4b38
Merge branch 'main' into helm_unittest
MichaelSp a9e4cec
Merge branch 'main' into helm_unittest
MichaelSp 8bdd88e
Update Chart.yaml
MichaelSp 630b1d1
chore: update unittests
MichaelSp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,13 @@ jobs: | |
| if: steps.list-changed.outputs.changed == 'true' | ||
| run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
|
||
| - name: Run helm unittest | ||
| id: unittest | ||
| if: steps.list-changed.outputs.changed == 'true' | ||
| run: | | ||
| helm plugin install https://github.com/helm-unittest/helm-unittest.git | ||
| helm unittest charts/nextcloud | ||
|
|
||
| - name: Create kind cluster | ||
| uses: helm/[email protected] | ||
| if: steps.list-changed.outputs.changed == 'true' | ||
|
|
||
145 changes: 145 additions & 0 deletions
145
charts/nextcloud/tests/__snapshot__/defaults_test.yaml.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| defaults: | ||
| 1: | | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: app | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/managed-by: Helm | ||
| app.kubernetes.io/name: nextcloud | ||
| helm.sh/chart: nextcloud-1.0.0 | ||
| name: RELEASE-NAME-nextcloud | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/component: app | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/name: nextcloud | ||
| strategy: | ||
| type: Recreate | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| nextcloud-config-hash: a5aae02b1b8278a9c8a2dc143e82d3737fc295f62c34afd617207f37d1b2b438 | ||
| php-config-hash: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a | ||
| labels: | ||
| app.kubernetes.io/component: app | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/name: nextcloud | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: SQLITE_DATABASE | ||
| value: nextcloud | ||
| - name: NEXTCLOUD_ADMIN_USER | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: nextcloud-username | ||
| name: RELEASE-NAME-nextcloud | ||
| - name: NEXTCLOUD_ADMIN_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: nextcloud-password | ||
| name: RELEASE-NAME-nextcloud | ||
| - name: NEXTCLOUD_TRUSTED_DOMAINS | ||
| value: nextcloud.kube.home | ||
| - name: NEXTCLOUD_DATA_DIR | ||
| value: /var/www/html/data | ||
| image: nextcloud:1.2.3-apache | ||
| imagePullPolicy: IfNotPresent | ||
| livenessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| httpHeaders: | ||
| - name: Host | ||
| value: nextcloud.kube.home | ||
| path: /status.php | ||
| port: 80 | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 5 | ||
| name: nextcloud | ||
| ports: | ||
| - containerPort: 80 | ||
| name: http | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| httpHeaders: | ||
| - name: Host | ||
| value: nextcloud.kube.home | ||
| path: /status.php | ||
| port: 80 | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 5 | ||
| resources: {} | ||
| volumeMounts: | ||
| - mountPath: /var/www/ | ||
| name: nextcloud-main | ||
| subPath: root | ||
| - mountPath: /var/www/html | ||
| name: nextcloud-main | ||
| subPath: html | ||
| - mountPath: /var/www/html/data | ||
| name: nextcloud-main | ||
| subPath: data | ||
| - mountPath: /var/www/html/config | ||
| name: nextcloud-main | ||
| subPath: config | ||
| - mountPath: /var/www/html/custom_apps | ||
| name: nextcloud-main | ||
| subPath: custom_apps | ||
| - mountPath: /var/www/tmp | ||
| name: nextcloud-main | ||
| subPath: tmp | ||
| - mountPath: /var/www/html/themes | ||
| name: nextcloud-main | ||
| subPath: themes | ||
| securityContext: | ||
| fsGroup: 33 | ||
| volumes: | ||
| - emptyDir: {} | ||
| name: nextcloud-main | ||
| 2: | | ||
| apiVersion: v1 | ||
| data: | ||
| nextcloud-password: Y2hhbmdlbWU= | ||
| nextcloud-token: YWJjZA== | ||
| nextcloud-username: YWRtaW4= | ||
| kind: Secret | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/managed-by: Helm | ||
| app.kubernetes.io/name: nextcloud | ||
| helm.sh/chart: nextcloud-1.0.0 | ||
| name: RELEASE-NAME-nextcloud | ||
| type: Opaque | ||
| 3: | | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: app | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/managed-by: Helm | ||
| app.kubernetes.io/name: nextcloud | ||
| helm.sh/chart: nextcloud-1.0.0 | ||
| name: RELEASE-NAME-nextcloud | ||
| spec: | ||
| ports: | ||
| - name: http | ||
| port: 8080 | ||
| protocol: TCP | ||
| targetPort: 80 | ||
| selector: | ||
| app.kubernetes.io/component: app | ||
| app.kubernetes.io/instance: RELEASE-NAME | ||
| app.kubernetes.io/name: nextcloud | ||
| type: ClusterIP | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| suite: test my defaults | ||
| templates: | ||
| - deployment.yaml | ||
| - secrets.yaml | ||
| - service.yaml | ||
| chart: | ||
| version: 1.0.0 | ||
| appVersion: 1.2.3 | ||
| tests: | ||
| - it: defaults | ||
| set: | ||
| metrics.token: "abcd" | ||
| asserts: | ||
| - matchSnapshot: { } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.