Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

test_post_and_put seems to be failing(?) #27

@DMRobertson

Description

@DMRobertson
$ 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions