Commit 597dc469 authored by Steven Murray's avatar Steven Murray
Browse files

Revert "Removed castor_tape_tapeserver_daemon_CatalogueTest:dgnMismatchStart"

This reverts commit 8b826f9d.
parent 8b826f9d
......@@ -143,6 +143,42 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest,
ASSERT_THROW(catalogue.findDrive(unitName), castor::exception::Exception);
}
TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, dgnMismatchStart) {
using namespace castor::tape::tapeserver::daemon;
TpconfigLines lines;
lines.push_back(TpconfigLine(
"UNIT", "DGN1", "DEV", "manual@SLOT"));
DriveConfigMap driveConfigs;
ASSERT_NO_THROW(driveConfigs.enterTpconfigLines(lines));
const int netTimeout = 1;
castor::log::DummyLogger log("unittest");
ProcessForkerProxyDummy processForker;
const bool isGrantedReturnValue = true;
castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue);
castor::legacymsg::VdqmProxyDummy vdqm;
castor::legacymsg::VmgrProxyDummy vmgr;
const std::string hostName = "";
const CatalogueConfig catalogueConfig;
Catalogue catalogue(netTimeout, log, processForker, cupv, vdqm, vmgr,
hostName, catalogueConfig);
ASSERT_NO_THROW(catalogue.populate(driveConfigs));
CatalogueDrive &unit = catalogue.findDrive("UNIT");
ASSERT_EQ(DRIVE_STATE_DOWN, unit.getState());
ASSERT_NO_THROW(unit.configureUp());
ASSERT_EQ(DRIVE_STATE_UP, unit.getState());
castor::legacymsg::RtcpJobRqstMsgBody job;
job.volReqId = 1111;
job.clientPort = 2222;
job.clientEuid = 3333;
job.clientEgid = 4444;
castor::utils::copyString(job.clientHost, "CLIENT_HOST");
castor::utils::copyString(job.dgn, "DGN2");
castor::utils::copyString(job.driveUnit, "UNIT");
castor::utils::copyString(job.clientUserName, "USER");
ASSERT_THROW(unit.receivedVdqmJob(job), castor::exception::Exception);
}
TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, getUnitNames) {
using namespace castor::tape::tapeserver::daemon;
TpconfigLines lines;
......
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