From cdf3815f76e8314f87db1cb5039ea4dad0b59f83 Mon Sep 17 00:00:00 2001 From: oap75 Date: Wed, 19 Jul 2023 15:27:05 +0200 Subject: [PATCH] fix: add graphql-server test in CI --- .github/workflows/lint-test.yaml | 4 ++++ .../templates/tests/test-connection.yaml | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 7bf03a2..3423e68 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -85,3 +85,7 @@ jobs: --debug \ --namespace default \ --target-branch ${{ github.event.repository.default_branch }} + + - name: Test graphql-server connection + run: | + helm test rollups-validator-node-${{ github.event.repository.default_branch }} \ No newline at end of file diff --git a/charts/rollups-validator-node/templates/tests/test-connection.yaml b/charts/rollups-validator-node/templates/tests/test-connection.yaml index 67d0fd6..3ae6357 100644 --- a/charts/rollups-validator-node/templates/tests/test-connection.yaml +++ b/charts/rollups-validator-node/templates/tests/test-connection.yaml @@ -1,14 +1,14 @@ +--- apiVersion: v1 kind: Pod metadata: - name: "{{ include "validator.fullname" . }}-test-connection" - labels: {{- include "validator.labels" . | nindent 4 }} + name: "{{ .Release.Name }}-graphql-server-http-check" annotations: "helm.sh/hook": test spec: containers: - - name: wget + - name: http-check image: busybox command: ['wget'] - args: ['{{ include "validator.fullname" . }}-graphql-server:{{ .Values.endpoints.graphqlServer.service.port }}'] - restartPolicy: Never + args: ['--spider', '--timeout=5', 'http://{{ include "validator.fullname" . }}-graphql-server:{{ .Values.endpoints.graphqlServer.service.port }}'] + restartPolicy: Never \ No newline at end of file