You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
constanze
committed
test(pem): make the compiled-out direct-query build actually pass
The kill-switch build compiled but its tests did not run clean — 28 of 38
failed under --define=PX_PEM_DIRECT_QUERY=disabled before this change, so the
disabled configuration was evidently never exercised.
Two causes:
- Only the two CompiledOut_* tests sat behind the #ifdef. Every other test
asserts enabled-path behaviour (valid tokens stream rows, tampered tokens
are rejected by the verifier) and ran against the linker stubs, which have
none of that behaviour. Guard the enabled-path block, and the trailing
benchmark placeholder that uses the exec fixture, with #ifndef.
- The CompiledOut_* expectations contradicted the stub they test:
DirectQueryServer::ExecuteScript returns UNIMPLEMENTED without consulting
credentials, and DIRECT_QUERY_SECURITY.md documents exactly that as the
user-visible error, but the tests expected UNAUTHENTICATED. Expect
UNIMPLEMENTED, and cover the fail-closed AuthenticateRequest stub directly
so 'no token can re-enable the feature' keeps its assertion.
kWrongSigningKey is only used by the guarded tests, so it needs
[[maybe_unused]] to survive -Wunused-const-variable in a disabled build.
Verified with --config=x86_64_sysroot:
default 37 tests, 34 passed, 3 skipped
--//…:direct_query=false 3 tests, 3 passed
0 commit comments