Skip to content

Commit

Permalink
testing/remove-mixed-breed
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
  • Loading branch information
Patrik-Stas committed Jul 23, 2023
1 parent e341f18 commit f38fae4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 142 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ jobs:
cargo check --features vdrtools --no-default-features
cargo check --features modular_libs --no-default-features
cargo check --features vdr_proxy_ledger --no-default-features
cargo check --features mixed_breed
##########################################################################################
############################## DOCKER BUILD ##########################################
Expand Down Expand Up @@ -483,17 +482,6 @@ jobs:
with:
name: "docker-services-${{ github.job }}"

test-integration-aries-vcx-mixed-breed:
needs: workflow-setup
runs-on: ubuntu-20.04
steps:
- name: "Git checkout"
uses: actions/checkout@v3
- name: "Setup rust testing environment"
uses: ./.github/actions/setup-testing-rust
- name: "Run aries-vcx integration tests"
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F mixed_breed -- --include-ignored;

test-integration-aries-vcx-migration:
needs: workflow-setup
runs-on: ubuntu-20.04
Expand Down
3 changes: 0 additions & 3 deletions aries_vcx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ modular_libs = ["aries_vcx_core/modular_libs"]
# TODO: Remove using "vdrtools" feature flag for vdr_proxy_ledger once IndyCredxAnonCreds
# is fully implemented
vdr_proxy_ledger = ["aries_vcx_core/vdr_proxy_ledger", "vdrtools"]
# Temporary feature used for testing the full credx anoncreds impl
# using vdrtools ledger and wallet.
mixed_breed = ["vdrtools", "modular_libs"]
# Used for testing the migrator
migration = ["vdrtools", "modular_libs"]

Expand Down
6 changes: 1 addition & 5 deletions aries_vcx/src/common/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ pub async fn get_verkey_from_ledger(indy_ledger: &Arc<dyn IndyLedgerRead>, did:
mod test {
#[tokio::test]
#[ignore]
#[cfg(all(
not(feature = "vdr_proxy_ledger"),
not(feature = "modular_libs"),
not(feature = "mixed_breed")
))]
#[cfg(all(not(feature = "vdr_proxy_ledger"), not(feature = "modular_libs"),))]
async fn test_pool_rotate_verkey_fails() {
use super::*;

Expand Down
82 changes: 0 additions & 82 deletions aries_vcx/src/core/profile/mixed_breed_profile.rs

This file was deleted.

2 changes: 0 additions & 2 deletions aries_vcx/src/core/profile/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(feature = "mixed_breed")]
pub mod mixed_breed_profile;
#[cfg(feature = "modular_libs")]
pub mod modular_libs_profile;
pub mod profile;
Expand Down
38 changes: 0 additions & 38 deletions aries_vcx/src/utils/devsetup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ use aries_vcx_core::indy::ledger::pool::{
create_pool_ledger_config, indy_close_pool, indy_delete_pool, indy_open_pool,
};

#[cfg(feature = "mixed_breed")]
use crate::core::profile::mixed_breed_profile::MixedBreedProfile;
#[cfg(feature = "modular_libs")]
use crate::core::profile::modular_libs_profile::ModularLibsProfile;
#[cfg(feature = "modular_libs")]
Expand Down Expand Up @@ -138,12 +136,6 @@ impl SetupProfile {
info!("SetupProfile >> using indy profile");
SetupProfile::build_profile_vdrtools(genesis_file_path).await
};
#[cfg(feature = "mixed_breed")]
return {
info!("SetupProfile >> using mixed breed profile");
SetupProfile::build_profile_mixed_breed(genesis_file_path).await
};

#[cfg(feature = "modular_libs")]
return {
info!("SetupProfile >> using modular profile");
Expand Down Expand Up @@ -215,36 +207,6 @@ impl SetupProfile {
}
}

#[cfg(feature = "mixed_breed")]
async fn build_profile_mixed_breed(genesis_file_path: String) -> SetupProfile {
// todo: can remove?
let pool_name = Uuid::new_v4().to_string();
create_pool_ledger_config(&pool_name, &genesis_file_path).unwrap();
let pool_handle = indy_open_pool(&pool_name, None).await.unwrap();

let (institution_did, wallet_handle) = setup_issuer_wallet().await;

let profile: Arc<dyn Profile> = Arc::new(MixedBreedProfile::new(wallet_handle, pool_handle.clone()));

Arc::clone(&profile)
.inject_anoncreds()
.prover_create_link_secret(settings::DEFAULT_LINK_SECRET_ALIAS)
.await
.unwrap();

async fn indy_teardown(pool_handle: PoolHandle, pool_name: String) {
indy_close_pool(pool_handle.clone()).await.unwrap();
indy_delete_pool(&pool_name).await.unwrap();
}

SetupProfile {
genesis_file_path,
institution_did,
profile,
teardown: Arc::new(move || Box::pin(indy_teardown(pool_handle, pool_name.clone()))),
}
}

#[cfg(feature = "vdr_proxy_ledger")]
async fn build_profile_vdr_proxy_ledger(genesis_file_path: String) -> SetupProfile {
use std::env;
Expand Down

0 comments on commit f38fae4

Please sign in to comment.