Skip to content

test(e2e): prove init-scaffolded topology orchestrates and promotes - #171

Merged
joshua-temple merged 1 commit into
mainfrom
feat/cascade-init-e2e
Jun 15, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
feat/cascade-init-e2e

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The scaffold package's SelfCheck statically proves a cascade init manifest parses, validates, and generates, but nothing proved the scaffolded pipeline actually runs. Static generation cannot catch manifest-shape drift that only surfaces at runtime.

Fix

Adds an e2e scenario (e2e/init_scaffold_test.go) that renders the real two-environment [dev prod] topology via scaffold.Scaffold, unmarshals the live scaffolded manifest's ci.config into the harness Config (so the run is bound to the exact scaffold output, not a hand-copied fixture), and drives it through act and gitea:

  • orchestrate after the first commit: build callback runs, version resolves to v0.1.0-rc.0, a draft prerelease is cut at dev
  • promote dev to release: v0.1.0 published, rc tag deleted, dev unchanged
  • promote release to prod: deploy callback runs, prod state advances

Callback bodies are supplied via SetupWorkflows mirroring the scaffold contract (build emits artifact_id; both take the environment/sha/dry_run inputs) but without actions/checkout, which act cannot resolve for a reusable callback against the per-scenario gitea. This matches the no-checkout pattern the existing runtime scenarios already document and use.

Verification

  • Root module: go build ./..., go vet ./..., go test ./... (1345 pass), golangci-lint run ./... clean
  • e2e module: go build ./..., go vet ./..., golangci-lint run ./... clean
  • Ran the scenario against Docker locally: go test -run TestInitScaffoldOrchestratesAndPromotes -timeout 20m ./... passes (orchestrate + both promotes green, state advances dev -> release -> prod)

…hestrates and promotes

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 44a1261 into main Jun 15, 2026
7 checks passed
@joshua-temple joshua-temple added the test Adding or correcting tests label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Adding or correcting tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant