mirror of
https://github.com/google/nomulus
synced 2026-01-07 05:56:49 +00:00
Make GPG related tests work with the latest version of GPG (#2568)
Newer versions of GPG (v.2.4.5 in my case) has uses different wording then what's available in our build image (and Ubuntu I suspect). For example it says "rsa2048" instead of "2048-bit RSA". Make the tests work in both cases. Admittedly we cannot check for the string RSA/rsa easily, but I don't think it matters much for tests.
This commit is contained in:
@@ -191,9 +191,7 @@ public class BrdaCopyActionTest {
|
||||
assertWithMessage("Literal data packet should be in BINARY mode")
|
||||
.that(stdout)
|
||||
.contains("mode b ");
|
||||
assertWithMessage("Unexpected asymmetric encryption algorithm")
|
||||
.that(stderr)
|
||||
.contains("encrypted with 2048-bit RSA key");
|
||||
assertWithMessage("Unexpected asymmetric encryption algorithm").that(stderr).contains("2048");
|
||||
assertWithMessage("Unexpected receiver public key")
|
||||
.that(stderr)
|
||||
.contains("ID 7F9084EE54E1EB0F");
|
||||
|
||||
@@ -87,7 +87,8 @@ class GhostrydeGpgIntegrationTest {
|
||||
assertThat(stdout).contains(":encrypted data packet:");
|
||||
assertThat(stdout).contains("version 3, algo 1, keyid A59C132F3589A1D5");
|
||||
assertThat(stdout).contains("name=\"" + Ghostryde.INNER_FILENAME + "\"");
|
||||
assertThat(stderr).contains("encrypted with 2048-bit RSA key, ID A59C132F3589A1D5");
|
||||
assertThat(stderr).contains("2048");
|
||||
assertThat(stderr).contains("ID A59C132F3589A1D5");
|
||||
|
||||
pid = gpg.exec(GPG_BINARY, "--use-embedded-filename", file.getPath());
|
||||
stderr = CharStreams.toString(new InputStreamReader(pid.getErrorStream(), UTF_8));
|
||||
|
||||
@@ -148,9 +148,7 @@ public class RydeGpgIntegrationTest {
|
||||
assertWithMessage("Literal data packet should be in BINARY mode")
|
||||
.that(stdout)
|
||||
.contains("mode b ");
|
||||
assertWithMessage("Unexpected asymmetric encryption algorithm")
|
||||
.that(stderr)
|
||||
.contains("encrypted with 2048-bit RSA key");
|
||||
assertWithMessage("Unexpected asymmetric encryption algorithm").that(stderr).contains("2048");
|
||||
assertWithMessage("Unexpected receiver public key")
|
||||
.that(stderr)
|
||||
.contains("ID 7F9084EE54E1EB0F");
|
||||
|
||||
Reference in New Issue
Block a user