ci: make the e2e tests actually run - #6
Merged
Merged
Conversation
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.
Problem
The pty end-to-end tests guard themselves on prerequisites and skip when one is missing:
CI never ran
make build, sobin/azformnever existed, so every e2e test skipped — and a skipped test reports as success.internal/uifinished in ~1.4s on CI instead of ~60s locally. The widget round trip has never been exercised on CI, including the two zsh tests that predate the bash work.Changes
AZFORM_E2E_REQUIRED=1on ubuntu-latest turns any skip into a hard failure. macos-latest stays permissive: it ships bash 3.2, which genuinely cannot run the bash widget, so that skip is legitimate.Unrelated bug found along the way
TestDoctorStateNoOverridesfails whenever anyAZFORM_*variable is set — includingAZFORM_NO_UPDATE_CHECK, which is documented inazform --help. A user who exports it cannot rungo test ./...on a clean tree. This is onmaintoday; the new env var merely exposed it.Cause:
t.Setenv(name, "")sets a variable to empty rather than removing it, soos.Environ()still listsNAME=and the doctor counts it as an override. Fixed withos.Unsetenvaftert.Setenv.Verification
Locally, simulating the ubuntu-latest configuration:
AZFORM_E2E_REQUIRED=1 go test -race ./...internal/ui65sAZFORM_NO_UPDATE_CHECK=1 go test ./cmd/azform/golangci-lint runThe 65s runtime is the signal that the e2e tests really ran.
What this PR is for
Confirming on a real Ubuntu runner that the e2e tests pass under the guard before this reaches
main.