Don't use tests that actually make network calls
rossmacarthur opened this issue · 2 comments
rossmacarthur commented
Currently Sheldon runs unit tests that make requests to download https://github.com/rossmacarthur/sheldon-test. I think this is okay for integration tests but the unit tests should rather do something like spin up a local git server (if this is possible 🤔)
grawlinson commented
Seems like a new failure somewhat related to this (github has disabled some requests recently):
---- lock::tests::source_lock_git_git_with_checkout stdout ----
thread 'lock::tests::source_lock_git_git_with_checkout' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `git://github.com/rossmacarthur/sheldon-test`
Caused by:
remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
; class=Net (12)', src/lock.rs:1069:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- lock::tests::locked_config_clean stdout ----
thread 'lock::tests::locked_config_clean' panicked at 'assertion failed: ctx.clone_dir().join(\"github.com/rossmacarthur/sheldon-test\").exists()', src/lock.rs:1398:9
failures:
lock::tests::locked_config_clean
lock::tests::source_lock_git_git_with_checkout
test result: FAILED. 92 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.53s
rossmacarthur commented
Yeah I disabled these tests for now 86bbfe1