Commit 2c27fff7 authored by Steven Murray's avatar Steven Murray
Browse files

Added unit-test createTape_non_existent_logical_library

parent 83d51c99
......@@ -1791,6 +1791,25 @@ TEST_P(cta_catalogue_CatalogueTest, createTape) {
ASSERT_EQ(creationLog, lastModificationLog);
}
TEST_P(cta_catalogue_CatalogueTest, createTape_non_existent_logical_library) {
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 = true;
const bool fullValue = false;
const std::string comment = "Create tape";
m_catalogue->createTapePool(m_admin, tapePoolName, 2, true, "Create tape pool");
ASSERT_THROW(m_catalogue->createTape(m_admin, vid, logicalLibraryName, tapePoolName, encryptionKey, capacityInBytes,
disabledValue, fullValue, comment), exception::UserError);
}
TEST_P(cta_catalogue_CatalogueTest, createTape_no_encryption_key) {
using namespace cta;
......
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