diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-18 17:58:34 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-18 18:31:35 +0100 |
commit | b55f52a9b75359b02938ac003a6ea853b36a4f3e (patch) | |
tree | fcf59c762f2fd904a8c0567e7466f10a536ae77b | |
parent | e8f9718ccd656dacc4fba2ed9fa5d8abf12ad37b (diff) | |
download | garage-b55f52a9b75359b02938ac003a6ea853b36a4f3e.tar.gz garage-b55f52a9b75359b02938ac003a6ea853b36a4f3e.zip |
[sqlite-r2d2] run integration test with all db enginessqlite-r2d2
-rw-r--r-- | .woodpecker/debug.yaml | 4 | ||||
-rw-r--r-- | nix/compile.nix | 4 | ||||
-rw-r--r-- | src/garage/tests/common/garage.rs | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/.woodpecker/debug.yaml b/.woodpecker/debug.yaml index 59ae8c06..9e1443dc 100644 --- a/.woodpecker/debug.yaml +++ b/.woodpecker/debug.yaml @@ -33,7 +33,9 @@ steps: - ./result/bin/garage_util-* - ./result/bin/garage_web-* - ./result/bin/garage-* - - ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) + - GARAGE_TEST_INTEGRATION_DB_ENGINE=sled ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) + - GARAGE_TEST_INTEGRATION_DB_ENGINE=lmdb ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) + - GARAGE_TEST_INTEGRATION_DB_ENGINE=sqlite ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) - rm result - rm -rv tmp-garage-integration diff --git a/nix/compile.nix b/nix/compile.nix index 1e712710..b276495d 100644 --- a/nix/compile.nix +++ b/nix/compile.nix @@ -168,13 +168,11 @@ let rootFeatures = if features != null then features else - ([ "garage/bundled-libs" "garage/sled" "garage/lmdb" "garage/k2v" ] ++ (if release then [ + ([ "garage/bundled-libs" "garage/sled" "garage/lmdb" "garage/sqlite" "garage/k2v" ] ++ (if release then [ "garage/consul-discovery" "garage/kubernetes-discovery" "garage/metrics" "garage/telemetry-otlp" - "garage/lmdb" - "garage/sqlite" ] else [ ])); diff --git a/src/garage/tests/common/garage.rs b/src/garage/tests/common/garage.rs index d1f0867a..006337ee 100644 --- a/src/garage/tests/common/garage.rs +++ b/src/garage/tests/common/garage.rs @@ -42,6 +42,10 @@ impl Instance { .ok() .unwrap_or_else(|| env::temp_dir().join(format!("garage-integ-test-{}", port))); + let db_engine = env::var("GARAGE_TEST_INTEGRATION_DB_ENGINE") + .ok() + .unwrap_or_else(|| "lmdb".into()); + // Clean test runtime directory if path.exists() { fs::remove_dir_all(&path).expect("Could not clean test runtime directory"); @@ -52,7 +56,7 @@ impl Instance { r#" metadata_dir = "{path}/meta" data_dir = "{path}/data" -db_engine = "lmdb" +db_engine = "{db_engine}" replication_mode = "1" |