mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-04-08 18:50:44 +00:00
chore: bring unittests up to date
This commit is contained in:
@ -32,14 +32,14 @@ spec:
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
{{- if .Values.statefulset.serviceAccountName }}
|
||||
serviceAccountName: {{ .Values.statefulset.serviceAccountName }}
|
||||
serviceAccountName: {{ .Values.statefulset.serviceAccountName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.statefulset.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.statefulset.runtimeClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.hostAliases }}
|
||||
hostAliases:
|
||||
|
||||
@ -456,38 +456,6 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[0].valueFrom.secretKeyRef.key
|
||||
value: "secret-key"
|
||||
- it: should interpret Gitea Root URL templating
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
global:
|
||||
gitea:
|
||||
service:
|
||||
name: "my-gitea-svc-http"
|
||||
port: 3210
|
||||
enabled: true
|
||||
giteaRootURL: "http://{{ .Values.global.gitea.service.name }}:{{ .Values.global.gitea.service.port }}"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[1].name
|
||||
value: "GITEA_INSTANCE_URL"
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[1].value
|
||||
value: "http://my-gitea-svc-http:3210"
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[0].command[2]
|
||||
value: |
|
||||
echo 'Trying to reach Gitea on http://my-gitea-svc-http:3210'
|
||||
until timeout 10 wget --no-check-certificate --spider http://my-gitea-svc-http:3210; do
|
||||
sleep 3
|
||||
echo "Trying again in 3 seconds..."
|
||||
done
|
||||
echo "Gitea has been reached!"
|
||||
- it: should render service account name correctly
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
@ -500,3 +468,15 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.serviceAccountName
|
||||
value: "my-service-account"
|
||||
- it: should render runtime class name correctly
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
enabled: true
|
||||
statefulset:
|
||||
runtimeClassName: "my-runtime-class-name"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- equal:
|
||||
path: spec.template.spec.runtimeClassName
|
||||
value: "my-runtime-class-name"
|
||||
|
||||
Reference in New Issue
Block a user