cortex / ripasso

A simple password manager written in Rust
GNU General Public License v3.0
707 stars 61 forks source link

Tests fail if CARGO_TARGET_DIR is set #348

Open nwalfield opened 2 months ago

nwalfield commented 2 months ago

When I run cargo test on my machine, all tests pass. If I do the following some tests fail:

$ export CARGO_TARGET_DIR=$(mktemp -d)
$ cargo test
   Compiling libc v0.2.153
...
running 127 tests
...
test pass::pass_tests::test_add_recipient_not_in_key_ring ... ok

failures:

---- git::git_tests::test_should_sign_false stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- git::git_tests::test_should_sign_true stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::get_history_with_repo stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::password_store_with_sparse_checkout stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::password_store_with_shallow_checkout stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::password_store_with_symlink stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::populate_password_list_small_repo stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::populate_password_list_directory_without_git stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::populate_password_list_repo_with_deleted_files stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::password_store_with_relative_path stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::password_store_with_files_in_initial_commit stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::rename_file_git_index_clean stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::rename_file_absolute_path stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::rename_file stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::test_add_and_commit_internal stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::test_move_and_commit_signed stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::test_remove_and_commit stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

---- pass::pass_tests::test_verify_git_signature stdout ----
Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

failures:
    git::git_tests::test_should_sign_false
    git::git_tests::test_should_sign_true
    pass::pass_tests::get_history_with_repo
    pass::pass_tests::password_store_with_files_in_initial_commit
    pass::pass_tests::password_store_with_relative_path
    pass::pass_tests::password_store_with_shallow_checkout
    pass::pass_tests::password_store_with_sparse_checkout
    pass::pass_tests::password_store_with_symlink
    pass::pass_tests::populate_password_list_directory_without_git
    pass::pass_tests::populate_password_list_repo_with_deleted_files
    pass::pass_tests::populate_password_list_small_repo
    pass::pass_tests::rename_file
    pass::pass_tests::rename_file_absolute_path
    pass::pass_tests::rename_file_git_index_clean
    pass::pass_tests::test_add_and_commit_internal
    pass::pass_tests::test_move_and_commit_signed
    pass::pass_tests::test_remove_and_commit
    pass::pass_tests::test_verify_git_signature

test result: FAILED. 109 passed; 18 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s

I'm using ff0db6bf5414aa82e39bf8cfc283a238323ebea8