Skip to content

[#3106] Added the missing marker space in negative BATS step assertions. - #3119

Merged
AlexSkrypnyk merged 2 commits into
mainfrom
feature/3106-neg-assert-space
Sep 8, 2026
Merged

AlexSkrypnyk merged 2 commits into
mainfrom
feature/3106-neg-assert-space

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Sep 8, 2026

Copy link
Copy Markdown
Member

Closes #3106

Summary

Negative step assertions in notify-github.bats and provision.bats now write the - marker followed by a space before the asserted substring, the separator steps_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 three notify-github.bats entries read "-Marked deployment as finished.", so the suite asserted the absence of arked 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.bats the same missing marker space sat on 11 negative Existing database detected assertions, but there it consumed a leading space rather than a letter, so assert_output_not_contains matched the intended substring either way and that file's change is formatting-only: those 11 rows, together with the 2 positive Existing rows that carried no alignment at all, now use the 6-space indent the file's Fresh database detected rows already had. steps_run() in bats-helpers and every other .bats/.bash file in the repo are unchanged.

Before / After

BEFORE - marker written without a space
──────────────────────────────────────────────────────
STEPS entry     "-Marked deployment as finished."
                       │
                       │  steps_run(): ${item:2}
                       ▼
asserted text   "arked deployment as finished."
                       │
                       ▼
assert_output_not_contains → always true, the real
message is never checked

AFTER - marker written with a space
──────────────────────────────────────────────────────
STEPS entry     "- Marked deployment as finished."
                       │
                       │  steps_run(): ${item:2}
                       ▼
asserted text   "Marked deployment as finished."
                       │
                       ▼
assert_output_not_contains → fails if the real message
reappears in the output

Changes

  1. .vortex/tooling/tests/unit/notify-github.bats - added the missing space after the - marker in the 3 negative Marked deployment as finished. assertions covering the pre-deployment, post-deployment, and deployment-status-update failure paths.
  2. .vortex/tooling/tests/unit/provision.bats - added the same marker space to the 11 negative Existing database detected... assertions and aligned them to the file's 6-space indent; realigned the 2 positive Existing database detected... assertions to match their Fresh database detected... counterparts. No assertion changes meaning; this file's change is formatting-only.

Screenshots

N/A

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Team

Run ID: d21f9bca-b602-4132-a4c1-57ce2a0853ca

📥 Commits

Reviewing files that changed from the base of the PR and between efa94ff and 0c99029.

📒 Files selected for processing (2)
  • .vortex/tooling/tests/unit/notify-github.bats
  • .vortex/tooling/tests/unit/provision.bats

Comment @coderabbitai help to get the list of available commands.

@AlexSkrypnyk AlexSkrypnyk added this to the 1.41.0 milestone Sep 8, 2026
@AlexSkrypnyk AlexSkrypnyk added the A2 Working clone index A2 label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.68% (224/227)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.68% (224/227)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.77%. Comparing base (efa94ff) to head (0c99029).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📖 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.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Sep 8, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit d131ccb into main Sep 8, 2026
35 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/3106-neg-assert-space branch September 8, 2026 22:48
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Sep 8, 2026
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.41.0, 1.42.0 Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A2 Working clone index A2 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Add the missing space in negative step assertions in 'notify-github.bats'

1 participant