Mercurial > trustbridge
comparison 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 |
comparison
equal
deleted
inserted
replaced
305:4a3febc6d806 | 306:9c5e6b142611 |
---|---|
94 other.close(); | 94 other.close(); |
95 otherListFile.close(); | 95 otherListFile.close(); |
96 otherList = CertificateList(otherListFile.fileName().toLocal8Bit().data()); | 96 otherList = CertificateList(otherListFile.fileName().toLocal8Bit().data()); |
97 | 97 |
98 QVERIFY(!otherList.isValid()); | 98 QVERIFY(!otherList.isValid()); |
99 | |
100 /* Set HOME or APPDATA so that nss stores are not touched | |
101 * see nsstest for the real test of that code */ | |
102 #ifdef WIN32 | |
103 QVERIFY(!setenv ("APPDATA", fakeHome.path().toLocal8Bit().constData(), 1)); | |
104 #else | |
105 QVERIFY(!setenv ("HOME", fakeHome.path().toLocal8Bit().constData(), 1)); | |
106 #endif | |
99 } | 107 } |
100 | 108 |
101 void CinstProcessTest::testNoList() { | 109 void CinstProcessTest::testNoList() { |
102 /* No list */ | 110 /* No list */ |
103 QTemporaryFile emptyFile; | 111 QTemporaryFile emptyFile; |