summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-17 20:21:03 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-17 20:21:03 +0200
commite684891d0792d803cea103f3a23fb054807ab67f (patch)
treed546367892b931acaaeac4a009e47e2d4b782bdb
parent2c47c157120ffa6b9a68581dbd97a88a30d745a2 (diff)
downloadsink-e684891d0792d803cea103f3a23fb054807ab67f.tar.gz
sink-e684891d0792d803cea103f3a23fb054807ab67f.zip
Reset the testenvironment
-rw-r--r--examples/carddavresource/tests/carddavtest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/carddavresource/tests/carddavtest.cpp b/examples/carddavresource/tests/carddavtest.cpp
index b0f41d1..3da03a6 100644
--- a/examples/carddavresource/tests/carddavtest.cpp
+++ b/examples/carddavresource/tests/carddavtest.cpp
@@ -30,7 +30,6 @@ class CardDavTest : public QObject
30 resource.setProperty("server", "http://localhost/dav/addressbooks/user/doe"); 30 resource.setProperty("server", "http://localhost/dav/addressbooks/user/doe");
31 resource.setProperty("username", "doe"); 31 resource.setProperty("username", "doe");
32 Sink::SecretStore::instance().insert(resource.identifier(), "doe"); 32 Sink::SecretStore::instance().insert(resource.identifier(), "doe");
33 resource.setProperty("testmode", true);
34 return resource; 33 return resource;
35 } 34 }
36 35
@@ -69,11 +68,17 @@ class CardDavTest : public QObject
69 } 68 }
70 } 69 }
71 70
71 void resetTestEnvironment()
72 {
73 system("resetmailbox.sh");
74 }
75
72private slots: 76private slots:
73 77
74 void initTestCase() 78 void initTestCase()
75 { 79 {
76 Sink::Test::initTest(); 80 Sink::Test::initTest();
81 resetTestEnvironment();
77 auto resource = createResource(); 82 auto resource = createResource();
78 QVERIFY(!resource.identifier().isEmpty()); 83 QVERIFY(!resource.identifier().isEmpty());
79 VERIFYEXEC(Sink::Store::create(resource)); 84 VERIFYEXEC(Sink::Store::create(resource));