test(operator): track chart appVersion in operator-install version tripwires#115
Merged
Merged
Conversation
…ipwires The six operator-install tripwire assertions hardcoded the operator version (v0.2.0), so every release re-broke them and red-lit master until a follow-up re-sync (the v0.2.0 release did exactly this). Read the embedded chart's appVersion via the existing embeddedChartAppVersion helper instead, so the assertions track the chart across releases while still catching template-wiring drift (the rendered Deployment version label vs. the declared appVersion). Scenario literals (e.g. the v0.9.9 installed-version refuse case) are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The operator-install version "tripwire" tests in
cli/internal/operator/ssahardcoded the operator version (
v0.2.0). Every operator release bumps thechart
appVersion, which re-broke these six assertions and red-litmasteruntil a follow-up re-sync PR — the v0.2.0 release hit exactly this (fixed
reactively in #111).
This reads the embedded chart's
appVersiondynamically via the existingembeddedChartAppVersionhelper (already used inrender_test.go) instead of ahardcoded literal. The assertions now track the chart across releases, so a
release no longer reds master — while still catching real drift: the rendered
Deployment version label (set by the chart template) must equal the declared
appVersion.Six assertions changed (
apply_test.go×1,install_envtest_test.go×5).Scenario literals (e.g. the
v0.9.9installed-version refuse case) aredeliberately unchanged — they are hypothetical inputs, not chart-derived.
Why now
This unblocks the v0.2.1 release (release PR #113, which ships P1 #112 +
P2 #114) without red-lighting master. Merge this first, then the release PR.
Verification
moon run root:test(full suite incl. the ssa envtest) — green at the currentappVersion: v0.2.0.chart, so it stays green when
appVersionbecomesv0.2.1.moon run root:check— clean.🤖 Generated with Claude Code