Skip to content

Commit

Permalink
fix: make conditional compilation of tests depend on var content (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
twuebi authored Aug 29, 2024
1 parent 475db44 commit 79036db
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/iceberg-catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ veil = { workspace = true }

[dev-dependencies]
http-body-util = { workspace = true }
needs_env_var = { workspace = true }
needs_env_var = { git = "https://github.com/twuebi/needs_env_var.git", rev = "bf14242" }
tower = { workspace = true }
tracing-subscriber = { workspace = true }
2 changes: 1 addition & 1 deletion crates/iceberg-catalog/src/implementations/kv2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ fn secret_ident_to_key(secret_id: SecretIdent) -> String {
mod tests {
use needs_env_var::needs_env_var;

#[needs_env_var(TEST_KV2)]
#[needs_env_var(TEST_KV2 = 1)]
mod kv2 {
use crate::service::storage::{S3Credential, StorageCredential};
use crate::CONFIG;
Expand Down
2 changes: 1 addition & 1 deletion crates/iceberg-catalog/src/service/storage/az.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ mod test {
use super::*;
use needs_env_var::needs_env_var;

#[needs_env_var(TEST_AZURE)]
#[needs_env_var(TEST_AZURE = 1)]
mod azure_tests {
use crate::service::storage::{AzCredential, AzdlsProfile};
use crate::service::storage::{StorageCredential, StorageProfile};
Expand Down
4 changes: 2 additions & 2 deletions crates/iceberg-catalog/src/service/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ mod test {
assert_eq!(location.to_string(), expected);
}

#[needs_env_var(TEST_MINIO)]
#[needs_env_var(TEST_MINIO = 1)]
mod minio {
use crate::service::storage::{
S3Credential, S3Flavor, S3Profile, StorageCredential, StorageProfile,
Expand Down Expand Up @@ -897,7 +897,7 @@ mod test {
}
}

#[needs_env_var(TEST_AWS)]
#[needs_env_var(TEST_AWS = 1)]
mod aws {
use crate::service::storage::{StorageCredential, StorageProfile};

Expand Down

0 comments on commit 79036db

Please sign in to comment.