Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CCDB/test/testCcdbApi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,24 @@ BOOST_AUTO_TEST_CASE(TestHeaderParsing)

BOOST_AUTO_TEST_CASE(TestFetchingHeaders, *utf::precondition(if_reachable()))
{
// first store the object
string objectPath = basePath + "objectETag";
test_fixture f;
TH1F h1("objectETag", "objectETag", 100, 0, 99);
f.api.storeAsTFile(&h1, objectPath, f.metadata);

// then get the headers
std::string etag;
std::vector<std::string> headers;
std::vector<std::string> pfns;
auto updated = CcdbApi::getCCDBEntryHeaders("http://ccdb-test.cern.ch:8080/TOF/LHCphase/1567080816927", etag, headers);
string path = objectPath + "/" + std::to_string(getCurrentTimestamp());
auto updated = CcdbApi::getCCDBEntryHeaders("http://ccdb-test.cern.ch:8080/" + path, etag, headers);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. so I was wrong and we checked to supposedly existing object. This is now as it should be! Thanks.

BOOST_CHECK_EQUAL(updated, true);
BOOST_REQUIRE(headers.size() != 0);
CcdbApi::parseCCDBHeaders(headers, pfns, etag);
BOOST_REQUIRE(etag != "");
BOOST_REQUIRE(pfns.size());
updated = CcdbApi::getCCDBEntryHeaders("http://ccdb-test.cern.ch:8080/TOF/LHCphase/1567080816927", etag, headers);
updated = CcdbApi::getCCDBEntryHeaders("http://ccdb-test.cern.ch:8080/" + path, etag, headers);
BOOST_CHECK_EQUAL(updated, false);
}

Expand Down