Certain tests involving HTTP requests were sometimes hanging indefinitely, so this uses Mockito for HTTP mocking. This seemingly resolves the issue and makes these tests more reliable. The existing can_fail_404_links test has been renamed to can_fail_unresolved_links, to represent what actually occurs in the test. The can_fail_404_links test now deals with a proper 404 response. Just to be clear, the check_site test in the site component will still create outgoing HTTP requests (due to the URLs used in the test_site), so this commit only uses HTTP mocking where possible.
16 lines
281 B
TOML
16 lines
281 B
TOML
[package]
|
|
name = "link_checker"
|
|
version = "0.1.0"
|
|
authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"]
|
|
edition = "2018"
|
|
|
|
[dependencies]
|
|
reqwest = "0.9"
|
|
lazy_static = "1"
|
|
|
|
config = { path = "../config" }
|
|
errors = { path = "../errors" }
|
|
|
|
[dev-dependencies]
|
|
mockito = "0.22"
|