diff --git a/aries_vcx/src/protocols/proof_presentation/verifier/states/presentation_request_sent.rs b/aries_vcx/src/protocols/proof_presentation/verifier/states/presentation_request_sent.rs index e5eae8cc7c..a63abe1033 100644 --- a/aries_vcx/src/protocols/proof_presentation/verifier/states/presentation_request_sent.rs +++ b/aries_vcx/src/protocols/proof_presentation/verifier/states/presentation_request_sent.rs @@ -78,7 +78,10 @@ impl impl From<(PresentationRequestSentState, ProblemReport)> for FinishedState { fn from((state, problem_report): (PresentationRequestSentState, ProblemReport)) -> Self { - trace!("transit state from PresentationRequestSentState to FinishedState"); + trace!( + "transit state from PresentationRequestSentState to FinishedState; problem_report: {:?}", + problem_report + ); FinishedState { presentation_request: Some(state.presentation_request), presentation: None, diff --git a/aries_vcx/tests/test_creds_proofs.rs b/aries_vcx/tests/test_creds_proofs.rs index 479d6ebce5..bb27c6fea8 100644 --- a/aries_vcx/tests/test_creds_proofs.rs +++ b/aries_vcx/tests/test_creds_proofs.rs @@ -400,7 +400,7 @@ mod integration_tests { #[ignore] async fn test_agency_pool_generate_proof_with_predicates() { SetupProfile::run(|mut setup| async move { - let (_, _, _, _, _, _, _, _, rev_reg_id, cred_rev_id, tails_dir, rev_reg) = create_and_store_credential( + let (_, _, _, _, _, _, _, _, rev_reg_id, cred_rev_id, tails_dir, _) = create_and_store_credential( &setup.profile.inject_anoncreds(), &setup.profile.inject_anoncreds(), &setup.profile.inject_anoncreds_ledger_read(), @@ -584,7 +584,8 @@ mod tests { create_nonrevocable_cred_offer, create_proof_proposal, create_proof_request_data, create_prover_from_request, create_verifier_from_request_data, decline_offer, exchange_proof_and_verify, generate_and_send_proof, issue_address_credential, prover_select_credentials, prover_select_credentials_and_send_proof, - receive_proof_proposal_rejection, reject_proof_proposal, send_credential, verify_proof, + receive_proof_proposal_rejection, reject_proof_proposal, send_credential, + verifier_create_proof_and_send_request, verify_proof, }; #[tokio::test] @@ -813,7 +814,14 @@ mod tests { ) .await; + #[cfg(feature = "migration")] + consumer1.migrate().await; + exchange_proof_and_verify(&mut verifier, &mut consumer1, &schema_id, &cred_def_id, Some("request1"), PresentationVerificationStatus::Valid).await; + + #[cfg(feature = "migration")] + consumer2.migrate().await; + exchange_proof_and_verify(&mut verifier, &mut consumer2, &schema_id, &cred_def_id, Some("request2"), PresentationVerificationStatus::Valid).await; }).await; } @@ -841,6 +849,10 @@ mod tests { PresentationVerificationStatus::Valid, ) .await; + + #[cfg(feature = "migration")] + verifier.migrate().await; + exchange_proof_and_verify( &mut verifier, &mut consumer, @@ -875,7 +887,16 @@ mod tests { ) .await; + // NOTE: Credx-anoncreds-implementation-generated presentation is not compatible with vdrtools anoncreds implementation + // as the presentation fails to deserialize + #[cfg(feature = "migration")] + consumer.migrate().await; + exchange_proof_and_verify(&mut institution, &mut consumer, &schema_id, &cred_def_id, Some("request1"), PresentationVerificationStatus::Valid).await; + + #[cfg(feature = "migration")] + institution.migrate().await; + exchange_proof_and_verify(&mut institution, &mut consumer, &schema_id, &cred_def_id, Some("request2"), PresentationVerificationStatus::Valid).await; }).await; } @@ -963,7 +984,7 @@ mod tests { let presentation_thread_id = verifier.get_thread_id().unwrap(); info!("test_real_proof :: Going to create proof"); - prover_select_credentials_and_send_proof(&mut consumer, presentation_request, None); + prover_select_credentials_and_send_proof(&mut consumer, presentation_request, None).await; }) .await; } @@ -1009,6 +1030,10 @@ mod tests { verifier.migrate().await; exchange_proof_and_verify(&mut verifier, &mut consumer, &schema_id, &cred_def_id, req1, PresentationVerificationStatus::Valid).await; + + #[cfg(feature = "migration")] + consumer.migrate().await; + exchange_proof_and_verify(&mut verifier, &mut consumer, &schema_id, &cred_def_id, req2, PresentationVerificationStatus::Valid).await; }).await; } diff --git a/aries_vcx/tests/test_creds_proofs_revocations.rs b/aries_vcx/tests/test_creds_proofs_revocations.rs index 09c9885f83..360c599c4b 100644 --- a/aries_vcx/tests/test_creds_proofs_revocations.rs +++ b/aries_vcx/tests/test_creds_proofs_revocations.rs @@ -280,6 +280,12 @@ mod integration_tests { assert!(!issuer_credential2.is_revoked(&institution.profile.inject_anoncreds_ledger_read()).await.unwrap()); assert!(!issuer_credential3.is_revoked(&institution.profile.inject_anoncreds_ledger_read()).await.unwrap()); + #[cfg(feature = "migration")] + consumer2.migrate().await; + + #[cfg(feature = "migration")] + consumer3.migrate().await; + // Revoke two locally and verify their are all still valid exchange_proof_and_verify(&mut institution, &mut consumer1, &schema_id, &cred_def_id, Some("request1"), PresentationVerificationStatus::Valid).await; exchange_proof_and_verify(&mut institution, &mut consumer2, &schema_id, &cred_def_id, Some("request2"), PresentationVerificationStatus::Valid).await; diff --git a/aries_vcx/tests/utils/scenarios.rs b/aries_vcx/tests/utils/scenarios.rs index f6db3058a3..db2ee6c3fa 100644 --- a/aries_vcx/tests/utils/scenarios.rs +++ b/aries_vcx/tests/utils/scenarios.rs @@ -1082,13 +1082,10 @@ pub mod test_utils { ) -> Verifier { let mut verifier = verifier_create_proof_and_send_request(institution, &schema_id, &cred_def_id, request_name).await; - - #[cfg(feature = "migration")] - consumer.migrate().await; - let presentation = prover_select_credentials_and_send_proof(consumer, verifier.get_presentation_request_msg().unwrap(), None) .await; + verifier .verify_presentation( &institution.profile.inject_anoncreds_ledger_read(),