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

dotenv tests fail #1879

Closed
Skgland opened this issue Jan 26, 2024 · 3 comments
Closed

dotenv tests fail #1879

Skgland opened this issue Jan 26, 2024 · 3 comments

Comments

@Skgland
Copy link

Skgland commented Jan 26, 2024

bennet@DESKTOP-RP6E64N:~/git/just$> cargo test
<!-- snip -->
failures:

---- dotenv::can_set_dotenv_path_from_justfile stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::can_set_dotenv_path_from_justfile' panicked at tests/test.rs:266:7:
Output mismatch.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- dotenv::filename_flag_overwrites_no_load stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::filename_flag_overwrites_no_load' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::filename_resolves stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::filename_resolves' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::program_argument_has_priority_for_dotenv_filename stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"baz\n"

thread 'dotenv::program_argument_has_priority_for_dotenv_filename' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::can_set_dotenv_filename_from_justfile stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::can_set_dotenv_filename_from_justfile' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::path_resolves stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::path_resolves' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::program_argument_has_priority_for_dotenv_path stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"baz\n"

thread 'dotenv::program_argument_has_priority_for_dotenv_path' panicked at tests/test.rs:266:7:
Output mismatch.

---- dotenv::path_flag_overwrites_no_load stdout ----
Bad stdout: Diff < left / right > :
<"DESKTOP-RP6E64N\n"
>"bar\n"

thread 'dotenv::path_flag_overwrites_no_load' panicked at tests/test.rs:266:7:
Output mismatch.


failures:
    dotenv::can_set_dotenv_filename_from_justfile
    dotenv::can_set_dotenv_path_from_justfile
    dotenv::filename_flag_overwrites_no_load
    dotenv::filename_resolves
    dotenv::path_flag_overwrites_no_load
    dotenv::path_resolves
    dotenv::program_argument_has_priority_for_dotenv_filename
    dotenv::program_argument_has_priority_for_dotenv_path

test result: FAILED. 645 passed; 8 failed; 7 ignored; 0 measured; 0 filtered out; finished in 0.82s

error: test failed, to rerun pass `--test integration`
$> cargo --version
cargo 1.75.0 (1d8b05cdd 2023-11-20)
$> rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)
$> git branch -v
* master d1e2ef7 Install mdbook with cargo in CI workflow (#1877)
$> git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

In WSL2

$> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
@Skgland Skgland changed the title dotenv tests fail with CARGO_TARGET_DIR set dotenv tests fail Jan 26, 2024
@Skgland
Copy link
Author

Skgland commented Jan 26, 2024

$> export
<!-- snip -->
declare -x NAME="DESKTOP-RP6E64N"
<!-- snip -->

@Skgland
Copy link
Author

Skgland commented Jan 26, 2024

It looks like the test maybe expect NAME to be unset?

@casey
Copy link
Owner

casey commented Jan 27, 2024

Whoops! Yeah we should definitely use a different variable name. I changed NAME to JUST_TEST_VARIABLE in #1882, which should hopefully fix this.

@casey casey closed this as completed Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants