fix: update e2e scenario assertions for current generator output - #91
Merged
Merged
Conversation
The 09-inline-run-callback and 10-inline-job-attributes scenarios assert a sibling workflow: callback emits a jobs.<id>.uses reusable-workflow call. Both used a bare workflow filename (build.yaml), and the generator's normalizeWorkflowPath only prepends ./ to .github/-prefixed paths, so it emits uses: build.yaml verbatim. The assertions expected uses: ./build.yaml, which the generator has never produced for a bare filename. These assertions went unexercised while the e2e suite could not run; update them to match the actual generated output. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.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
Two e2e
workflow_filesassertions referenced a reusable-workflowuses:value the generator has never produced, so the scenarios failed once the suite could actually run (the toolchain fix in #89 turned the suite back on after a long period where these assertions went unexercised).Failing scenarios + root cause
Both are stale assertions, not generator bugs:
e2e/scenarios/09-inline-run-callback.yamle2e/scenarios/10-inline-job-attributes.yamlEach scenario declares a sibling build callback with a bare workflow filename (
workflow: build.yaml) and asserts the emitted job carriesuses: ./build.yaml. The generator'snormalizeWorkflowPathonly prepends./to paths beginning with.github/; a bare filename passes through verbatim, so the generator emitsuses: build.yaml. The harness stages the stub reusable workflow at that same bare path in the repo root, souses: build.yamlresolves correctly. The./build.yamlexpectation was simply wrong from the start.Fix
Update both assertions from
uses: ./build.yamltouses: build.yamlto match the actual (and correct) generated output. No generator change — the emission is intentional and consistent with how the stub is staged.Verification
workflow_filesscenario viacascade generate-workflowand diffed everycontains/not_containssubstring against the emitted YAML: all 9 scenarios pass.e2eTestMultiStepScenariossuite (testcontainers + gitea + act) run locally to confirm green.go build ./...,go build ./...ine2e/,go vet, andgofmt -lclean.