Skip to content

Commit

Permalink
fix: make those annoying hostname tests run in serial so they don't f…
Browse files Browse the repository at this point in the history
…lake (#166)
  • Loading branch information
sighphyre authored Nov 7, 2024
1 parent 69b47e0 commit ce88e47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions unleash-yggdrasil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async-std = "1.0.1"
async-std-test = "0.0.4"
criterion = "0.5.1"
proptest = "1.2.0"
serial_test = "3.1.1"

[[bench]]
name = "benchmark"
Expand Down
5 changes: 5 additions & 0 deletions unleash-yggdrasil/src/strategy_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,9 +1078,12 @@ mod tests {

#[cfg(feature = "hostname")]
mod hostname_tests {
use serial_test::serial;

use super::*;

#[test]
#[serial]
fn evaluates_host_name_constraint_correctly() {
std::env::set_var("hostname", "DOS");

Expand All @@ -1092,6 +1095,7 @@ mod tests {
}

#[test]
#[serial]
fn evaluates_host_name_to_false_when_missing_hostname_values() {
std::env::set_var("hostname", "DOS");

Expand All @@ -1103,6 +1107,7 @@ mod tests {
}

#[test]
#[serial]
fn hostname_constraint_ignores_casing() {
std::env::set_var("hostname", "DaRWin");

Expand Down

0 comments on commit ce88e47

Please sign in to comment.