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

Added further empty table checks to the Setup phase of the catalogue unit tests

parent ad6e02b5
...@@ -283,29 +283,57 @@ void cta_catalogue_CatalogueTest::SetUp() { ...@@ -283,29 +283,57 @@ void cta_catalogue_CatalogueTest::SetUp() {
throw exception::Exception("Found one of more admin users after emptying the database"); throw exception::Exception("Found one of more admin users after emptying the database");
} }
   
if(!m_catalogue->getMediaTypes().empty()) { if(m_catalogue->getArchiveFilesItor().hasMore()) {
throw exception::Exception("Found one of more media types after emptying the database"); throw exception::Exception("Found one of more archive files after emptying the database");
} }
   
if(!m_catalogue->getStorageClasses().empty()) { if(!m_catalogue->getArchiveRoutes().empty()) {
throw exception::Exception("Found one of more storage classes after emptying the database"); throw exception::Exception("Found one of more archive routes after emptying the database");
} }
   
if(!m_catalogue->getTapePools().empty()) { if(m_catalogue->getDeletedArchiveFilesItor().hasMore()) {
throw exception::Exception("Found one of more tape pools after emptying the database"); throw exception::Exception("Found one of more deleted archive files after emptying the database");
} }
   
if(!m_catalogue->getArchiveRoutes().empty()) { if(!m_catalogue->getAllDiskSystems().empty()) {
throw exception::Exception("Found one of more archive routes after emptying the database"); throw exception::Exception("Found one of more disk systems after emptying the database");
} }
   
if(!m_catalogue->getLogicalLibraries().empty()) { if(!m_catalogue->getLogicalLibraries().empty()) {
throw exception::Exception("Found one of more logical libraries after emptying the database"); throw exception::Exception("Found one of more logical libraries after emptying the database");
} }
   
if(!m_catalogue->getMediaTypes().empty()) {
throw exception::Exception("Found one of more media types after emptying the database");
}
if(!m_catalogue->getMountPolicies().empty()) {
throw exception::Exception("Found one of more mount policies after emptying the database");
}
if(!m_catalogue->getRequesterGroupMountRules().empty()) {
throw exception::Exception("Found one of more requester group mount rules after emptying the database");
}
if(!m_catalogue->getRequesterMountRules().empty()) {
throw exception::Exception("Found one of more requester mount rules after emptying the database");
}
if(!m_catalogue->getStorageClasses().empty()) {
throw exception::Exception("Found one of more storage classes after emptying the database");
}
if(!m_catalogue->getTapes().empty()) { if(!m_catalogue->getTapes().empty()) {
throw exception::Exception("Found one of more tapes after emptying the database"); throw exception::Exception("Found one of more tapes after emptying the database");
} }
if(!m_catalogue->getTapePools().empty()) {
throw exception::Exception("Found one of more tape pools after emptying the database");
}
if(!m_catalogue->getVirtualOrganizations().empty()) {
throw exception::Exception("Found one of more virtual organizations after emptying the database");
}
} catch(exception::Exception &ex) { } catch(exception::Exception &ex) {
ex.getMessage().str(std::string(__FUNCTION__) + " failed: " + ex.getMessage().str()); ex.getMessage().str(std::string(__FUNCTION__) + " failed: " + ex.getMessage().str());
throw; throw;
......
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