Commit de380aef authored by Steven Murray's avatar Steven Murray
Browse files

TEMPORARILY modified getTapesForWriting() to return un-laballed tapes

parent 084ca07e
......@@ -3150,6 +3150,30 @@ TEST_P(cta_catalogue_CatalogueTest, getTapesForWriting) {
ASSERT_EQ(0, tape.dataOnTapeInBytes);
}
TEST_P(cta_catalogue_CatalogueTest, DISABLED_getTapesForWriting_no_labelled_tapes) {
using namespace cta;
ASSERT_TRUE(m_catalogue->getTapes().empty());
const std::string vid = "vid";
const std::string logicalLibraryName = "logical_library_name";
const std::string tapePoolName = "tape_pool_name";
const std::string encryptionKey = "encryption_key";
const uint64_t capacityInBytes = (uint64_t)10 * 1000 * 1000 * 1000 * 1000;
const bool disabledValue = false;
const bool fullValue = false;
const std::string comment = "Create tape";
m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
m_catalogue->createTapePool(m_admin, tapePoolName, 2, true, "Create tape pool");
m_catalogue->createTape(m_admin, vid, logicalLibraryName, tapePoolName, encryptionKey, capacityInBytes, disabledValue,
fullValue, comment);
const std::list<catalogue::TapeForWriting> tapes = m_catalogue->getTapesForWriting(logicalLibraryName);
ASSERT_TRUE(tapes.empty());
}
TEST_P(cta_catalogue_CatalogueTest, createMountPolicy) {
using namespace cta;
......
......@@ -4151,9 +4151,9 @@ std::list<TapeForWriting> RdbmsCatalogue::getTapesForWriting(const std::string &
"FROM "
"TAPE "
"WHERE "
"LBP_IS_ON IS NOT NULL AND "
"LABEL_DRIVE IS NOT NULL AND "
"LABEL_TIME IS NOT NULL AND "
// "LBP_IS_ON IS NOT NULL AND " // Set when the tape has been labelled
// "LABEL_DRIVE IS NOT NULL AND " // Set when the tape has been labelled
// "LABEL_TIME IS NOT NULL AND " // Set when the tape has been labelled
"IS_DISABLED = 0 AND "
"IS_FULL = 0 AND "
"LOGICAL_LIBRARY_NAME = :LOGICAL_LIBRARY_NAME";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment