Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests that use std::env::set_var #253

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -exuo pipefail

# Quick sanity check
cargo test
cargo test -- --ignored --test-threads=1

# Check that no code needs reformatting. Acts as a minimal integration test.
cargo run -- --fail-on-change
Expand Down
2 changes: 2 additions & 0 deletions src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ pub fn run_cli(cli: &Cli) -> anyhow::Result<()> {
#[cfg(test)]
mod tests {
#[test]
#[ignore = "std::env::set_var: should not be run in parallel."]
fn current_dir_prefers_pwd_env_var() {
use crate::command::current_dir;
use std::env;
Expand All @@ -192,6 +193,7 @@ mod tests {
}

#[test]
#[ignore = "std::env::set_var: should not be run in parallel."]
fn current_dir_uses_dereferenced_path_when_pwd_env_var_not_set() {
use crate::command::current_dir;
use std::env;
Expand Down
Loading