Repository navigation
Commit ebd416c
committed
feat(provider-tck): report an extension under its own uri prefix
The suite can already run an adopter's own scenarios, and already derives the uri
each feature file is identified by from where the file is -- `features/` for the
packaged assets, `extensions/` for anything under a `tck-extensions` directory.
Nothing read that derivation, because the thing it exists for is a report, and
the report is here.
So the emitter uses it, falling back to what pytest-bdd called a file when the
file is neither. pytest-bdd names a feature by its parent directory joined to its
own name, which two files can share: an extension at
`tck-extensions/features/errors.feature` arrives under exactly the uri the
canonical `errors.feature` occupies, and a Messages stream carries one Source per
uri -- the canonical source is parsed first, the extension's is never read, and
its scenarios are reported against the canonical file's pickles or against none
at all.
Deriving the uri closes the route an adopter is actually likely to take. It does
not close the other two, and those are now refused rather than documented: a
feature file of the adopter's own that would reach the reserved `features/`
prefix, and two files that would share one uri. Both fail the run and write no
report. A document presenting an adopter's feature file as the specification's --
or one file's scenarios against another's source -- is worse than no document,
because it is the one thing a consumer cannot check from the outside. Java
measured the loud form: a same-named feature file in a second classpath root
replaced the canonical one outright and the run went green having asked the
adopter's questions.
`test_extension_reporting` checks the half of the extension point a consumer
reads, and leaves the half that is about running scenarios where it already is:
`test_extensions` asks whether an extension runs inside the canonical suite, and
answers it out of pytest's own JUnit XML, with no report in sight.
Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>1 parent 795a58a commit ebd416c
3 files changed
Lines changed: 678 additions & 6 deletions
File tree
- tools/openfeature-provider-tck
- src/openfeature/contrib/tools/provider_tck
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
| 517 | + | |
513 | 518 | | |
514 | 519 | | |
| 520 | + | |
515 | 521 | | |
516 | 522 | | |
517 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | | - | |
| 122 | + | |
| 123 | + | |
117 | 124 | | |
118 | 125 | | |
119 | | - | |
120 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| |||
317 | 330 | | |
318 | 331 | | |
319 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
320 | 340 | | |
321 | 341 | | |
322 | 342 | | |
| |||
375 | 395 | | |
376 | 396 | | |
377 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
378 | 431 | | |
379 | 432 | | |
380 | 433 | | |
| |||
0 commit comments