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

Split test code #1023

Merged
merged 17 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,26 +137,6 @@ jobs:
env:
RUSTFLAGS: -D warnings

aries_vcx_no_features_clippy:
runs-on: ubuntu-20.04
steps:
- name: "Git checkout"
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSON }}
components: clippy
- name: "Install dependencies"
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y libsodium-dev libssl-dev libzmq3-dev
- name: "Verify clippy across the entire workspace with default features"
run: |
cargo clippy -p aries-vcx --no-default-features
env:
RUSTFLAGS: -D warnings

aries_vcx_core_clippy:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -257,7 +237,7 @@ jobs:
run: |
RUSTFLAGS='-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' \
RUSTDOCFLAGS='-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' \
RUST_TEST_THREADS=1 CARGO_INCREMENTAL=0 TEST_POOL_IP=127.0.0.1 cargo test --package aries-vcx -- --ignored;
RUST_TEST_THREADS=1 CARGO_INCREMENTAL=0 TEST_POOL_IP=127.0.0.1 cargo test --package aries-vcx -F vdrtools_wallet credx -- --ignored;

mkdir -p /tmp/artifacts/coverage
grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o /tmp/artifacts/coverage/coverage.lcov
Expand Down Expand Up @@ -302,7 +282,7 @@ jobs:
with:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
- name: "Run aries-vcx integration tests"
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -- --ignored;
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F vdrtools_wallet credx -- --ignored;

test-integration-aries-vcx-mysql:
needs: workflow-setup
Expand Down Expand Up @@ -339,7 +319,7 @@ jobs:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
skip-vdrproxy-setup: false
- name: "Run aries-vcx tests: vdrproxy_test"
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F vdr_proxy_ledger -- --ignored
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F vdr_proxy_ledger credx -- --ignored
- name: "Collect docker logs on failure"
if: failure()
uses: ./.github/actions/upload-docker-logs
Expand Down
94 changes: 48 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ members = [
"public_key",
"indy_ledger_response_parser",
"wallet_migrator",
"tools/simple_message_relay"
"tools/simple_message_relay",
"tools/test_utils",
"tools/libvcx_logger"
]

[workspace.package]
Expand Down
2 changes: 1 addition & 1 deletion agents/rust/aries-vcx-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ serde = "1.0.145"
aries-vcx = { path = "../../../aries_vcx" }
aries_vcx_core = { path = "../../../aries_vcx_core", features = ["credx", "vdrtools_wallet"] }
async-trait = "0.1.64"
derive_builder = "0.11.2"
derive_builder = "0.12.0"
serde_json = "1.0.85"
log = "0.4.17"
uuid = "1.2.1"
Expand Down
7 changes: 5 additions & 2 deletions agents/rust/aries-vcx-agent/src/agent/agent_struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use std::sync::Arc;

use aries_vcx::utils::devsetup::{DefaultIndyLedgerRead, DefaultIndyLedgerWrite};
use aries_vcx_core::{anoncreds::credx_anoncreds::IndyCredxAnonCreds, wallet::indy::IndySdkWallet};
use aries_vcx_core::{
anoncreds::credx_anoncreds::IndyCredxAnonCreds,
ledger::indy_vdr_ledger::{DefaultIndyLedgerRead, DefaultIndyLedgerWrite},
wallet::indy::IndySdkWallet,
};

use crate::{
agent::agent_config::AgentConfig,
Expand Down
20 changes: 14 additions & 6 deletions agents/rust/aries-vcx-agent/src/agent/init.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use std::sync::Arc;

use aries_vcx::{
global::settings::DEFAULT_LINK_SECRET_ALIAS, utils::devsetup::dev_build_profile_modular,
};
use aries_vcx::global::settings::DEFAULT_LINK_SECRET_ALIAS;
use aries_vcx_core::{
self,
anoncreds::base_anoncreds::BaseAnonCreds,
anoncreds::{base_anoncreds::BaseAnonCreds, credx_anoncreds::IndyCredxAnonCreds},
wallet::indy::{
wallet::{create_and_open_wallet, wallet_configure_issuer},
IndySdkWallet, WalletConfig,
Expand Down Expand Up @@ -65,8 +63,18 @@ impl Agent {

let wallet = Arc::new(IndySdkWallet::new(wallet_handle));

let (ledger_read, ledger_write, anoncreds) =
dev_build_profile_modular(init_config.pool_config.genesis_path);
use aries_vcx_core::ledger::indy_vdr_ledger::{build_ledger_components, VcxPoolConfig};

info!("dev_build_profile_modular >>");
let vcx_pool_config = VcxPoolConfig {
indy_vdr_config: None,
response_cache_config: None,
genesis_file_path: init_config.pool_config.genesis_path,
};

let anoncreds = IndyCredxAnonCreds;
let (ledger_read, ledger_write) = build_ledger_components(vcx_pool_config).unwrap();

let ledger_read = Arc::new(ledger_read);
let ledger_write = Arc::new(ledger_write);

Expand Down
3 changes: 1 addition & 2 deletions agents/rust/aries-vcx-agent/src/services/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ use aries_vcx::{
protocols::connection::{
pairwise_info::PairwiseInfo, Connection, GenericConnection, State, ThinState,
},
utils::devsetup::DefaultIndyLedgerRead,
};
use aries_vcx_core::wallet::indy::IndySdkWallet;
use aries_vcx_core::{ledger::indy_vdr_ledger::DefaultIndyLedgerRead, wallet::indy::IndySdkWallet};
use url::Url;

use crate::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::sync::{Arc, Mutex};

use aries_vcx::{
common::primitives::credential_definition::{CredentialDef, CredentialDefConfig},
utils::devsetup::{DefaultIndyLedgerRead, DefaultIndyLedgerWrite},
use aries_vcx::common::primitives::credential_definition::{CredentialDef, CredentialDefConfig};
use aries_vcx_core::{
anoncreds::credx_anoncreds::IndyCredxAnonCreds,
ledger::indy_vdr_ledger::{DefaultIndyLedgerRead, DefaultIndyLedgerWrite},
wallet::indy::IndySdkWallet,
};
use aries_vcx_core::{anoncreds::credx_anoncreds::IndyCredxAnonCreds, wallet::indy::IndySdkWallet};

use crate::{
error::*,
Expand Down
Loading
Loading