Skip to content

Commit

Permalink
fix(test): use correct username
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead committed Jan 10, 2025
1 parent 3556927 commit 91253ea
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
18 changes: 18 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions huber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ chrono.workspace = true
assert_cmd = "2.0.16"
pretty_assertions = "1.4.1"
rstest = "0.24.0"
whoami = "1.5.2"

[dependencies]
anyhow.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions huber/tests/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use scopeguard::defer;
use tempfile::tempdir;
use whoami::username;

#[macro_use]
mod common;
Expand All @@ -12,11 +13,10 @@ fn test_config_not_found() {
reset_huber();
}

huber_cmd!(arg("config")
.arg("show")
.assert()
.failure()
.stderr("[WARN ] Config not found: \"/home/davidko/.huber/config.yaml\"\n",));
huber_cmd!(arg("config").arg("show").assert().failure().stderr(format!(
"[WARN ] Config not found: \"/home/{}/.huber/config.yaml\"\n",
username()
)));
}

#[test]
Expand Down

0 comments on commit 91253ea

Please sign in to comment.