-
Notifications
You must be signed in to change notification settings - Fork 7
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
feature git makes tests non-deterministic #29
Comments
I'm assuming you have some kind of global git config or something that is affecting tests on your machine, the git tests in this repo have been 100% reproducible since they were added since they only rely on local operations, not networked ones. The tests work for the purposes of this project, but if you end up finding out why they don't on your machine feel free to open a PR. |
I guess that it might be that I have my environment setup to sign my git commits:
One could maybe argue that a unit test shouldn't read the users global configuration, but I haven't verified that this is the source for the non-determinism. |
By default gix will honor the user's settings (repo, global etc) but this breaks testing if the user has GPG signing enabled, which causes the commit ids to be different from what's expected. Resolves: #29
I think this is resolved in 0.8.0, let me know if that is not the case. |
Describe the bug
Running
cargo test --features git
against version 0.6.0 makes fetch_invalidates_cache, opens_existing and updates_cache non-deterministic and failing.To Reproduce
run:
cargo test --features git
relevant output:
It seems like the
right
field changes every second to a new value.Expected behavior
That the unit tests passed.
Screenshots
n/a
Device:
Additional context
n/a
The text was updated successfully, but these errors were encountered: