Skip to content

test: discover nested and yml scenarios in parity tests - #172

Open
juliosuas wants to merge 1 commit into
OWASP:mainfrom
juliosuas:fix/scenario-parity-discovery
Open

test: discover nested and yml scenarios in parity tests#172
juliosuas wants to merge 1 commit into
OWASP:mainfrom
juliosuas:fix/scenario-parity-discovery

Conversation

@juliosuas

Copy link
Copy Markdown
Contributor

Fixes #169.

What changed

The CLI already discovers .yaml and .yml files at any depth under a scenario directory. The bundled-scenario parity tests used scenarios/*/*.yaml, so a valid .yml file or a nested path never reached either validator.

Those tests now call _discover_scenario_files(), the same helper the CLI uses. test_scenarios.py and the passing-fixture pairing use the same discovery.

Tests

  • Added test_bundled_scenario_paths_match_loader_contract covering .yml, nested .yaml, and ignored non-scenario files.
  • pytest tests/test_scenario_schema_sync.py tests/test_scenario_pass_fixtures.py tests/test_scenarios.py — 76 passed.

AI assistance disclosure

OpenAI Codex / Cursor Grok assisted with locating the glob mismatch, drafting the patch, and writing the regression test. I reviewed the diff, ran the tests above, and confirmed the helper matches the CLI loader contract.


Restored after an accidental fork deletion. Same commits as #171.

The CLI loader accepts .yaml/.yml at any depth, but the bundled-scenario
parity tests only globbed */*.yaml. Point those tests at the same
discovery helper so a nested or .yml scenario cannot silently skip schema
validation.

Fixes OWASP#169.
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.

[Bug] scenario parity test discovers a narrower set of files than the loader accepts

1 participant