Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
tests/ostree_http_repo: count connections for all objects
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Smirnov <[email protected]>
  • Loading branch information
Eugene Smirnov committed Mar 21, 2019
1 parent 66d4742 commit 402be5d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sota_tools/ostree_http_repo_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ TEST(http_repo, bad_connection) {
auto hash = OSTreeHash::Parse("b9ac1e45f9227df8ee191b6e51e09417bd36c6ebbeff999431e3073ac50f0563");
UploadToTreehub(src_repo, ServerCredentials(filepath), hash, cert_path.string(), RunMode::kDefault, 1);

int result = system(
(std::string("diff -r ") + (src_repo->root() / "objects/").string() + " tests/sota_tools/repo/objects/").c_str());
std::string diff("diff -r ");
std::string src_path((src_dir.Path() / "objects").string() + " ");
std::string repo_path((src_repo->root() / "objects").string() + " ");
std::string dst_path((dst_dir.Path() / "objects").string() + " ");

int result = system((diff + src_path + repo_path).c_str());
result |= system((diff + repo_path + dst_path).c_str());

EXPECT_EQ(result, 0) << "Diff between source and destination repos is nonzero.";
}

Expand Down

0 comments on commit 402be5d

Please sign in to comment.