Skip to content

Fix spurious test failure caused by line number#264

Open
op-ct wants to merge 1 commit into
OpenVoxProject:mainfrom
op-ct:fix/floating-test-line-number-causing-failures
Open

Fix spurious test failure caused by line number#264
op-ct wants to merge 1 commit into
OpenVoxProject:mainfrom
op-ct:fix/floating-test-line-number-causing-failures

Conversation

@op-ct

@op-ct op-ct commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This 2-character patch fixes a spurious test failure caused by a an over-fitted error message, causing failures like:

Failure/Error: expect(@log_output.readlines).to include(/WARN  Puppet : expected object key, got: '}' at line 24 column 3/)

When the test was modified last year, it included the line number in the error, pinning it to line 24. However, there are now various PRs failing tests because―although expected error occurs―error line number is 25.

This patch changes the expectation of 24 to \d\d, because the line number is brittle but the the failure message and column are not.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document and added a Signed-off-by annotation to each of my commits
  • read and accepted the AI Policy document and added Generated-by or Assisted-by annotations to each of my commits created with the help of an AI agent
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression integration test(s)
  • added or modified unit test(s)

Signed-off-by: Chris Tessmer <chris.tessmer@onyxpoint.com>
@bastelfreak

Copy link
Copy Markdown
Contributor

@op-ct thanks for the patch! Can you please sign your commit with an gpg or ssh key?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants