Fix tests

This commit is contained in:
Zorg committed 2021-02-28 23:20:06 -08:00
1 parent 7d8e3059ec
commit efa9cc20d0
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -223,7 +223,7 @@
}
} else {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUValidationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus], NSUnderlyingErrorKey: innerError }];
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUValidationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus] }];
}
}
+2 -2
View File
@@ -87,7 +87,7 @@ class SUUpdateValidatorTest: XCTestCase {
let validator = SUUpdateValidator(downloadPath: self.signedTestFilePath, signatures: signatures, host: host)
let result = validator.validateDownloadPath()
let result = (try? validator.validateDownloadPath()) != nil
XCTAssertEqual(result, expectedResult, "bundle: \(bundleConfig), signatures: \(signatureConfig)", line: line)
}
@@ -112,7 +112,7 @@ class SUUpdateValidatorTest: XCTestCase {
let newBundle = self.bundle(newBundleConfig)
try! FileManager.default.copyItem(at: newBundle.bundleURL, to: URL(fileURLWithPath: updateDirectory).appendingPathComponent(oldBundle.bundleURL.lastPathComponent))
let result = validator.validate(withUpdateDirectory: updateDirectory)
let result = (try? validator.validate(withUpdateDirectory: updateDirectory)) != nil
XCTAssertEqual(result, expectedResult, "oldBundle: \(oldBundleConfig), newBundle: \(newBundleConfig), signatures: \(signatureConfig)", line: line)
}