test_lint_rejects_object_literal_comparison

✓ pass on PR3 (PR3 · custom readiness) · 0.1 s

helm lint fails when readiness expression compares to an object literal.

Same test on other tiers: PR1 — n/aPR2 — n/aCombined ✓ pass

Requirements

R30 Comparison values are scalars; object comparisons are rejected implemented

<value> is the expected literal for comparison. The value should be a scalor (string, number, boolean). Object comparisons will not be supported.HIP-0025, JsonPath syntax

The test needs these tier features: readiness.

What the test observed

The test asserts on these facts. Times come from the kube-apiserver audit log (UTC).

lint exit code

1

lint output

==> Linting charts/hip-readiness-basic
[INFO] Chart.yaml: icon is recommended
[ERROR] hip-readiness-basic/templates/probe.yaml: resource "Probe/probe" has malformed "helm.sh/readiness-success" annotation: expression "{.data} == {\"key\": \"value\"}": object comparisons are not supported

Error: 1 chart(s) linted, 1 chart(s) failed

Charts

The charts that the helm commands below read. The run keeps each chart as an archive. Click a chart to see its files and the commands that inspect or install it.

Chart directoryChartArchivesha256
charts/hip-readiness-basic hip-readiness-basic 0.1.0 · apiVersion v3HIP-0025 PR3 readiness annotations - Probe with configurable expressions hip-readiness-basic-0.1.0.tgz · 1022 B 2534a8588e3d9ccf

Commands

Every command that the test ran, in order, with the start time, the exit code and the output. The paths are relative to the root of the repository.

14:53:04.385 $ kubectl --context kind-hip0025-e2e delete namespace e2e-pr3-lint-rejects-object-literal-comparison --ignore-not-found --wait=true --timeout=120s
[exit 0, 0.0s]


14:53:04.427 $ kubectl --context kind-hip0025-e2e create namespace e2e-pr3-lint-rejects-object-literal-comparison
[exit 0, 0.0s]
namespace/e2e-pr3-lint-rejects-object-literal-comparison created


14:53:04.467 $ .bin/helm-pr3 lint charts/hip-readiness-basic -f runs/20261116-145035-876615/pr3/test_lint_rejects_object_literal_comparison/values.yaml --kube-context kind-hip0025-e2e
[exit 1, 0.0s]
==> Linting charts/hip-readiness-basic
[INFO] Chart.yaml: icon is recommended
[ERROR] hip-readiness-basic/templates/probe.yaml: resource "Probe/probe" has malformed "helm.sh/readiness-success" annotation: expression "{.data} == {\"key\": \"value\"}": object comparisons are not supported

Error: 1 chart(s) linted, 1 chart(s) failed


14:53:04.501 $ kubectl --context kind-hip0025-e2e delete namespace e2e-pr3-lint-rejects-object-literal-comparison --wait=false
[exit 0, 0.0s]
namespace "e2e-pr3-lint-rejects-object-literal-comparison" deleted


values.yaml

probe:
  failureExpressions:
  - '{.phase} == Failed'
  successExpressions:
  - '{.data} == {"key": "value"}'

Files

FileSizeContent
commands.log 1.1 KB the commands above
observations.json 462 B the observations above, as JSON
values.yaml 110 B an input file of the test