RFR: 8355328: Improve negative tests coverage for jpackage signing

Alexander Matveev almatvee at openjdk.org
Tue Apr 22 21:59:43 UTC 2025


On Tue, 22 Apr 2025 00:43:24 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

> Add tests covering `error.explicit-sign-no-cert` error ID to ErrorTest.
> 
> If signing identity validation fails, jpackage outputs three messages constructed from the following string IDs: `error.cert.not.found`, `error.explicit-sign-no-cert`, and `error.explicit-sign-no-cert.advice`.
> 
> `TKit.TextStreamVerifier.andThen()` method doesn't work correctly when combining more than two instances of `TKit.TextStreamVerifier` class. To address this bug and analyze jpackage's output for three expected strings when a non-existent signing identity is specified, the `TKit.TextStreamVerifier.andThen()` method was replaced with the `TKit.TextStreamVerifier.Group` class. Changes in other tests are a result of this change.

Looks good with minor comment.

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java line 982:

> 980:             createException = other.createException;
> 981:             anotherVerifier = other.anotherVerifier;
> 982:             value= other.value;

Space before =.

-------------

PR Review: https://git.openjdk.org/jdk/pull/24786#pullrequestreview-2785463087
PR Review Comment: https://git.openjdk.org/jdk/pull/24786#discussion_r2054933805


More information about the core-libs-dev mailing list