Add output-correctness assertions to smoke tests - #15
Merged
Conversation
Every existing smoke test job only asserted that the action ran and
printed something - none of them checked what it printed. This closes
the repo's own long-standing TODO ("Test output for correctness" in
.github/workflows/README.md).
Adds smoke-test-correctness: runs the default file-count split across
all three split-index values for split-total=3 against the fixture repo,
then asserts:
- no partition is empty
- partitions are pairwise disjoint (no file assigned to two indices)
- the union of all partitions exactly matches the full glob (no file
dropped or invented)
This is the check that would have caught the exclude-glob quoting bug
(fixed in #9) automatically instead of via a user bug report.
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.
Follow-up from REVIEW.adoc's CI/CD section. Every existing smoke test job only asserted that the action ran and printed something — none of them checked what it printed.
.github/workflows/README.mdhas had "Test output for correctness" on its TODO list since the workflow README was first written.Adds
smoke-test-correctness: runs the default file-count split across all threesplit-indexvalues withsplit-total: 3against the same fixture repo the other jobs use, then asserts:This is the check that would have caught the exclude-glob quoting bug (fixed in #9) automatically instead of via a user bug report that sat open for a year.
Note: I don't have a way to run actual GitHub-hosted Actions runners from where I wrote this, so the path-format assumptions (e.g. that
split_tests' output andfind's output agree on relative-path formatting) are validated by this PR's own CI run rather than locally beforehand — worth a look at the Checks tab before merging.