Skip to content

test: golden-file snapshot tests for milestone + tagger#94

Merged
skjnldsv merged 3 commits into
mainfrom
feature/php-snapshot-tests
Jun 9, 2026
Merged

test: golden-file snapshot tests for milestone + tagger#94
skjnldsv merged 3 commits into
mainfrom
feature/php-snapshot-tests

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Adds snapshot-style coverage for the milestone mover and tagger in tools/release/, mirroring the "scenario -> expected" feel of the old bash harness, in PHP.

What

  • tests/Support/MatchesSnapshots - golden-file helper. A test renders a string and compares it to tests/snapshots/<name>.snap. Re-run with UPDATE_SNAPSHOTS=1 to regenerate after an intended change.

  • tests/Support/Journal - renders the recorded GitHub mutations as plain English, so the .snap files read like a description of what a release does, e.g.:

    move issue #100 to milestone #11 in nextcloud/server
    close milestone #10 in nextcloud/server
    create milestone "Nextcloud 33.0.6" in nextcloud/server
    
    nextcloud/activity: OK on stable34 (created v34.0.1)
    nextcloud/server: SKIPPED on stable34 (already tagged)
    
  • MilestoneSnapshotTest - patch, first stable, first beta, missing-next, due dates, multi-repo, pre-release no-op.

  • TaggerSnapshotTest - mixed run (create / skip / default-branch fallback / server-immutable / no-branch fail), force, dry run.

Complements the focused assertions in MilestoneUpdaterTest / RepoTaggerTest: the snapshots pin the whole sequence as a readable artifact.

The updater bash snapshot harness (tests/updater-script/) is untouched. 88 tests green; snapshots deterministic.

@skjnldsv skjnldsv added the enhancement New feature or request label Jun 9, 2026
skjnldsv added 2 commits June 9, 2026 14:15
…agger

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the feature/php-snapshot-tests branch from b9fcdf0 to ce81f1e Compare June 9, 2026 12:17
…ry comment headers

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv merged commit d942d3b into main Jun 9, 2026
6 checks passed
@skjnldsv skjnldsv deleted the feature/php-snapshot-tests branch June 9, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant