|
18 | 18 | #include <unordered_map> |
19 | 19 | #include "QualityControl/CcdbDatabase.h" |
20 | 20 | #include "QualityControl/QcInfoLogger.h" |
| 21 | +#include "QualityControl/Version.h" |
21 | 22 |
|
22 | 23 | #define BOOST_TEST_MODULE CcdbDatabase test |
23 | 24 | #define BOOST_TEST_MAIN |
@@ -99,6 +100,24 @@ BOOST_AUTO_TEST_CASE(ccdb_store) |
99 | 100 | f.backend->storeQO(qo1); |
100 | 101 | } |
101 | 102 |
|
| 103 | +BOOST_AUTO_TEST_CASE(ccdb_store_for_future_tests) |
| 104 | +{ |
| 105 | + // this test is storing a version of the objects in a different directory. |
| 106 | + // The goal is to keep old versions of the objects, in old formats, for future backward compatibility testing. |
| 107 | + test_fixture f; |
| 108 | + |
| 109 | + TH1F* h1 = new TH1F("to_be_kept", "asdf", 100, 0, 99); |
| 110 | + h1->FillRandom("gaus", 12345); |
| 111 | + shared_ptr<MonitorObject> mo1 = make_shared<MonitorObject>(h1, "task", "TST_KEEP"); |
| 112 | + mo1->addMetadata("Run", o2::quality_control::core::Version::GetQcVersion().getString()); |
| 113 | + shared_ptr<QualityObject> qo1 = make_shared<QualityObject>("check", vector{ string("input1"), string("input2") }, "TST_KEEP"); |
| 114 | + qo1->setQuality(Quality::Bad); |
| 115 | + qo1->addMetadata("Run", o2::quality_control::core::Version::GetQcVersion().getString()); |
| 116 | + |
| 117 | + f.backend->storeMO(mo1); |
| 118 | + f.backend->storeQO(qo1); |
| 119 | +} |
| 120 | + |
102 | 121 | BOOST_AUTO_TEST_CASE(ccdb_retrieve, *utf::depends_on("ccdb_store")) |
103 | 122 | { |
104 | 123 | test_fixture f; |
|
0 commit comments