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

Tests fails locally #23

Open
apraga opened this issue Jun 16, 2024 · 2 comments
Open

Tests fails locally #23

apraga opened this issue Jun 16, 2024 · 2 comments

Comments

@apraga
Copy link

apraga commented Jun 16, 2024

Hi,

Running cargo test on main branch (v0.8.11, commit 14e1ccf) fails for some tests

test tests::test_add_already_added_error ... FAILED
test tests::test_add_update_status_modified ... FAILED                   
test tests::test_mv ... FAILED
test tests::test_add_already_added_error ... FAILED

Details

failures:

---- tests::test_init stdout ----
thread 'tests::test_init' panicked at tests/test_project.rs:37:9:
Project::init() did not create 'data_manifest.yml'

---- tests::test_add_already_added_error stdout ----
thread 'tests::test_add_already_added_error' panicked at tests/common/mod.rs:215:38:
setting up TestFixture failed: Failed to load the project configuration

Caused by:
    missing field `user`

---- tests::test_add_update_status_modified stdout ----
thread 'tests::test_add_update_status_modified' panicked at tests/common/mod.rs:215:38:
setting up TestFixture failed: Failed to load the project configuration

Caused by:
    missing field `user`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::test_mv stdout ----
thread 'tests::test_mv' panicked at tests/test_project.rs:193:61:
called `Result::unwrap()` on an `Err` value: Path 'data/data.tsv' does not exist.


failures:
    tests::test_add_already_added_error
    tests::test_add_update_status_modified
    tests::test_init
    tests::test_mv

test result: FAILED. 2 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s

error: test failed, to rerun pass `--test test_project`

There is a data_manifest.yml and a config file though :

❯ cat ~/.scidataflow_config
user:
  name: Joan B. Scientist
  email: [email protected]
  affiliation: UC Berkeley

scidataflow on  main [?] is 📦 v0.8.11 via 🦀 v1.78.0
❯ cat data_manifest.yml
files: []
remotes: {}
metadata:
  title: test_project
  description: null

It's surprising that CI passes but not on my computer. Should there be a data folder too ?
I'm using nushell if that may be of interest.

Thanks,

@vsbuffalo
Copy link
Owner

Hi @apraga,

Thank you for this issue and your PR! I am swamped this week and traveling, but I hope to merge the PR in a week or so (if I do not, please feel free to ping me).

Regarding tests, try cargo test -- --test-threads=1. The problem is that the elaborate web testing fails for unexpected queries. If tests are multi-threaded, the mock server will get tests out of order. AFAIK there is no way to set this in the cargo file.

@apraga
Copy link
Author

apraga commented Jun 18, 2024 via email

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