Skip to content

test(policy): cover new IsDeprecatedSupport Yellow branch#69

Merged
Kiran01bm merged 1 commit intomainfrom
kiran01bm-cover-deprecated-support
Apr 30, 2026
Merged

test(policy): cover new IsDeprecatedSupport Yellow branch#69
Kiran01bm merged 1 commit intomainfrom
kiran01bm-cover-deprecated-support

Conversation

@Kiran01bm
Copy link
Copy Markdown
Contributor

What and Why ?

Follow-up to the deletes-only fix that landed alongside #66. PR #66 added
a new IsDeprecatedSupport branch to getYellowMessage (Lambda-style
"Standard Support" / "Deprecated Support" semantics) plus the
versionSubject and isLambda helpers, but no tests were added at the
time. The deletes-only fix dropped policy coverage from 98.8% → 96.0%
because it removed the GetRecommendation test surface that #66 had
already deleted; this PR recovers that coverage by exercising the new
branch instead.

Tests added

Test Branch covered
TestGetMessage_Yellow_DeprecatedSupport_WithEOL Lambda runtime in deprecated support with an end date — exercises the IsDeprecatedSupport+EOLDate path and versionSubject's "Runtime" label (via isLambda)
TestGetMessage_Yellow_DeprecatedSupport_NoEOL IsDeprecatedSupport without an end date — non-Lambda resource, so versionSubject returns "Version"; asserts the until-phrase is omitted

Verification

All commands run with GOTOOLCHAIN=go1.24.2:

  • go test ./pkg/policy/... -cover98.7% (up from 96.0%)
  • go test ./... → all packages green
  • golangci-lint run ./... → 0 findings

@Kiran01bm Kiran01bm requested a review from a team as a code owner April 30, 2026 05:10
@Kiran01bm Kiran01bm merged commit 56258a2 into main Apr 30, 2026
7 checks passed
@Kiran01bm Kiran01bm deleted the kiran01bm-cover-deprecated-support branch April 30, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants