Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8232841: [TESTBUG] [macos] SigningPackageTest fails when untrusted ce…
…rtificates exist on machine

Reviewed-by: herrick, asemenyuk
  • Loading branch information
Alexander Matveev committed Jun 2, 2020
1 parent 1933fe3 commit 47cc808b989393555941304327f617952916ba92
Showing with 5 additions and 1 deletion.
  1. +4 −0 test/jdk/tools/jpackage/helpers/jdk/jpackage/test/Executor.java
  2. +1 −1 test/jdk/tools/jpackage/macosx/base/SigningCheck.java
@@ -238,6 +238,10 @@ public Result executeAndRepeatUntilExitCode(int expectedCode, int max, int wait)
return result.assertExitCodeIs(expectedCode);
}

public List<String> executeWithoutExitCodeCheckAndGetOutput() {
return saveOutput().executeWithoutExitCodeCheck().getOutput();
}

private boolean withSavedOutput() {
return saveOutputType.contains(SaveOutputType.FULL) || saveOutputType.contains(
SaveOutputType.FIRST_LINE);
@@ -87,7 +87,7 @@ private static void validateCertificateTrust(String name) {
List<String> result = new Executor()
.setExecutable("security")
.addArguments("dump-trust-settings")
.executeAndGetOutput();
.executeWithoutExitCodeCheckAndGetOutput();
result.stream().forEachOrdered(TKit::trace);
TKit.assertTextStream(name)
.predicate((line, what) -> line.trim().endsWith(what))

0 comments on commit 47cc808

Please sign in to comment.