Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 11b2bc1

Browse files
committed
added setup keystore access tests
1 parent d275e73 commit 11b2bc1

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

tests/auto/auto.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ SUBDIRS += cmake \
44
datasync \
55
qml
66

7+
qml.depends += datasync
8+
79
cmake.CONFIG += no_run-tests_target
810
prepareRecursiveTarget(run-tests)
911
QMAKE_EXTRA_TARGETS += run-tests

tests/auto/datasync/TestKeystorePlugins/tst_keystoreplugins.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ void TestKeystorePlugins::testKeystoreFunctions()
162162

163163
delete pluginObj;
164164
loader.unload();
165+
166+
try {
167+
// finally: test keystore setup API
168+
QVERIFY(Setup::keystoreProviders().contains(provider));
169+
QVERIFY(Setup::availableKeystores().contains(provider));
170+
QVERIFY(Setup::keystoreAvailable(provider));
171+
auto keystore = Setup::loadKeystore(provider, this);
172+
QVERIFY(keystore);
173+
QCOMPARE(keystore->providerName(), provider);
174+
delete keystore;
175+
} catch(QException &e) {
176+
QFAIL(e.what());
177+
}
165178
}
166179

167180
QTEST_MAIN(TestKeystorePlugins)

tests/auto/datasync/TestLib/TestLib.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ include(../../../../src/3rdparty/cryptopp/cryptopp.pri)
2929

3030
runtarget.target = run-tests
3131
win32: runtarget.depends += $(DESTDIR_TARGET)
32-
else:linux: runtarget.depends += $(DESTDIR)/$(TARGET)
32+
else:linux: runtarget.depends += $(DESTDIR)$(TARGET)
3333
else: runtarget.depends += $(TARGET)
3434
QMAKE_EXTRA_TARGETS += runtarget

0 commit comments

Comments
 (0)