summaryrefslogtreecommitdiff
path: root/test/UnitStorage.cpp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2017-03-31 17:18:41 +0100
committerMichael Meeks <michael.meeks@collabora.com>2017-03-31 17:18:41 +0100
commit2bca560feb3fa31ee341347ec5c91c788c7c1ed7 (patch)
tree5251d10183e56f80d8de546d657df08679dbb48c /test/UnitStorage.cpp
parentb9f18e63a3b68a13b5357266f349b23d6eeeb28d (diff)
Add hook for disk space check.
Diffstat (limited to 'test/UnitStorage.cpp')
-rw-r--r--test/UnitStorage.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/test/UnitStorage.cpp b/test/UnitStorage.cpp
index e67118fc9..525a2fd28 100644
--- a/test/UnitStorage.cpp
+++ b/test/UnitStorage.cpp
@@ -33,17 +33,11 @@ public:
{
}
- virtual bool filterLoad(const std::string &sessionId,
- const std::string &jailId,
- bool &/* result */)
+ bool filterCheckDiskSpace(const std::string & /* path */,
+ bool &newResult) override
{
- LOG_TRC("FilterLoad: " << sessionId << " jail " << jailId);
- if (_phase == Phase::Filter)
- {
- LOG_INF("Throwing low disk space exception.");
- throw StorageSpaceLowException("test: low disk space");
- }
- return false;
+ newResult = _phase != Phase::Filter;
+ return true;
}
void loadDocument(bool bExpectFailure)
@@ -76,7 +70,7 @@ public:
}
}
- virtual void invokeTest()
+ void invokeTest() override
{
LOG_TRC("invokeTest: " << (int)_phase);
switch (_phase)