[#3106] Added the missing marker space in negative BATS step assertions. - #3119
Conversation
… example operation assertions.
|
Warning Review limit reached
On-demand reviews are free for the next 12 days. After that, they cost $0.25 per reviewed file. Or wait 49 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Comment |
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3119 +/- ##
==========================================
- Coverage 87.13% 86.77% -0.36%
==========================================
Files 108 101 -7
Lines 5169 5006 -163
Branches 49 3 -46
==========================================
- Hits 4504 4344 -160
+ Misses 665 662 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6aa08f688f5c6ec6ebd250a6--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Closes #3106
Summary
Negative step assertions in
notify-github.batsandprovision.batsnow write the-marker followed by a space before the asserted substring, the separatorsteps_run()'s${item:2}slice assumes is always there.steps_run()'s guard[[ ${item} == "-"* ]]matches a bare dash and${item:2}then unconditionally drops two characters, so a step written without the space loses its first content character; the threenotify-github.batsentries read"-Marked deployment as finished.", so the suite asserted the absence ofarked deployment as finished.and could never detect a regression in the real message, while the sibling branch's guard[[ ${item} == "= "* ]]checks for the space directly and never degrades this way.In
provision.batsthe same missing marker space sat on 11 negativeExisting database detectedassertions, but there it consumed a leading space rather than a letter, soassert_output_not_containsmatched the intended substring either way and that file's change is formatting-only: those 11 rows, together with the 2 positiveExistingrows that carried no alignment at all, now use the 6-space indent the file'sFresh database detectedrows already had.steps_run()inbats-helpersand every other.bats/.bashfile in the repo are unchanged.Before / After
Changes
.vortex/tooling/tests/unit/notify-github.bats- added the missing space after the-marker in the 3 negativeMarked deployment as finished.assertions covering the pre-deployment, post-deployment, and deployment-status-update failure paths..vortex/tooling/tests/unit/provision.bats- added the same marker space to the 11 negativeExisting database detected...assertions and aligned them to the file's 6-space indent; realigned the 2 positiveExisting database detected...assertions to match theirFresh database detected...counterparts. No assertion changes meaning; this file's change is formatting-only.Screenshots
N/A