diff options
-rw-r--r-- | tests/entitystoretest.cpp | 3 | ||||
-rw-r--r-- | tests/storagetest.cpp | 15 |
2 files changed, 6 insertions, 12 deletions
diff --git a/tests/entitystoretest.cpp b/tests/entitystoretest.cpp index 90575a5..03b940b 100644 --- a/tests/entitystoretest.cpp +++ b/tests/entitystoretest.cpp | |||
@@ -22,8 +22,7 @@ private slots: | |||
22 | 22 | ||
23 | void cleanup() | 23 | void cleanup() |
24 | { | 24 | { |
25 | Sink::Storage::DataStore storage(Sink::storageLocation(), resourceInstanceIdentifier); | 25 | Sink::Storage::DataStore(Sink::storageLocation(), resourceInstanceIdentifier).removeFromDisk(); |
26 | storage.removeFromDisk(); | ||
27 | } | 26 | } |
28 | 27 | ||
29 | void testCleanup() | 28 | void testCleanup() |
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index f4cf400..96368a7 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -63,21 +63,18 @@ private slots: | |||
63 | { | 63 | { |
64 | testDataPath = "./testdb"; | 64 | testDataPath = "./testdb"; |
65 | dbName = "test"; | 65 | dbName = "test"; |
66 | Sink::Storage::DataStore storage(testDataPath, {dbName, {{"default", 0}}}); | 66 | Sink::Storage::DataStore{testDataPath, {dbName, {{"default", 0}}}}.removeFromDisk(); |
67 | storage.removeFromDisk(); | ||
68 | } | 67 | } |
69 | 68 | ||
70 | void cleanup() | 69 | void cleanup() |
71 | { | 70 | { |
72 | Sink::Storage::DataStore storage(testDataPath, {dbName, {{"default", 0}}}); | 71 | Sink::Storage::DataStore{testDataPath, {dbName, {{"default", 0}}}}.removeFromDisk(); |
73 | storage.removeFromDisk(); | ||
74 | } | 72 | } |
75 | 73 | ||
76 | void testCleanup() | 74 | void testCleanup() |
77 | { | 75 | { |
78 | populate(1); | 76 | populate(1); |
79 | Sink::Storage::DataStore storage(testDataPath, {dbName, {{"default", 0}}}); | 77 | Sink::Storage::DataStore{testDataPath, {dbName, {{"default", 0}}}}.removeFromDisk(); |
80 | storage.removeFromDisk(); | ||
81 | QFileInfo info(testDataPath + "/" + dbName); | 78 | QFileInfo info(testDataPath + "/" + dbName); |
82 | QVERIFY(!info.exists()); | 79 | QVERIFY(!info.exists()); |
83 | } | 80 | } |
@@ -216,10 +213,8 @@ private slots: | |||
216 | } | 213 | } |
217 | 214 | ||
218 | { | 215 | { |
219 | Sink::Storage::DataStore storage(testDataPath, dbName); | 216 | Sink::Storage::DataStore(testDataPath, dbName).removeFromDisk(); |
220 | storage.removeFromDisk(); | 217 | Sink::Storage::DataStore(testDataPath, dbName + "2").removeFromDisk(); |
221 | Sink::Storage::DataStore storage2(testDataPath, dbName + "2"); | ||
222 | storage2.removeFromDisk(); | ||
223 | } | 218 | } |
224 | } | 219 | } |
225 | 220 | ||