Skip to content

Commit 05ed2f4

Browse files
committed
e2e: skip HRDHistogram checks for older images
1 parent f41dc5a commit 05ed2f4

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

stackgres-k8s/e2e/spec/abstract/dbops-pgbench

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,20 @@ check_pgbench() {
183183
fail "pgbench did not returned the statements script."
184184
fi
185185

186-
if kubectl get -n "$CLUSTER_NAMESPACE" sgdbops "$DBOPS_NAME" \
187-
--template '{{ .status.benchmark.pgbench.hdrHistogram }}' | grep -x '[0-9A-Za-z+/=]\+'
186+
kubectl get -n "$CLUSTER_NAMESPACE" pod -l "app=StackGresCluster,stackgres.io/cluster-name=$CLUSTER_NAME,stackgres.io/cluster=true" -o json \
187+
| jq -r '.items[0].spec.containers[0].image' | grep -q '^.*-build-6\.\(.*\)$'
188+
189+
if kubectl get -n "$CLUSTER_NAMESPACE" pod -l "app=StackGresCluster,stackgres.io/cluster-name=$CLUSTER_NAME,stackgres.io/cluster=true" -o json \
190+
| jq -r '.items[0].spec.containers[0].image' | sed 's/^.*-build-6\.\(.*\)$/\1/' \
191+
| test "$(cat)" -ge 35
188192
then
189-
success "pgbench returned the HdrHistogram."
190-
else
191-
fail "pgbench did not returned the HdrHistogram."
193+
if kubectl get -n "$CLUSTER_NAMESPACE" sgdbops "$DBOPS_NAME" \
194+
--template '{{ .status.benchmark.pgbench.hdrHistogram }}' | grep -x '[0-9A-Za-z+/=]\+'
195+
then
196+
success "pgbench returned the HdrHistogram."
197+
else
198+
fail "pgbench did not returned the HdrHistogram."
199+
fi
192200
fi
193201

194202
RESULT="$(run_query -i 0 -p 5432 -q "SELECT EXISTS(SELECT * FROM pg_database WHERE datname LIKE 'pgbench-%')")"

0 commit comments

Comments
 (0)