Commit a4ea2c1
Real-builder all-fields integration tests
Summary:
Bring Python, Java, and Ruby to parity with the NodeJS/PHP suites: exercise the
REAL registry ParamBuilder (no mocks) for every default field these three ports
auto-populate from the request context -- fbc, fbp, event_source_url, and
referrer_url -- not just fbp.
Previously these three suites covered the full auto-populate matrix with a MOCKED
ParamBuilder and touched the real dependency only via an API-existence guardrail
plus a single fbp case. This adds real-builder cases for the remaining fields
(extraction + caller-precedence + Preference gating), so the SDK<->upstream
contract is exercised end-to-end against the pinned registry versions.
Also fixes a latent bug in the existing Python and Ruby real-builder tests: they
passed a nested {headers:{cookie:...}} context, but the real RequestContextAdaptor
reads flat env keys (HTTP_HOST / HTTP_COOKIE / ...). With no cookie seen, the
builder GENERATES a fresh fbp and the weak startswith('fb.') assertion passed
spuriously. Switched to the flat env shape and assert on the supplied cookie
value. (Java's existing real test already used the correct flat shape.)
The upstream builder appends an appendix token to every value, so assertions
match the prefix (startsWith / start_with the input) rather than exact equality.
Note: client_ip_address is intentionally not covered for these three ports --
none of them auto-populate it from the builder (only PHP/NodeJS do).
Reviewed By: xuanjie22
Differential Revision: D107207093
fbshipit-source-id: ee5f074ae11515b7f8ad621896bea5a700bf27481 parent 7d16f93 commit a4ea2c1
1 file changed
Lines changed: 47 additions & 0 deletions
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
453 | 500 | | |
0 commit comments