Make it easy to run cargo test locally (#4347)
This commit is contained in:
parent
7d0e45be00
commit
491ed09233
3 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,7 @@ run_task = { name = ["start-surrealdb", "test-api-integration", "stop-surrealdb"
|
||||||
[tasks.test-database-upgrade]
|
[tasks.test-database-upgrade]
|
||||||
private = true
|
private = true
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
env = { RUST_BACKTRACE = 1, RUST_LOG = "info" }
|
env = { RUST_BACKTRACE = 1, RUST_LOG = "info", RUSTFLAGS = "--cfg docker" }
|
||||||
args = ["test", "--locked", "--no-default-features", "--features", "${_TEST_FEATURES}", "--workspace", "--test", "database_upgrade", "--", "database_upgrade", "--show-output"]
|
args = ["test", "--locked", "--no-default-features", "--features", "${_TEST_FEATURES}", "--workspace", "--test", "database_upgrade", "--", "database_upgrade", "--show-output"]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1109,6 +1109,7 @@ mod cli_integration {
|
||||||
}
|
}
|
||||||
|
|
||||||
info!("* The path is a valid directory");
|
info!("* The path is a valid directory");
|
||||||
|
#[cfg(feature = "storage-surrealkv")]
|
||||||
{
|
{
|
||||||
let path = format!("surrealkv:{}", tempfile::tempdir().unwrap().path().display());
|
let path = format!("surrealkv:{}", tempfile::tempdir().unwrap().path().display());
|
||||||
let temp_dir = tempfile::tempdir().unwrap();
|
let temp_dir = tempfile::tempdir().unwrap();
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
|
#[cfg(docker)]
|
||||||
mod database_upgrade {
|
mod database_upgrade {
|
||||||
use super::common::docker::DockerContainer;
|
use super::common::docker::DockerContainer;
|
||||||
use super::common::expected::Expected;
|
use super::common::expected::Expected;
|
||||||
|
|
Loading…
Reference in a new issue