Skip to content

Commit

Permalink
fixed L1 unit tests after addMount() API change
Browse files Browse the repository at this point in the history
  • Loading branch information
goruklu committed Sep 10, 2024
1 parent 3c8a8b9 commit 5c36cda
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/L1_testing/mocks/DobbyManagerMock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,12 @@ bool DobbyManager::wakeupContainer(int32_t cd)
bool DobbyManager::addMount(int32_t cd,
const std::string& source,
const std::string& destination,
const std::string& mountFlags)
const std::vector<std::string>& mountFlags,
const std::string& mountData)
{
EXPECT_NE(impl, nullptr);

return impl->addMount(cd, source, destination, mountFlags);
return impl->addMount(cd, source, destination, mountFlags, mountData);
}

bool DobbyManager::removeMount(int32_t cd, const std::string& source)
Expand Down
6 changes: 5 additions & 1 deletion tests/L1_testing/mocks/DobbyManagerMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ class DobbyManagerMock : public DobbyManagerImpl {

MOCK_METHOD(bool, wakeupContainer, (int32_t cd), (override));

MOCK_METHOD(bool, addMount, (int32_t cd, const std::string& source, const std::string& destination, const std::string& mountFlags), (override));
MOCK_METHOD(bool, addMount, (int32_t cd,
const std::string& source,
const std::string& destination,
const std::vector<std::string>& mountFlags,
const std::string& mountData), (override));

MOCK_METHOD(bool, removeMount, (int32_t cd, const std::string& source), (override));

Expand Down
8 changes: 6 additions & 2 deletions tests/L1_testing/mocks/dobbymanager/DobbyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class DobbyManagerImpl {

virtual bool wakeupContainer(int32_t cd) = 0;

virtual bool addMount(int32_t cd, const std::string& source, const std::string& destination, const std::string& mountFlags) = 0;
virtual bool addMount(int32_t cd, const std::string& source, const std::string& destination, const std::vector<std::string>& mountFlags, const std::string& mountData) = 0;

virtual bool removeMount(int32_t cd, const std::string& source) = 0;

Expand Down Expand Up @@ -161,7 +161,11 @@ class DobbyManager {
bool resumeContainer(int32_t cd);
bool hibernateContainer(int32_t cd, const std::string& options);
bool wakeupContainer(int32_t cd);
bool addMount(int32_t cd, const std::string& source, const std::string& destination, const std::string& mountFlags);
bool addMount(int32_t cd,
const std::string& source,
const std::string& destination,
const std::vector<std::string>& mountFlags,
const std::string& mountData);
bool removeMount(int32_t cd, const std::string& source);
bool execInContainer(int32_t cd,
const std::string& options,
Expand Down

0 comments on commit 5c36cda

Please sign in to comment.