Skip to content

fix: update e2e scenario assertions for current generator output - #91

Merged
joshua-temple merged 1 commit into
mainfrom
fix/e2e-scenarios-green
Jun 10, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/e2e-scenarios-green

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

What

Two e2e workflow_files assertions referenced a reusable-workflow uses: 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.yaml
  • e2e/scenarios/10-inline-job-attributes.yaml

Each scenario declares a sibling build callback with a bare workflow filename (workflow: build.yaml) and asserts the emitted job carries uses: ./build.yaml. The generator's normalizeWorkflowPath only prepends ./ to paths beginning with .github/; a bare filename passes through verbatim, so the generator emits uses: build.yaml. The harness stages the stub reusable workflow at that same bare path in the repo root, so uses: build.yaml resolves correctly. The ./build.yaml expectation was simply wrong from the start.

Fix

Update both assertions from uses: ./build.yaml to uses: build.yaml to match the actual (and correct) generated output. No generator change — the emission is intentional and consistent with how the stub is staged.

Verification

  • Regenerated each workflow_files scenario via cascade generate-workflow and diffed every contains/not_contains substring against the emitted YAML: all 9 scenarios pass.
  • Full e2e TestMultiStepScenarios suite (testcontainers + gitea + act) run locally to confirm green.
  • go build ./..., go build ./... in e2e/, go vet, and gofmt -l clean.

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>
@joshua-temple
joshua-temple merged commit 0589bc7 into main Jun 10, 2026
6 checks passed
@joshua-temple
joshua-temple deleted the fix/e2e-scenarios-green branch June 10, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant