diff ui/tests/cinstprocesstest.cpp @ 306:9c5e6b142611

Set the home directory to a temporary location to avoid writing into real nss stores
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 03 Apr 2014 15:30:25 +0200
parents 4a3febc6d806
children f17226aa2e09
line wrap: on
line diff
--- a/ui/tests/cinstprocesstest.cpp	Thu Apr 03 15:29:58 2014 +0200
+++ b/ui/tests/cinstprocesstest.cpp	Thu Apr 03 15:30:25 2014 +0200
@@ -96,6 +96,14 @@
     otherList = CertificateList(otherListFile.fileName().toLocal8Bit().data());
 
     QVERIFY(!otherList.isValid());
+
+/* Set HOME or APPDATA so that nss stores are not touched 
+ * see nsstest for the real test of that code */
+#ifdef WIN32
+    QVERIFY(!setenv ("APPDATA", fakeHome.path().toLocal8Bit().constData(), 1));
+#else
+    QVERIFY(!setenv ("HOME", fakeHome.path().toLocal8Bit().constData(), 1));
+#endif
 }
 
 void CinstProcessTest::testNoList() {

http://wald.intevation.org/projects/trustbridge/