-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a pod template to run the mirror node acceptance tests * Add a secret template to hold the acceptance tests application.yml * Update documentation to explain new helm tests. Signed-off-by: Ian Jungmann <ian.jungmann@hedera.com>
- Loading branch information
Ian Jungmann
authored
May 25, 2021
1 parent
ae2a4c7
commit 310f21c
Showing
4 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,34 @@ | ||
{{- if .Values.test.enabled -}} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: {{- include "hedera-mirror.labels" . | nindent 4 }} | ||
name: {{ include "hedera-mirror.fullname" . }}-acceptance-test | ||
namespace: {{ include "hedera-mirror.namespace" . }} | ||
annotations: | ||
helm.sh/hook: test | ||
helm.sh/hook-delete-policy: hook-failed,hook-succeeded | ||
spec: | ||
containers: | ||
- name: acceptance-tests | ||
image: "{{ .Values.test.image.repository }}:{{ .Values.global.image.tag | default .Values.test.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.test.image.pullPolicy }} | ||
command: | ||
- 'sh' | ||
- '-c' | ||
# Copying the contents of the secret to the directory the image reads from without overwriting the existing yml. | ||
- | | ||
cp /etc/secrets/* /usr/etc/hedera-mirror-node/hedera-mirror-test/src/test/resources/ | ||
./mvnw integration-test --projects hedera-mirror-test/ -P=acceptance-tests -Dcucumber.filter.tags={{ .Values.test.cucumberTags }} | ||
volumeMounts: | ||
- name: acceptance-tests | ||
mountPath: /etc/secrets | ||
readOnly: true | ||
restartPolicy: Never | ||
terminationGracePeriodSeconds: 1 | ||
volumes: | ||
- name: acceptance-tests | ||
secret: | ||
defaultMode: 420 | ||
secretName: {{ include "hedera-mirror.fullname" . }}-acceptance-test | ||
{{- end -}} |
This file contains 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,16 @@ | ||
{{- if .Values.test.enabled -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
labels: {{ include "hedera-mirror.labels" . | nindent 4 }} | ||
name: {{ include "hedera-mirror.fullname" . }}-acceptance-test | ||
namespace: {{ include "hedera-mirror.namespace" . }} | ||
annotations: | ||
helm.sh/hook: test | ||
helm.sh/hook-delete-policy: hook-failed,hook-succeeded | ||
type: Opaque | ||
stringData: | ||
# application-default.yml as application.yml will overwrite the existing yml in the hedera-mirror-test image. | ||
application-default.yml: |- | ||
{{- tpl (toYaml .Values.test.config) $ | nindent 4 }} | ||
{{- end -}} |
This file contains 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