diff options
Diffstat (limited to 'tests/kubetestrunner.cpp')
-rw-r--r-- | tests/kubetestrunner.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/kubetestrunner.cpp b/tests/kubetestrunner.cpp index 3bf06d44..dd022091 100644 --- a/tests/kubetestrunner.cpp +++ b/tests/kubetestrunner.cpp | |||
@@ -17,25 +17,23 @@ | |||
17 | 02110-1301, USA. | 17 | 02110-1301, USA. |
18 | */ | 18 | */ |
19 | #include <QtQuickTest/quicktest.h> | 19 | #include <QtQuickTest/quicktest.h> |
20 | #include <QQmlEngine> | ||
20 | #include <sink/test.h> | 21 | #include <sink/test.h> |
21 | #include <sink/store.h> | 22 | #include "teststore.h" |
23 | |||
24 | static QObject *teststore(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
25 | { | ||
26 | Q_UNUSED(engine) | ||
27 | Q_UNUSED(scriptEngine) | ||
28 | return new Kube::TestStore; | ||
29 | } | ||
22 | 30 | ||
23 | int main(int argc, char **argv) | 31 | int main(int argc, char **argv) |
24 | { | 32 | { |
25 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); | 33 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); |
26 | Sink::Test::initTest(); | 34 | Sink::Test::initTest(); |
27 | 35 | ||
28 | auto resource = Sink::ApplicationDomain::DummyResource::create("account1"); | 36 | qmlRegisterSingletonType<Kube::TestStore>("org.kube.test", 1, 0, "TestStore", teststore); |
29 | Sink::Store::create(resource).exec().waitForFinished(); | ||
30 | |||
31 | auto transportResource = Sink::ApplicationDomain::MailtransportResource::create("account1"); | ||
32 | Sink::Store::create(transportResource).exec().waitForFinished(); | ||
33 | |||
34 | auto identity = Sink::ApplicationDomain::Identity{}; | ||
35 | identity.setAccount("account1"); | ||
36 | identity.setAddress("identity@example.org"); | ||
37 | identity.setName("Identity Name"); | ||
38 | Sink::Store::create(identity).exec().waitForFinished(); | ||
39 | 37 | ||
40 | QTEST_ADD_GPU_BLACKLIST_SUPPORT | 38 | QTEST_ADD_GPU_BLACKLIST_SUPPORT |
41 | QTEST_SET_MAIN_SOURCE_PATH | 39 | QTEST_SET_MAIN_SOURCE_PATH |