test: drop empty doctest and lib-test targets, ignore service tests (#11852)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-10-17 22:30:42 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 69745894fa
commit 5fc5327e60
81 changed files with 230 additions and 105 deletions
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_bash"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
regex-lite.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_csharp"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_go"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_graphql"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
regex-lite.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_java"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_parser_nu"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_php"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_py_asset"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,9 @@ authors.workspace = true
[lib]
name = "windmill_parser_py_imports"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
regex-lite.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_py"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_r"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_ruby"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_rust"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_sql_asset"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_sql"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
regex-lite.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser_ts_asset"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen.workspace = true
@@ -8,6 +8,9 @@ authors.workspace = true
[lib]
name = "windmill_parser_ts"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen.workspace = true
@@ -7,6 +7,9 @@ authors.workspace = true
[lib]
name = "windmill_parser_wac"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
ruff_python_parser.workspace = true
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_parser_yaml"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
yaml-rust.workspace = true
@@ -7,6 +7,8 @@ authors.workspace = true
[lib]
name = "windmill_parser"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
serde = { version = "1.0", features = ["derive"] }
@@ -9,6 +9,8 @@ authors.workspace = true
crate-type = ["cdylib"]
name = "windmill_sql_datatype_parser_wasm"
path = "./src/lib.rs"
# src/ has no unit tests: remove this line before adding one, or cargo test never runs it.
test = false
[dev-dependencies]
wasm-bindgen-test.workspace = true
+2
View File
@@ -12,6 +12,8 @@ mcp = ["dep:windmill-mcp"]
[lib]
name = "windmill_ai"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-common = { workspace = true, default-features = false }
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_alerting"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-common = { workspace = true, default-features = false }
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_agent_workers"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_assets"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
private = ["windmill-common/private"]
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_auth"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_client"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_configs"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_debug"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_embeddings"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_flow_conversations"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-api-auth.workspace = true
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_flows"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_groups"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_inputs"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-api-auth.workspace = true
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_integration_tests"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
@@ -14,14 +14,16 @@
//! (lowkey-vault), which the `AzureKeyVaultBackend` talks to via its
//! static-token / self-signed-cert emulator mode.
//!
//! Run it:
//! The test is `#[ignore]`d, so a plain `cargo test` skips it without creating
//! a database. Run it with `--ignored` (`AZURE_KV_URL` overrides the default
//! https://localhost:8443):
//! ```bash
//! podman run -d --name lowkey -p 8443:8443 \
//! -e LOWKEY_ARGS="--LOWKEY_VAULT_NAMES=default" \
//! docker.io/nagyesta/lowkey-vault:7.3.0
//!
//! RUN_AZURE_KV_TESTS=1 cargo test -p windmill-api-integration-tests \
//! --features private,enterprise --test fork_secret_replication_azure -- --nocapture
//! cargo test -p windmill-api-integration-tests \
//! --features private,enterprise --test fork_secret_replication_azure -- --ignored --nocapture
//! ```
#[cfg(all(feature = "private", feature = "enterprise"))]
@@ -55,11 +57,8 @@ mod azure_fork {
}
#[sqlx::test(migrations = "../migrations", fixtures("base"))]
#[ignore = "requires a lowkey-vault Azure Key Vault emulator at AZURE_KV_URL"]
async fn migrated_secret_is_replicated_on_fork(db: Pool<Postgres>) -> anyhow::Result<()> {
if std::env::var("RUN_AZURE_KV_TESTS").as_deref() != Ok("1") {
eprintln!("skipping: set RUN_AZURE_KV_TESTS=1 and start lowkey-vault to run");
return Ok(());
}
initialize_tracing().await;
// The Azure KV emulator persists across runs; derive unique names per run
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_jobs"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_npm_proxy"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_openapi"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-api-auth.workspace = true
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_schedule"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_scripts"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_settings"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_sse"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_users"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_api_workers"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
windmill-api-auth.workspace = true
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api_workspaces"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_api"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_audit"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
enterprise = ["windmill-common/enterprise"]
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_autoscaling"
path = "./src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
enterprise = ["windmill-queue/enterprise", "windmill-common/enterprise"]
@@ -12,43 +12,24 @@
//! localstack/localstack:3.8
//! ```
//!
//! 2. Run the tests:
//! 2. Run the tests (they are `#[ignore]`d, so a plain `cargo test` skips them):
//!
//! ```bash
//! RUN_AWS_SM_TESTS=1 cargo test -p windmill-common --features private,enterprise \
//! aws_sm_integration -- --nocapture
//! cargo test -p windmill-common --features private,enterprise \
//! --test aws_sm_integration -- --ignored --nocapture
//! ```
//!
//! ## Environment variables
//!
//! - `RUN_AWS_SM_TESTS=1` - Required to run the tests
//! - `AWS_SM_ENDPOINT` - LocalStack endpoint (default: http://localhost:4566)
//! - `AWS_SM_REGION` - AWS region (default: us-east-1)
#[cfg(all(feature = "private", feature = "enterprise"))]
mod tests {
use windmill_common::secret_backend::{
test_aws_sm_connection, AwsSecretsManagerBackend, AwsSecretsManagerSettings,
SecretBackend,
test_aws_sm_connection, AwsSecretsManagerBackend, AwsSecretsManagerSettings, SecretBackend,
};
fn should_run_aws_sm_tests() -> bool {
std::env::var("RUN_AWS_SM_TESTS")
.map(|v| v == "1" || v.to_lowercase() == "true")
.unwrap_or(false)
}
macro_rules! skip_if_no_aws_sm {
() => {
if !should_run_aws_sm_tests() {
println!("Skipping test: RUN_AWS_SM_TESTS=1 not set");
println!("To run: RUN_AWS_SM_TESTS=1 cargo test -p windmill-common --features private,enterprise aws_sm_integration -- --nocapture");
println!("Requires: docker run -d -p 4566:4566 -e SERVICES=secretsmanager localstack/localstack:3.8");
return;
}
};
}
fn test_settings() -> AwsSecretsManagerSettings {
AwsSecretsManagerSettings {
region: std::env::var("AWS_SM_REGION").unwrap_or_else(|_| "us-east-1".to_string()),
@@ -63,16 +44,16 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_connection() {
skip_if_no_aws_sm!();
let result = test_aws_sm_connection(&test_settings()).await;
assert!(result.is_ok(), "Connection test failed: {:?}", result.err());
println!(" ✓ Connection test passed");
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_create_and_get_secret() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -81,16 +62,22 @@ mod tests {
.set_secret("test-ws", "u/admin/my_secret", "super-secret-value")
.await
.unwrap();
let value = backend.get_secret("test-ws", "u/admin/my_secret").await.unwrap();
let value = backend
.get_secret("test-ws", "u/admin/my_secret")
.await
.unwrap();
assert_eq!(value, "super-secret-value");
backend.delete_secret("test-ws", "u/admin/my_secret").await.unwrap();
backend
.delete_secret("test-ws", "u/admin/my_secret")
.await
.unwrap();
println!(" ✓ Create + Get + Delete roundtrip passed");
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_update_secret() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -117,8 +104,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_delete_and_verify_gone() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -142,8 +129,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_delete_nonexistent_is_ok() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -160,8 +147,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_get_nonexistent_returns_not_found() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -178,8 +165,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_unicode_and_special_chars() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -203,8 +190,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_workspace_isolation() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -244,8 +231,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires LocalStack secretsmanager at AWS_SM_ENDPOINT"]
async fn test_backend_name() {
skip_if_no_aws_sm!();
let backend = AwsSecretsManagerBackend::new_with_client(test_settings())
.await
.unwrap();
@@ -23,11 +23,12 @@
//! - Trust the emulator's certificate, or
//! - Set `AZURE_KV_ALLOW_INSECURE=true` to skip TLS verification (test only)
//!
//! 3. Run the tests:
//! 3. Run the tests (they are `#[ignore]`d, so a plain `cargo test` skips them;
//! `AZURE_KV_URL` overrides the default https://localhost:4997):
//!
//! ```bash
//! RUN_AZURE_KV_TESTS=1 cargo test -p windmill-common --features private,enterprise \
//! azure_kv_integration -- --nocapture
//! cargo test -p windmill-common --features private,enterprise \
//! --test azure_kv_integration -- --ignored --nocapture
//! ```
//!
//! ## Emulator authentication
@@ -41,22 +42,6 @@ mod tests {
test_azure_kv_connection, AzureKeyVaultBackend, AzureKeyVaultSettings, SecretBackend,
};
fn should_run_azure_kv_tests() -> bool {
std::env::var("RUN_AZURE_KV_TESTS")
.map(|v| v == "1" || v.to_lowercase() == "true")
.unwrap_or(false)
}
macro_rules! skip_if_no_azure_kv {
() => {
if !should_run_azure_kv_tests() {
println!("Skipping test: RUN_AZURE_KV_TESTS=1 not set");
println!("To run Azure KV tests: RUN_AZURE_KV_TESTS=1 cargo test ...");
return;
}
};
}
/// A minimal valid JWT token (the emulator doesn't verify signatures).
/// Format: base64(header).base64(payload).base64(signature)
fn dummy_jwt_token() -> String {
@@ -82,9 +67,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires an Azure Key Vault emulator at AZURE_KV_URL"]
async fn test_azure_kv_connection_with_token() {
skip_if_no_azure_kv!();
let settings = azure_kv_settings();
println!("Testing Azure KV connection...");
println!(" URL: {}", settings.vault_url);
@@ -99,9 +83,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires an Azure Key Vault emulator at AZURE_KV_URL"]
async fn test_azure_kv_crud() {
skip_if_no_azure_kv!();
let backend = create_backend();
let workspace_id = "test-crud";
let path = "test-secret";
@@ -160,9 +143,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires an Azure Key Vault emulator at AZURE_KV_URL"]
async fn test_azure_kv_not_found() {
skip_if_no_azure_kv!();
let backend = create_backend();
let result = backend
@@ -173,9 +155,8 @@ mod tests {
}
#[tokio::test]
#[ignore = "requires an Azure Key Vault emulator at AZURE_KV_URL"]
async fn test_azure_kv_secret_name_encoding() {
skip_if_no_azure_kv!();
let backend = create_backend();
let workspace_id = "demo";
let path = "u/admin/my_secret_key";
@@ -3,24 +3,26 @@
//! These tests require:
//! 1. A PostgreSQL database (handled by sqlx test framework)
//! 2. A running HashiCorp Vault instance
//! 3. The RUN_VAULT_TESTS=1 environment variable to be set
//!
//! They are `#[ignore]`d, so a plain `cargo test` skips them without creating a
//! database; pass `--ignored` to run them.
//!
//! Environment variables:
//! - RUN_VAULT_TESTS=1 - Required to run the tests
//! - VAULT_ADDR - Vault server address (default: http://127.0.0.1:8200)
//! - VAULT_TOKEN - Static token for static token tests (default: test-root-token)
//! - BASE_URL - Windmill instance URL for JWT tests (default: http://localhost:8000)
//!
//! Run tests (static token mode):
//! ```bash
//! RUN_VAULT_TESTS=1 VAULT_TOKEN=your-token cargo test -p windmill \
//! secret_backend_integration --features private,enterprise -- --nocapture
//! VAULT_TOKEN=your-token cargo test -p windmill-common \
//! --test secret_backend_integration --features private,enterprise -- --ignored --nocapture
//! ```
//!
//! Run tests (JWT mode - requires Windmill instance running for JWKS endpoint):
//! ```bash
//! RUN_VAULT_TESTS=1 BASE_URL=http://localhost:8000 cargo test -p windmill \
//! secret_backend_integration --features private,enterprise,openidconnect -- --nocapture
//! BASE_URL=http://localhost:8000 cargo test -p windmill-common \
//! --test secret_backend_integration --features private,enterprise,openidconnect \
//! -- --ignored --nocapture
//! ```
#[cfg(all(feature = "private", feature = "enterprise"))]
@@ -62,12 +64,6 @@ mod tests {
}
}
fn should_run_vault_tests() -> bool {
std::env::var("RUN_VAULT_TESTS")
.map(|v| v == "1" || v.to_lowercase() == "true")
.unwrap_or(false)
}
#[cfg(feature = "openidconnect")]
async fn setup_base_url() {
let base_url =
@@ -75,16 +71,6 @@ mod tests {
windmill_common::BASE_URL.store(std::sync::Arc::new(base_url));
}
macro_rules! skip_if_no_vault {
() => {
if !should_run_vault_tests() {
println!("Skipping test: RUN_VAULT_TESTS=1 not set");
println!("To run vault tests: RUN_VAULT_TESTS=1 cargo test ...");
return;
}
};
}
fn vault_settings_static_token() -> VaultSettings {
VaultSettings {
address: std::env::var("VAULT_ADDR")
@@ -120,9 +106,8 @@ mod tests {
/// Test Vault connection with static token
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_vault_connection_static_token(db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
println!("Testing Vault connection with static token...");
println!(" Address: {}", settings.address);
@@ -138,9 +123,8 @@ mod tests {
/// Test basic CRUD operations with static token
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_vault_crud_static_token(_db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
let backend = VaultBackend::new(settings);
@@ -199,8 +183,8 @@ mod tests {
/// Test Vault connection with JWT authentication
#[cfg(feature = "openidconnect")]
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR and a Windmill instance at BASE_URL"]
async fn test_vault_connection_jwt(db: Pool<Postgres>) {
skip_if_no_vault!();
setup_base_url().await;
let settings = vault_settings_jwt();
@@ -224,8 +208,8 @@ mod tests {
/// Test basic CRUD operations with JWT authentication
#[cfg(feature = "openidconnect")]
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR and a Windmill instance at BASE_URL"]
async fn test_vault_crud_jwt(db: Pool<Postgres>) {
skip_if_no_vault!();
setup_base_url().await;
let settings = vault_settings_jwt();
@@ -269,9 +253,8 @@ mod tests {
/// Test migration from database to Vault
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_migrate_db_to_vault(db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
test_vault_connection(&settings, Some(&db))
@@ -331,9 +314,8 @@ mod tests {
/// Test migration from Vault back to database
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_migrate_vault_to_db(db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
test_vault_connection(&settings, Some(&db))
@@ -396,8 +378,8 @@ mod tests {
/// Test renaming a variable path in Vault
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_variable_rename(db: Pool<Postgres>) {
skip_if_no_vault!();
let _ = &db; // suppress unused warning
let settings = vault_settings_static_token();
@@ -468,9 +450,8 @@ mod tests {
/// Test full round-trip: DB -> Vault -> DB with verification
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_full_round_trip(db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
test_vault_connection(&settings, Some(&db))
@@ -532,9 +513,8 @@ mod tests {
/// Test that workspace isolation is maintained
#[sqlx::test(migrations = "../migrations", fixtures("base", "secret_backend"))]
#[ignore = "requires a Vault server at VAULT_ADDR"]
async fn test_workspace_isolation(db: Pool<Postgres>) {
skip_if_no_vault!();
let settings = vault_settings_static_token();
let backend = VaultBackend::new(settings.clone());
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_dep_map"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_git_sync"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
private = ["windmill-common/private", "windmill-dep-map/private", "windmill-audit/private"]
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_indexer"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_jseval"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
[lib]
proc-macro = true
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[dependencies]
proc-macro2.workspace = true
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_mcp"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_native_triggers"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_oauth"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -24,6 +24,8 @@ openidconnect = ["windmill-common/openidconnect"]
[lib]
name = "windmill_object_store"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-common = { workspace = true, default-features = false }
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_operator"
path = "./src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
enterprise = ["windmill-common/enterprise"]
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_queue"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_runtime_nativets"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_store"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_test_utils"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger_amqp"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_azure"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_email"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger_gcp"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger_http"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_kafka"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_mqtt"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_nats"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger_postgres"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
[lib]
name = "windmill_trigger_sqs"
path = "src/lib.rs"
# src/ has no unit tests or doctests: remove both lines before adding one, or cargo test never runs it.
test = false
doctest = false
[features]
default = []
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger_websocket"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_trigger"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_types"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[dependencies]
windmill-parser.workspace = true
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_worker_volumes"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
enterprise = []
+2
View File
@@ -7,6 +7,8 @@ edition.workspace = true
[lib]
name = "windmill_worker"
path = "src/lib.rs"
# src/ has no doctests: remove this line before adding one, or cargo test never runs it.
doctest = false
[features]
default = []