Skip to content

Commit

Permalink
More integration assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
durner committed May 25, 2023
1 parent e800a6b commit 2d56c6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/integration/minio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,18 @@ TEST_CASE("MinIO Integration") {
REQUIRE(it.success());
// Simple string_view interface
REQUIRE(!content[i].compare(it.getResult()));
// Check from the other side too
REQUIRE(!it.getResult().compare(content[i]));
// Check the size
REQUIRE(it.getSize() == content[i].size());

// Advanced raw interface
// Note that the data lies in the data buffer but after the offset to skip the HTTP header
// Note that the size is already without the header, so the full request has size + offset length
string_view rawDataString(reinterpret_cast<const char*>(it.getData()) + it.getOffset(), it.getSize());
REQUIRE(!content[i++].compare(rawDataString));
REQUIRE(!content[i].compare(rawDataString));
REQUIRE(!rawDataString.compare(it.getResult()));
REQUIRE(!rawDataString.compare(content[i++]));
}
}
}
Expand Down

0 comments on commit 2d56c6e

Please sign in to comment.