Skip to content

Commit

Permalink
ci: Disable azure client secrets test if not set
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Aug 6, 2024
1 parent 9d604a0 commit f50cf30
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/azure/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ async fn test_head_blob_with_client_secret() -> Result<()> {
return Ok(());
}

if env::var("REQSIGN_AZURE_STORAGE_CLIENT_SECRET")
.unwrap_or_default()
.is_empty()
{
warn!("REQSIGN_AZURE_STORAGE_CLIENT_SECRET is not set, skipped");
return Ok(());
}

let config = AzureStorageConfig::default().from_env();

assert!(config.client_secret.is_some());
Expand Down Expand Up @@ -442,6 +450,14 @@ async fn test_can_list_container_blobs_client_secret() -> Result<()> {
return Ok(());
}

if env::var("REQSIGN_AZURE_STORAGE_CLIENT_SECRET")
.unwrap_or_default()
.is_empty()
{
warn!("REQSIGN_AZURE_STORAGE_CLIENT_SECRET is not set, skipped");
return Ok(());
}

let config = AzureStorageConfig::default().from_env();

assert!(config.client_secret.is_some());
Expand Down

0 comments on commit f50cf30

Please sign in to comment.