fix(e2e): repair CGO build flag and stale test assertions#83
Merged
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrhillsman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When an explicit kubeconfig path is provided (via --kubeconfig flag, VIRTWORK_KUBECONFIG env, or KUBECONFIG env), skip in-cluster config detection and use the explicit path directly. Previously, in-cluster config was always attempted first, silently ignoring explicit paths when running inside a pod. Resolution order: --kubeconfig > VIRTWORK_KUBECONFIG > KUBECONFIG > in-cluster service-account > ~/.kube/config. Extract ResolveKubeconfigPath for testable env-var resolution and configFromKubeconfig to reduce duplication. Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
Cover the explicit kubeconfig precedence chain introduced in the previous commit: explicit path wins over env/in-cluster, KUBECONFIG env is the fallback, and default loading rules apply when both are absent. Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
Add a dedicated section explaining the four-step kubeconfig resolution order and cross-reference it from the flag and environment variable tables. Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
go-sqlite3 requires CGO; the previous CGO_ENABLED=0 produced a binary that could not initialize the audit subsystem, failing every E2E test. The registry returns "workload not found", not "unknown workload". The codebase migrated from fmt.Fprintf to structured slog logging, so cleanup output is now JSON with "vms_deleted":N rather than the old "N VMs deleted" human-readable format. Update 4 assertions across cleanup_test.go and fullcycle_test.go. Signed-off-by: Melvin Hillsman <mhillsma@redhat.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
CGO_ENABLED=1in the E2E test binary builder —go-sqlite3requires CGO, and the previousCGO_ENABLED=0produced a binary that failed to initialize the audit subsystem, breaking all 18 E2E testsdryrun_test.go— the workload registry returns"workload not found", not"unknown workload"cleanup_test.goandfullcycle_test.goto match structured slog JSON output ("vms_deleted":N) after thefmt.Fprintf→slogmigrationResolves #82