Skip kubernetes envtest when assets are missing#7014
Open
rootp1 wants to merge 1 commit into
Open
Conversation
Signed-off-by: rootp1 <arnav.iitr@gmail.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.
What this PR does:
Adds an envtest asset preflight to
TestExecutor_ensureSyncso direct package tests skip with a clear message whenetcdorkube-apiserverare unavailable, and adds focused unit coverage for the preflight helper.Why we need it:
Direct
go teston the Kubernetes executor package currently fails with an environment/setup error unless contributors use the Makefile wrapper that provisions envtest assets. This change makes that failure mode explicit and less misleading.Which issue(s) this PR fixes:
Fixes #7013
Does this PR introduce a user-facing change?:
Summary
envtest.EnvironmentLinked Issue
Fixes #7013
What Changed
requireEnvtestAssetsand binary detection helpers inpkg/app/piped/executor/kubernetes/sync_test.goTestExecutor_ensureSyncbehind the preflight checkTestMissingEnvtestBinariesVerification
go test ./pkg/app/piped/executor/kubernetes -run 'TestMissingEnvtestBinaries|TestEnsureSync|TestExecutor_ensureSync' -count=1— passedKUBEBUILDER_ASSETS='' go test ./pkg/app/piped/executor/kubernetes -run TestExecutor_ensureSync -count=1 -v— passedmake check— not run successfully: failed inbuild/webbecauseyarnis not installed in this environmentmake test/go MODULES=.— failed: upstream test suite currently fails inpkg/app/piped/executor/kubernetesandpkg/app/piped/platformprovider/kuberneteson this checkoutmake check/dco— failed: upstream commit25ae69937e55e8330bff96c34346718f3e5e7148is missing aSigned-off-byline, so the repository DCO check does not pass cleanly on top ofupstream/masterScope
pkg/app/piped/executor/kubernetes/sync_test.gowas changed; unrelated files were not modified