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 task test #1581

Merged
merged 1 commit into from
Jul 8, 2024
Merged
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
8 changes: 5 additions & 3 deletions tests/task_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ async fn test_task_with_env() {

pixi.tasks()
.add("env-test".into(), None, FeatureName::Default)
.with_commands(["echo From a $HELLO"])
.with_commands(["echo From a $HELLO_WORLD"])
.with_env(vec![(
String::from("HELLO"),
String::from("HELLO_WORLD"),
String::from("world with spaces"),
)])
.execute()
Expand All @@ -246,7 +246,6 @@ async fn test_clean_env() {
pixi.init().without_channels().await.unwrap();

std::env::set_var("HELLO", "world from env");

pixi.tasks()
.add("env-test".into(), None, FeatureName::Default)
.with_commands(["echo Hello is: $HELLO"])
Expand Down Expand Up @@ -282,3 +281,6 @@ async fn test_clean_env() {
assert_eq!(result.exit_code, 0);
assert_eq!(result.stdout, "Hello is: world from env\n");
}

// When adding another test with an environment variable, please choose a unique name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol good catch!

// to avoid collisions
Loading