comparison ui/tests/cinstprocesstest.cpp @ 249:6a7eb102716d

Remove code duplication by unifying the certificatelist. You should now check for isInstallCert to determine wether this certificate should be installed or removed. Leaving the getInstallCertificates and getRemoveCertificates in place for compatibilty would have been easier to keep the tests stable.
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 31 Mar 2014 08:06:17 +0000
parents 37c9653b8755
children d95fd88f6616
comparison
equal deleted inserted replaced
248:9f0865dc8b14 249:6a7eb102716d
39 39
40 installerProcess->write("-----BEGIN CERTIFICATE LIST-----\r\n"); 40 installerProcess->write("-----BEGIN CERTIFICATE LIST-----\r\n");
41 installerProcess->write(validList.rawData().toLatin1()); 41 installerProcess->write(validList.rawData().toLatin1());
42 installerProcess->write("-----END CERTIFICATE LIST-----\r\n"); 42 installerProcess->write("-----END CERTIFICATE LIST-----\r\n");
43 43
44 foreach (const Certificate &cert, validList.getInstallCertificates()) { 44 foreach (const Certificate &cert, validList.getCertificates()) {
45 installerProcess->write(cert.base64Line().toLatin1()); 45 installerProcess->write(cert.base64Line().toLatin1());
46 installerProcess->write("\r\n"); 46 installerProcess->write("\r\n");
47 } 47 }
48 48
49 finishVerify(installerProcess, ERR_NO_ERROR); 49 finishVerify(installerProcess, ERR_NO_ERROR);
60 QProcess* installerProcess = startCinstProcess(); 60 QProcess* installerProcess = startCinstProcess();
61 QVERIFY(installerProcess->state() == QProcess::Running); 61 QVERIFY(installerProcess->state() == QProcess::Running);
62 installerProcess->write("-----BEGIN CERTIFICATE LIST-----\r\n"); 62 installerProcess->write("-----BEGIN CERTIFICATE LIST-----\r\n");
63 installerProcess->write("-----END CERTIFICATE LIST-----\r\n"); 63 installerProcess->write("-----END CERTIFICATE LIST-----\r\n");
64 64
65 foreach (const Certificate &cert, validList.getInstallCertificates()) { 65 foreach (const Certificate &cert, validList.getCertificates()) {
66 installerProcess->write(cert.base64Line().toLatin1()); 66 installerProcess->write(cert.base64Line().toLatin1());
67 installerProcess->write("\r\n"); 67 installerProcess->write("\r\n");
68 } 68 }
69 finishVerify(installerProcess, ERR_INVALID_INPUT_NO_LIST); 69 finishVerify(installerProcess, ERR_INVALID_INPUT_NO_LIST);
70 } 70 }

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