Skip to content

Fix mock filtering implementation to ensure it is symmetric with the contract tests#2336

Merged
joelrosario merged 11 commits intomainfrom
mock-filter-fix
Mar 11, 2026
Merged

Fix mock filtering implementation to ensure it is symmetric with the contract tests#2336
joelrosario merged 11 commits intomainfrom
mock-filter-fix

Conversation

@StarKhan6368
Copy link
Copy Markdown
Contributor

What: Ensure symmetry between mock and contract test filtering

Why: The endpoints and example filtering via mock was not consistent with the contract tests. Unlike the contract tests, which filter examples from scenario rows after loading, the mock filtering applied a two-step process to filter scenarios and then examples. Additionally, some filters were not implemented for the examples directly, leading to unexpected runtime exceptions

How: Similar to contract tests, the mock now also filters the example post-load using rows

Checklist:

  • Unit Tests
  • Build passing locally
  • Sonar Quality Gate
  • Security scans don't report any vulnerabilities
  • Documentation added/updated (share link)
  • Sample Project added/updated (share link)
  • Demo video (share link)
  • Article on Website (share link)
  • Roadmpap updated (share link)
  • Conference Talk (share link)

joelrosario and others added 11 commits March 10, 2026 20:10
…iminate possibility of loading duplicate example directories
- Fix issue with loadExternalisedExamplesAndListUnloadableExamples
- Combining String with list of string
- Should be able to filter in and filter out scenarios using
  concrete path parameter values
- Add simple test to ensure this doesn't regress again
- stubFilter should also filter inline examples
- Add simple tests for the same
@joelrosario joelrosario merged commit c52eaa5 into main Mar 11, 2026
2 of 3 checks passed
@joelrosario joelrosario deleted the mock-filter-fix branch March 11, 2026 13:45
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