google-nomulus/javatests/google/registry
jianglai 6bd0fc58de Fix some GPG related test issues
We were running FOSS tests on an old version of Ubuntu (14.04) which comes with a rather old gpg version 1.4.16 compared to the current version 2.1.22 (https://lists.gnupg.org/pipermail/gnupg-announce/2017q3/000411.html). As a result some default settings have changed between these versions, leading to test failures when tests are run on newer platforms. In this CL several of the settings are made explicit, no longer depending on default values, which makes them work on either platform.

1. "--no-mdc-error" is set. We do not have mdc integrity protection for the test keys, which results in a non-zero return value for newer versions of GPG. Setting this flag makes return value zero again.

2. "--keyid-format" long is set. GPG key IDs are the last 16 (long key id) or 8 (short key id) octets of the key fingerprint (https://security.stackexchange.com/questions/84280/short-openpgp-key-ids-are-insecure-how-to-configure-gnupg-to-use-long-key-ids-i). Older version uses the short id as default, whereas newer versions defaults to long id. Also change the expected key ID to 16 bytes accordingly.

3. Output stderr in GpgSystemCommandRule when failure occurs during key import. This help debug key import failure due to too long gpg root path. Note: this failure itself is not fixed and still would occur on newer Debian or macOS systems.

4. Set gpg root folder permission correctly to 700, otherwise the newer version gpg will return non-zero value. Previously used method set it to 755.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178163297
2017-12-13 12:43:45 -05:00
..
backup Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
batch Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
bigquery Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
billing Generate detail reports from Bigquery via Beam 2017-12-13 12:43:45 -05:00
builddefs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
config Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
cron Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
dns Fetch data from Cloud DNS in parallel 2017-12-13 12:43:45 -05:00
export Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
flows Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
groups Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
keyring Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
mapreduce/inputs Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
model Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
module Add apache beam to registry and open source 2017-11-07 17:36:07 -05:00
monitoring Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
pricing Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
proxy Open source GCP proxy 2017-11-21 19:19:03 -05:00
rdap Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
rde Fix some GPG related test issues 2017-12-13 12:43:45 -05:00
reporting Rename all testdata loading files to conform to a single naming scheme 2017-12-01 22:14:06 -05:00
request Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
security Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
server Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
storage/drive Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
testing Fix some GPG related test issues 2017-12-13 12:43:45 -05:00
tldconfig/idn Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
tmch Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
tools Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
ui Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
util Clean up some code quality issues 2017-12-01 22:14:06 -05:00
whois Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
xjc Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
xml Clean up test "load resources" methods and classes 2017-12-01 22:14:05 -05:00