Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local revocation integration test #123

Merged
merged 6 commits into from
Oct 2, 2020
Merged

Add local revocation integration test #123

merged 6 commits into from
Oct 2, 2020

Conversation

mirgee
Copy link
Contributor

@mirgee mirgee commented Sep 30, 2020

Signed-off-by: Miroslav Kovar miroslavkovar@protonmail.com

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

let institution_did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID).unwrap();
let (faber, alice) = ::connection::tests::create_connected_connections();
let (schema_id, cred_def_id, rev_reg_id, _cred_def_handle, credential_offer) = _issue_address_credential(faber, alice, &institution_did);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that the last element is credential handle but it is called credential_offer is bit confusing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also in the _issue_address_credential function itself

::issuer_credential::revoke_credential(issuer_handle).unwrap();
let (_, delta_after_revoke, _) = ::utils::libindy::anoncreds::get_rev_reg_delta_json(&rev_reg_id.unwrap(), Some(timestamp + 1), None).unwrap();
assert_ne!(delta, delta_after_revoke);
}

fn revoke_credential_local(issuer_handle: u32, rev_reg_id: Option<String>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be better if this function only takes issuer_handle as parameter and gets rev_reg_id from credential itself, even if it means adding new getter on issuer credential

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

# Conflicts:
#	libvcx/src/connection.rs
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@mirgee mirgee merged commit 5077af2 into master Oct 2, 2020
@mirgee mirgee deleted the tests/batch-rev branch October 2, 2020 16:49
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.

None yet

2 participants