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

test_post_and_put seems to be failing(?) #27

Open
DMRobertson opened this issue Nov 14, 2023 · 0 comments
Open

test_post_and_put seems to be failing(?) #27

DMRobertson opened this issue Nov 14, 2023 · 0 comments

Comments

@DMRobertson
Copy link

DMRobertson commented Nov 14, 2023

$ cargo test
    Finished test [unoptimized + debuginfo] target(s) in 0.04s
     Running unittests src/lib.rs (target/debug/deps/matrix_http_rendezvous-2ec065ed56a28c29)

running 8 tests
test tests::test_post_and_get_if_none_match ... ok
test tests::test_post_and_put ... FAILED
test tests::test_post_delete_and_get ... ok
test tests::test_post_and_get ... ok
test tests::test_post_and_put_if_match ... ok
test tests::test_eviction ... ok
test tests::test_monotonically_increasing ... ok
test tests::test_post_max_bytes ... ok

failures:

---- tests::test_post_and_put stdout ----
session: ETag("\"X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=\"")
if_match: IfMatch(Tags(""))
thread 'tests::test_post_and_put' panicked at 'assertion failed: `(left == right)`
  left: `412`,
 right: `202`', src/tests.rs:284:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    tests::test_post_and_put

test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.22s

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

From my reading this means that if_match is not None here:

if let Some(TypedHeader(if_match)) = if_match {

But that is a surprise, since we do not specify this header here:

let request = Request::put(&url)
.header(CONTENT_LENGTH, 0)
.body(String::new())
.unwrap();

$ rustc --version
rustc 1.70.0 (90c541806 2023-05-31)

Something wrong with my setup, maybe?

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

1 participant