Skip to content

Commit

Permalink
test: update testing suite to write to a more visible path for easy d…
Browse files Browse the repository at this point in the history
…eletion
  • Loading branch information
Tyler Slaton committed Jul 15, 2022
1 parent 726f9fe commit d7abcf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target

.idea

test_runs/
4 changes: 2 additions & 2 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use rand::{thread_rng, Rng};
use std::error::Error;

const PRG: &str = "dcp";
const TEST_CONTENT_DIR: &str = "/tmp/dcp_test_run";
const TEST_CONTENT_DIR: &str = "./test_runs";
const DEFAULT_IMAGE: &str = "quay.io/tyslaton/sample-catalog:v0.0.4";
const IMAGE_NO_TAG: &str = "quay.io/tyslaton/sample-catalog";
const SCRATCH_BASE_IMAGE: &str = "quay.io/tflannag/bundles:resolveset-v0.0.2";
Expand All @@ -14,7 +14,7 @@ const SCRATCH_BASE_IMAGE: &str = "quay.io/tflannag/bundles:resolveset-v0.0.2";
// returns a new string with an appended 5 digit string
fn generate_temp_path() -> String {
let random_string = thread_rng().gen_range(10000..99999);
return format!("{}_{}", TEST_CONTENT_DIR, random_string);
return format!("{}/{}", TEST_CONTENT_DIR, random_string);
}

type TestResult = Result<(), Box<dyn Error>>;
Expand Down

0 comments on commit d7abcf4

Please sign in to comment.