From c4b32500622e883058a7e3a325f843d46e008091 Mon Sep 17 00:00:00 2001 From: Elise Haldane <107867060+elisehaldane@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:27:05 +0000 Subject: [PATCH] Repair sqnc-node test defaults (#729) --- charts/sqnc-node/Chart.yaml | 2 +- .../templates/tests/checkPostDeployment.yaml | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/charts/sqnc-node/Chart.yaml b/charts/sqnc-node/Chart.yaml index 1c9998a6..463d92e9 100644 --- a/charts/sqnc-node/Chart.yaml +++ b/charts/sqnc-node/Chart.yaml @@ -6,6 +6,6 @@ maintainers: url: www.digicatapult.org.uk description: A Helm chart to deploy SQNC nodes type: application -version: 7.1.2 +version: 7.1.3 # renovate: image=digicatapult/sqnc-node appVersion: '11.3.0' diff --git a/charts/sqnc-node/templates/tests/checkPostDeployment.yaml b/charts/sqnc-node/templates/tests/checkPostDeployment.yaml index 6834c807..8dd103e8 100644 --- a/charts/sqnc-node/templates/tests/checkPostDeployment.yaml +++ b/charts/sqnc-node/templates/tests/checkPostDeployment.yaml @@ -2,6 +2,11 @@ {{ $serviceLabels := include "sqnc-node.serviceLabels" . }} {{ $selectorLabels := include "sqnc-node.selectorLabels" . }} +{{- $blockHeight := $.Values.tests.blockHeight | default dict }} +{{- $nodeConnection := $.Values.tests.nodeConnection | default dict }} + +{{- $osShell := $.Values.tests.osShell.image }} + {{range $i := until ($.Values.node.replicas | int) }} apiVersion: v1 kind: Pod @@ -14,7 +19,7 @@ metadata: spec: containers: - name: block-height-check - image: {{ $.Values.tests.osShell.image.repository }}:{{ $.Values.tests.osShell.image.tag }} + image: {{ $osShell.repository }}:{{ $osShell.tag }} command: [ "/bin/sh" ] args: - -c @@ -34,9 +39,9 @@ spec: fi env: - name: BLOCK_HEIGHT_WAIT - value: {{ default 30 $.Values.tests.blockHeight.waitSeconds | quote }} + value: {{ default 30 $blockHeight.waitSeconds | quote }} - name: node-connection-check - image: {{ $.Values.tests.osShell.image.repository }}:{{ $.Values.tests.osShell.image.tag }} + image: {{ $osShell.repository }}:{{ $osShell.tag }} command: [ "/bin/sh" ] args: - -c @@ -68,14 +73,14 @@ spec: fi env: - name: NODE_CONNECTION_WAIT - value: {{ default 30 $.Values.tests.nodeConnection.waitSeconds | quote }} + value: {{ default 30 $nodeConnection.waitSeconds | quote }} - name: CHAIN_TYPE value: {{ $.Values.node.chain }} - name: MIN_PEER_COUNT {{- if eq $.Values.node.chain "dev" }} value: {{ 0 | quote }} {{- else }} - value: {{ default 2 $.Values.tests.minPeerCount | quote }} + value: {{ default 2 $nodeConnection.minPeerCount | quote }} {{- end }} restartPolicy: Never {{ end }}