Skip to content

Commit

Permalink
Enable compiling the workspace with --tests --all-features (#890)
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Kovar <[email protected]>
  • Loading branch information
mirgee authored Jul 3, 2023
1 parent c1180a7 commit 21dfe9b
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 42 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ jobs:
run: |
cd aries_vcx
cargo check
cargo check --tests --all-features
cargo check --no-default-features
cargo check --features vdrtools --no-default-features
cargo check --features modular_libs --no-default-features
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion libvcx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![deny(clippy::unwrap_used)]
#![cfg_attr(feature = "fatal_warnings", deny(warnings))]
#![crate_name = "vcx"]
//this is needed for some large json macro invocations
#![recursion_limit = "128"]
Expand Down
26 changes: 0 additions & 26 deletions libvcx_core/src/api_vcx/api_handle/issuer_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,32 +361,6 @@ pub mod tests {
assert_eq!(get_state(credential_handle).unwrap(), u32::from(IssuerState::OfferSent));
}

#[tokio::test]
#[cfg(feature = "general_test")]
async fn test_retry_build_credential_offer() {
let _setup = SetupMocks::init();

let _connection_handle = build_test_connection_inviter_requested().await;

let credential_handle = _issuer_credential_create();
assert_eq!(get_state(credential_handle).unwrap(), u32::from(IssuerState::Initial));

StatusCodeMock::set_next_result(error::TIMEOUT_LIBINDY_ERROR);

let (_, cred_def_handle) = create_and_publish_nonrevocable_creddef().await;
let _err = build_credential_offer_msg_v2(credential_handle, cred_def_handle, 1234, _cred_json(), None)
.await
.unwrap_err();
assert_eq!(get_state(credential_handle).unwrap(), u32::from(IssuerState::Initial));

// Can retry after initial failure
let (_, cred_def_handle) = create_and_publish_nonrevocable_creddef().await;
let _err = build_credential_offer_msg_v2(credential_handle, cred_def_handle, 1234, _cred_json(), None)
.await
.unwrap();
assert_eq!(get_state(credential_handle).unwrap(), u32::from(IssuerState::OfferSet));
}

#[tokio::test]
#[cfg(feature = "general_test")]
async fn test_from_string_succeeds() {
Expand Down
2 changes: 1 addition & 1 deletion libvcx_core/src/api_vcx/api_handle/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub mod tests {

#[cfg(feature = "pool_tests")]
use crate::api_vcx::api_handle::schema;
#[cfg(feature = "pool_tests")]
#[cfg(any(feature = "pool_tests", feature = "general_test"))]
use crate::api_vcx::api_handle::schema::test_utils::{check_schema, create_schema_real, prepare_schema_data};
#[cfg(feature = "pool_tests")]
use crate::api_vcx::utils::devsetup::SetupGlobalsWalletPoolAgency;
Expand Down
1 change: 0 additions & 1 deletion libvcx_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![deny(clippy::unwrap_used)]
#![cfg_attr(feature = "fatal_warnings", deny(warnings))]
// todo: is this recursion_limit still needed and justified?
//this is needed for some large json macro invocations
#![recursion_limit = "128"]
Expand Down
3 changes: 3 additions & 0 deletions libvdrtools/indy-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ serde_derive = "1.0.99"
sqlx = { version = "0.5.8", git = "https://github.com/jovfer/sqlx", branch = "feature/json_no_preserve_order_v5", features = [ "sqlite", "mysql", "json_no_preserve_order", "runtime-tokio-rustls" ] }
zeroize = "~1.3.0"
lru = "0.7.6"

[dev-dependencies]
async-std = "1.12.0"
1 change: 0 additions & 1 deletion libvdrtools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#[macro_use]
extern crate log;

#[macro_use]
extern crate num_derive;

extern crate num_traits;
Expand Down
12 changes: 0 additions & 12 deletions libvdrtools/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,3 @@ pub use indy_utils::wql;
pub mod qualifier;

pub mod extensions;

macro_rules! map (
{ $($key:expr => $value:expr),+ } => {
{
let mut m = ::std::collections::HashMap::new();
$(
m.insert($key, $value);
)+
m
}
};
);

0 comments on commit 21dfe9b

Please sign in to comment.