test_pair_endpoint: 2 failures from #29 drift (fake_pair missing bunker_relay; test DB lacks super_config) #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two tests in
tests/test_pair_endpoint.pyhave been red since #29, surfaced while running the full suite for #33:test_pair_failure_maps_to_bad_gateway(and the persist test) —_wire'sfake_pairmock signature is(machine, *, relays, admin_client, duration_hours=None), but #29 madeapi_pair_machinecallpair_spire(..., bunker_relay=data.bunker_relay, ...)→TypeError: fake_pair() got an unexpected keyword argument 'bunker_relay'.test_pair_persists_hex_npub_and_returns_seed— after fixing (1), it then hitssqlite3.OperationalError: no such table: spirekeeper.super_configatviews_api.pyapi_pair_machine, because #29 added a post-pairingget_super_config()+publish_fee_config()that the test neither mocks nor provisions a table for.Both are test drift from #29 (optional-npub + bunker_relay + post-pairing fee publish), not a production bug. Fix:
bunker_relay=None, keystore_passphrase=Noneto thefake_pairmock;views_api.get_super_config(→ aSuperConfigorNone) andviews_api.publish_fee_configin_wire, so the endpoint's post-pairing publish is exercised without a real DB.Kept out of #33 (unpaired-machine guards) to keep that PR focused.