Skip to content
Snippets Groups Projects
Commit fe633f97 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 4dbbe002
No related branches found
No related tags found
No related merge requests found
......@@ -283,29 +283,57 @@ void cta_catalogue_CatalogueTest::SetUp() {
throw exception::Exception("Found one of more admin users 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->getArchiveFilesItor().hasMore()) {
throw exception::Exception("Found one of more archive files 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->getArchiveRoutes().empty()) {
throw exception::Exception("Found one of more archive routes 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->getDeletedArchiveFilesItor().hasMore()) {
throw exception::Exception("Found one of more deleted archive files after emptying the database");
}
 
if(!m_catalogue->getArchiveRoutes().empty()) {
throw exception::Exception("Found one of more archive routes after emptying the database");
if(!m_catalogue->getAllDiskSystems().empty()) {
throw exception::Exception("Found one of more disk systems after emptying the database");
}
 
if(!m_catalogue->getLogicalLibraries().empty()) {
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()) {
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) {
ex.getMessage().str(std::string(__FUNCTION__) + " failed: " + ex.getMessage().str());
throw;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment