Skip to content

Commit

Permalink
fix: cargo test --all-features
Browse files Browse the repository at this point in the history
- remove benches (see `fix/benches`)
- remove `serialization` feature to fix tests that depend on it.
  • Loading branch information
tbrezot committed Jan 18, 2024
1 parent b875ca3 commit a476bc5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@ name = "cosmian_cover_crypt"
# The cdylib is only interesting if the `--features ffi` flag is set on build
# This does not seem to be actionable conditionally https://github.com/rust-lang/cargo/issues/4881

[[bench]]
name = "benches"
harness = false
# [[bench]]
# name = "benches"
# harness = false

[features]
serialization = []
test_utils = ["base64"]
full_bench = ["serialization"]
full_bench = []
hybridized_bench = []

[dependencies]
base64 = { version = "0.21.0", optional = true }
cosmian_crypto_core = { version = "9.2.0", default-features = false, features = ["ser", "sha3", "aes", "curve25519"] }
pqc_kyber = { version = "0.4", features = ["std", "hazmat"] }
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion src/core/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl Covercrypt {
///
/// All user keys need to be refreshed.
///
/// - `access_policy` : describe the keys to renew
/// - `ap` : describe the keys to renew
/// - `policy` : global policy
/// - `msk` : master secret key
/// - `mpk` : master public key
Expand Down
2 changes: 0 additions & 2 deletions src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ pub mod macros;

pub mod api;
pub mod primitives;

#[cfg(feature = "serialization")]
pub mod serialization;

/// The symmetric key is 32 bytes long to provide 128 bits of post-quantum
Expand Down
5 changes: 3 additions & 2 deletions src/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::{
Error,
};

#[cfg(feature = "serialization")]
pub mod non_regression;

pub fn policy() -> Result<Policy, Error> {
Expand Down Expand Up @@ -41,9 +40,11 @@ mod tests {
use super::*;
use crate::{
abe_policy::{AccessPolicy, Attribute, LegacyPolicy, Partition},
Covercrypt, EncryptedHeader, UserSecretKey,
Covercrypt, EncryptedHeader,
};

use crate::UserSecretKey;

#[test]
fn write_policy() {
let _policy = policy().unwrap();
Expand Down

0 comments on commit a476bc5

Please sign in to comment.