Repository navigation
Commit 3fce71e
committed
feat(provider-tck): refuse a report that did not run the canonical set
The capability gate rules out the loud way a conformance suite can go green on
scenarios it did not run: an undeclared capability is reported as skipped, with
its reason, never as passed. Nothing ruled out the quiet way, where the
scenarios were never collected at all. `-k`, `-m`, `--deselect`, or a test
module that stopped calling `scenarios()` on the canonical path each run less of
the suite, and none of them is an error to pytest.
Go measured the consequence: `-run` on a single scenario passed green and
emitted a well-formed report covering one of twenty-nine canonical scenarios,
with nothing in the document saying so.
So every run is now checked against the scenarios this distribution ships. The
expectation is compiled from the packaged feature files with the same Gherkin
compiler that produces the results payload, which makes it one entry per
Scenario Outline row -- the granularity the runner generates, and therefore the
only one a comparison can be made at. A suite that did not execute all of them
fails the run and writes no report, naming the scenarios that are missing.
Two things may not close a gap. A scenario the capability gate skipped counts as
having run, because it was asked and the report accounts for it with a reason.
An adopter's own scenarios do not count at all: they are matched by path against
the packaged assets rather than by the uri the emitter derives, so the check does
not rest on the same derivation it exists to corroborate.
`PROVIDER_TCK_PARTIAL=1` buys a green run for someone working on one scenario,
and nothing else -- an incomplete suite writes no report either way. Java's TCK
spells the same escape hatch the same way.
Two adjustments fall out of it. Scenarios are enumerated `trylast` so that
pytest's own deselection has already happened, or a filtered run reports every
deselected scenario as collected but never run and drowns the one message that
matters. And the self-test for per-Examples tags now runs its feature file as an
extension beside the canonical set, because a suite that leaves the canonical set
out no longer produces a report to read back.
Separable from the extension work by design: it guards a bypass rather than
enabling anything, and dropping it leaves the extension point unaffected.
Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>1 parent 7e39639 commit 3fce71e
7 files changed
Lines changed: 652 additions & 32 deletions
File tree
- tools/openfeature-provider-tck
- src/openfeature/contrib/tools/provider_tck
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
387 | 415 | | |
388 | 416 | | |
389 | 417 | | |
| |||
464 | 492 | | |
465 | 493 | | |
466 | 494 | | |
| 495 | + | |
467 | 496 | | |
468 | 497 | | |
469 | | - | |
| 498 | + | |
470 | 499 | | |
471 | 500 | | |
472 | | - | |
473 | | - | |
474 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
475 | 505 | | |
476 | 506 | | |
477 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
100 | 115 | | |
101 | 116 | | |
102 | 117 | | |
| |||
222 | 237 | | |
223 | 238 | | |
224 | 239 | | |
| 240 | + | |
225 | 241 | | |
226 | | - | |
| 242 | + | |
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
230 | 253 | | |
231 | 254 | | |
232 | 255 | | |
| |||
294 | 317 | | |
295 | 318 | | |
296 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
297 | 338 | | |
298 | 339 | | |
299 | 340 | | |
300 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
301 | 344 | | |
302 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
303 | 351 | | |
304 | 352 | | |
305 | 353 | | |
306 | 354 | | |
307 | 355 | | |
308 | 356 | | |
309 | 357 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 358 | | |
314 | 359 | | |
| 360 | + | |
| 361 | + | |
315 | 362 | | |
316 | 363 | | |
317 | 364 | | |
| |||
324 | 371 | | |
325 | 372 | | |
326 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
327 | 418 | | |
328 | 419 | | |
329 | 420 | | |
330 | 421 | | |
331 | 422 | | |
332 | 423 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 424 | | |
341 | 425 | | |
342 | 426 | | |
| |||
406 | 490 | | |
407 | 491 | | |
408 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
409 | 498 | | |
410 | 499 | | |
411 | 500 | | |
| |||
0 commit comments