[Rt-commit] rtir branch, 5.0/fix-tests-for-gpg-2.2, created. 4.0.1rc1-121-g8894cbcf
? sunnavy
sunnavy at bestpractical.com
Thu May 21 10:24:28 EDT 2020
The branch, 5.0/fix-tests-for-gpg-2.2 has been created
at 8894cbcf409228e56fbf4c0603cf6805606f2a32 (commit)
- Log -----------------------------------------------------------------
commit 36ec0cf22ec28363950cc1f3e5b1466edc71e3d8
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 21 22:00:38 2020 +0800
Test the important part of gpg warning message instead
The warning is like:
gpg: keyring `/var/folders/_7/nzkgcc8n4gl0y5psm8km1sfw0000gn/T/CyykLDL13f/secring.gpg' created
gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available
Apparently the "secret key not available" is the part that matters
diff --git a/t/gnupg/on-incident.t b/t/gnupg/on-incident.t
index 8d6a7f6b..281464d7 100644
--- a/t/gnupg/on-incident.t
+++ b/t/gnupg/on-incident.t
@@ -45,7 +45,7 @@ diag "check that things don't work if there is no key";
or diag "Emails' have been sent: \n". join "\n\n", @mail;
$agent->next_warning_like(qr/public key not found/) for 1 .. 2;
- $agent->next_warning_like(qr/keyring.+created/);
+ $agent->next_warning_like(qr/secret key not available/);
$agent->next_warning_like(qr/public key not found/) for 1 .. 2;
$agent->no_leftover_warnings_ok;
}
commit 8894cbcf409228e56fbf4c0603cf6805606f2a32
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 21 22:05:05 2020 +0800
Update warning message tests for gpg 2.2
diff --git a/t/gnupg/on-create.t b/t/gnupg/on-create.t
index f991b407..6170a7a7 100644
--- a/t/gnupg/on-create.t
+++ b/t/gnupg/on-create.t
@@ -50,7 +50,7 @@ diag "check that things don't work if there is no key";
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
- $agent->next_warning_like(qr/public key not found/) for 1 .. 2;
+ $agent->next_warning_like(qr/public key not found|No public key/) for 1 .. 2;
$agent->no_leftover_warnings_ok;
}
diff --git a/t/gnupg/on-incident.t b/t/gnupg/on-incident.t
index 281464d7..5a610478 100644
--- a/t/gnupg/on-incident.t
+++ b/t/gnupg/on-incident.t
@@ -44,9 +44,9 @@ diag "check that things don't work if there is no key";
ok !@mail, 'there are no outgoing emails'
or diag "Emails' have been sent: \n". join "\n\n", @mail;
- $agent->next_warning_like(qr/public key not found/) for 1 .. 2;
- $agent->next_warning_like(qr/secret key not available/);
- $agent->next_warning_like(qr/public key not found/) for 1 .. 2;
+ $agent->next_warning_like(qr/public key not found|No public key/) for 1 .. 2;
+ $agent->next_warning_like(qr/secret key not available|No secret key/);
+ $agent->next_warning_like(qr/public key not found|No public key/) for 1 .. 2;
$agent->no_leftover_warnings_ok;
}
@@ -89,7 +89,7 @@ diag "check that things don't work if there is no key";
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
- $agent->next_warning_like(qr/public key not found/) for 1 .. 8;
+ $agent->next_warning_like(qr/public key not found|No public key/) for 1 .. 8;
$agent->no_leftover_warnings_ok;
}
diff --git a/t/gnupg/on-update.t b/t/gnupg/on-update.t
index 28919c53..9a1f393c 100644
--- a/t/gnupg/on-update.t
+++ b/t/gnupg/on-update.t
@@ -60,7 +60,7 @@ diag "check that things don't work if there is no key";
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
- $agent->next_warning_like(qr/public key not found/) for 1 .. 2;
+ $agent->next_warning_like(qr/public key not found|No public key/) for 1 .. 2;
$agent->no_leftover_warnings_ok;
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list