Skip to content

Share fixtures across language binding tests - #1866

Draft
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:shared-binding-test-vectors
Draft

Share fixtures across language binding tests#1866
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:shared-binding-test-vectors

Conversation

@chavic

@chavic chavic commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Binding tests duplicate PSBT and OHTTP data across languages. Store the existing vectors in payjoin-test-utils/fixtures and load the same files from Rust, Python, Dart, JavaScript, and C# so fixture updates have one source.

Preserve the five existing Rust PSBT constants with include_str!, including the intentionally invalid input. Add test-local loaders, include fixtures in Nix's source filter and C# test output, and check that the fixed OHTTP vector decodes and re-encodes correctly. The fixed OHTTP vector remains separate from the deterministic key/server pair used by request-decryption tests. No new FFI exports or dependencies are introduced.

Seed the Dart native wrapper from the maintained lockfile as well. Its previous fresh resolution selected encoding_rs 0.8.40 (Rust 1.88) in the Rust 1.85 test shell, preventing the binding tests from running.

Addresses the PSBT/OHTTP portion of #1199. URI literals and test-service namespacing remain separate follow-ups.

Disclosure: co-authored by Codex

Pull Request Checklist

Keep common PSBT and OHTTP vectors in one source so Rust and the
Python, Dart, JavaScript, and C# tests cannot drift independently.
Preserve the existing PSBT constants and document the fixed OHTTP
vector separately from keys used for request decryption.

Seed Dart's native wrapper from the maintained lockfile so test
builds retain dependency versions compatible with the MSRV.
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 34217292992

Coverage increased (+0.004%) to 86.644%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: 6 of 6 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16480
Covered Lines: 14279
Line Coverage: 86.64%
Coverage Strength: 343.1 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants