Skip to content

Commit

Permalink
12: move temp test files to subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea committed Dec 20, 2024
1 parent 4955325 commit 3126858
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
tmp
local
/local
/tests/tmp/*
!/tests/tmp/.keep
7 changes: 7 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ log = "0.4.22"
[[bin]]
name = "cargo-pike"
path = "src/main.rs"

[dev-dependencies]
constcat = "0.5.1"
7 changes: 4 additions & 3 deletions tests/helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use constcat::concat;
use log::info;
use std::ffi::OsStr;
use std::io::{BufRead, BufReader, Write};
Expand All @@ -10,8 +11,8 @@ use std::{
time::{Duration, Instant},
};

pub const PLUGIN_DIR: &str = "./tests/test_plugin/";
pub const TESTS_DIR: &str = "./tests";
pub const TESTS_DIR: &str = "./tests/tmp/";
pub const PLUGIN_DIR: &str = concat!(TESTS_DIR, "test_plugin/");

pub struct Cluster {}

Expand Down Expand Up @@ -164,7 +165,7 @@ pub fn await_picodata_admin(timeout: Duration) -> Result<Child, std::io::Error>

let picodata_admin = Command::new("picodata")
.arg("admin")
.arg("./tests/test_plugin/tmp/cluster/i_1/admin.sock")
.arg(PLUGIN_DIR.to_string() + "tmp/cluster/i_1/admin.sock")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn();
Expand Down
Empty file added tests/tmp/.keep
Empty file.

0 comments on commit 3126858

Please sign in to comment.