Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 2, 2025
1 parent db2948f commit 5a87066
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion cpp/test/command_response_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void TestNonDiskDevice(PbDeviceType type, unsigned int default_param_count)

auto d = DeviceFactory::Instance().CreateDevice(type, 0, "");
const param_map params;
d->GetLogger();
d->Init();
EXPECT_TRUE(controller_factory.AttachToController(bus, 0, d));

Expand Down
9 changes: 0 additions & 9 deletions cpp/test/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ class MockPrimaryDevice : public PrimaryDevice

explicit MockPrimaryDevice(int lun) : PrimaryDevice(UNDEFINED, lun)
{
GetLogger();
}
~MockPrimaryDevice() override = default;

Expand Down Expand Up @@ -331,7 +330,6 @@ class MockStorageDevice : public StorageDevice

MockStorageDevice() : StorageDevice(UNDEFINED, 0, false, false, { 256, 512, 1024, 2048, 4096 })
{
GetLogger();
}
~MockStorageDevice() override = default;

Expand Down Expand Up @@ -391,7 +389,6 @@ class MockDisk : public Disk

MockDisk() : Disk(SCHD, 0, false, false, { 512, 1024, 2048, 4096 })
{
GetLogger();
SetCachingMode(PbCachingMode::LINUX);
SetBlockSize(512);
}
Expand All @@ -405,7 +402,6 @@ class MockSasiHd : public SasiHd

explicit MockSasiHd(int lun) : SasiHd(lun)
{
GetLogger();
SetCachingMode(PbCachingMode::PISCSI);
}
~MockSasiHd() override = default;
Expand All @@ -432,13 +428,11 @@ class MockScsiHd : public ScsiHd

MockScsiHd(int lun, bool removable) : ScsiHd(lun, removable, false, false)
{
GetLogger();
SetCachingMode(PbCachingMode::PISCSI);
}
explicit MockScsiHd(const set<uint32_t> &sector_sizes)
: ScsiHd(0, false, false, false, sector_sizes)
{
GetLogger();
SetCachingMode(PbCachingMode::PISCSI);
}
~MockScsiHd() override = default;
Expand All @@ -454,7 +448,6 @@ class MockScsiCd : public ScsiCd

explicit MockScsiCd(int lun) : ScsiCd(lun, false)
{
GetLogger();
SetCachingMode(PbCachingMode::PISCSI);
}
};
Expand All @@ -470,7 +463,6 @@ class MockOpticalMemory : public OpticalMemory

explicit MockOpticalMemory(int lun) : OpticalMemory(lun)
{
GetLogger();
SetCachingMode(PbCachingMode::PISCSI);
}
};
Expand All @@ -495,7 +487,6 @@ class MockTape : public Tape

MockTape() : Tape(0)
{
GetLogger();
}

void SetReady(bool b)
Expand Down
3 changes: 0 additions & 3 deletions cpp/test/scsi_generic_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ TEST(ScsiGenericTest, SetProductData)
TEST(ScsiGenericTest, SetUp)
{
ScsiGeneric device1(0, "");
device1.GetLogger();
EXPECT_NE("", device1.SetUp());

ScsiGeneric device2(0, "/dev/null");
device2.GetLogger();
EXPECT_NE("", device2.SetUp());

ScsiGeneric device3(0, "/dev/sg0123456789");
device3.GetLogger();
EXPECT_NE("", device3.SetUp());
}

Expand Down

0 comments on commit 5a87066

Please sign in to comment.