Skip to content

test: use walletkit-testkit for core proof-generation integration tests#449

Merged
kilianglas merged 7 commits into
mainfrom
kilianglas/use-testkit-integration-tests
Jul 21, 2026
Merged

test: use walletkit-testkit for core proof-generation integration tests#449
kilianglas merged 7 commits into
mainfrom
kilianglas/use-testkit-integration-tests

Conversation

@kilianglas

@kilianglas kilianglas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates walletkit-core's proof-generation integration tests onto the walletkit-testkit helpers, removing a second hand-rolled copy of the full staging proof flow and its duplicated hardcoded fixtures (RP id, issuer schema, keys, verifier, RPC), which now live centrally in TestEnv.

Changes

  • Add walletkit-testkit as a dev-dependency of walletkit-core (path-only, publish = false, so it is stripped from the published manifest). Add tempfile as a dev-dependency.
  • Rewrite crates/walletkit-core/tests/proof_generation_integration.rs:
    • e2e_authenticator_generate_proof collapses to a single generate_and_verify_test_proof(CredentialType::Local, .., ProofType::Uniqueness) call (~200 lines → a few).
    • e2e_session_proof is rebuilt on the lower-level helpers (init_and_register_account, issue_local_credential, build_test_request), keeping the parts unique to this crate: the follow-up ProofType::Session proof and the WIP-103 ownership-proof Merkle-root cross-check.
    • Both tests keep running by default (not #[ignore]d), exactly as before the migration — this PR does not change which tests run in CI.
  • TestEnv::default_staging() now honors the WORLDCHAIN_RPC_URL env var (for both the verifier RPC and the World ID config), preserving the migrated tests' previous behavior — CI passes this from a secret.
  • Remove build_base_credential from tests/common.rs — it was a verbatim duplicate of walletkit_testkit::issuer::build_base_credential and is no longer referenced.

Test plan

  • cargo clippy --workspace --all-targets -- -D warnings — clean.
  • cargo fmt --check — clean.
  • cargo package -p walletkit-core — packaged manifest contains no walletkit-testkit reference (dev-dep stripped), confirming publish safety.
  • The migrated e2e tests run against staging in the regular test suite:
    cargo test -p walletkit-core --test proof_generation_integration --features embed-zkeys

Comment thread crates/walletkit-core/tests/proof_generation_integration.rs Outdated
Dzejkop
Dzejkop previously approved these changes Jul 21, 2026
@kilianglas
kilianglas merged commit 83a40b6 into main Jul 21, 2026
21 checks passed
@kilianglas
kilianglas deleted the kilianglas/use-testkit-integration-tests branch July 21, 2026 13:31
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