Skip to content

Commit

Permalink
Merge pull request #34 from tico24/main
Browse files Browse the repository at this point in the history
Adding a basic set of helm tests to show what could be possible.
  • Loading branch information
tico24 authored Feb 2, 2021
2 parents 66d6897 + 818f671 commit ba65770
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/sorry-cypress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sorry-cypress
description: A Helm chart for Sorry Cypress
type: application
version: 0.1.28
version: 0.1.29
appVersion: 0.6.1
home: https://sorry-cypress.dev/
sources:
Expand Down
54 changes: 54 additions & 0 deletions charts/sorry-cypress/templates/test/test-connections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "sorry-cypress-helm.fullname" . }}-test-dashboard-connection"
labels:
app.kubernetes.io/name: "{{ include "sorry-cypress-helm.fullname" . }}-test-dashboard-connection"
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "sorry-cypress-helm.fullname" . }}-dashboard:{{ .Values.dashboard.service.port }}']
restartPolicy: Never
---
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "sorry-cypress-helm.fullname" . }}-test-director-connection"
labels:
app.kubernetes.io/name: "{{ include "sorry-cypress-helm.fullname" . }}-test-director-connection"
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "sorry-cypress-helm.fullname" . }}-director:{{ .Values.director.service.port }}']
restartPolicy: Never
---
{{- if .Values.mongo.enabled }}
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "sorry-cypress-helm.fullname" . }}-test-mongo-connection"
labels:
app.kubernetes.io/name: "{{ include "sorry-cypress-helm.fullname" . }}-test-mongo-connection"
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "sorry-cypress-helm.fullname" . }}-mongo:{{ .Values.mongo.service.port }}']
restartPolicy: Never
{{- end }}

# Note. Not testing API yet.. can't do a 'get' on that unless there's a nice secret healthz path hidden somewhere.

0 comments on commit ba65770

Please sign in to comment.