google-nomulus/javatests/google/registry/testing
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
..
mapreduce Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
sftp Remove an unused exception 2017-02-02 17:06:50 -05:00
testdata Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00
AbstractDomainBaseSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
AbstractEppResourceSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
AppEngineRule.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
BouncyCastleProviderRule.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BUILD Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
CertificateSamples.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ContactResourceSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
DatastoreHelper.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
default_premium_list_testdata.csv Don't allow duplicates in premium/reserved lists 2017-02-27 11:17:58 -05:00
DeterministicStringGenerator.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
DomainApplicationSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
DomainResourceSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
EppExceptionSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
EppLoader.java Rename all testdata loading files to conform to a single naming scheme 2017-12-01 22:14:06 -05:00
EppMetricSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
ExceptionRule.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FailAnswer.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeClock.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeHttpSession.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeJsonResponse.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeKeyringModule.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
FakeLockHandler.java Create an injectable LockHandler 2017-09-12 15:51:50 -04:00
FakeOAuthService.java Add more tests to new authentication framework 2017-02-27 11:19:27 -05:00
FakeResponse.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeServletInputStream.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeServletOutputStream.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeSleeper.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeURLFetchService.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FakeUserService.java Daggerize XsrfTokenManager 2017-02-22 11:43:10 -05:00
ForwardingURLFetchService.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
FullFieldsTestEntityHelper.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
GcsTestingUtils.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GenericEppResourceSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
GoldenFileTestHelper.java Add golden files for request component routing maps 2017-06-05 18:17:09 -04:00
GpgSystemCommandRule.java Fix some GPG related test issues 2017-12-13 12:43:45 -05:00
HistoryEntrySubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
HostResourceSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
InjectRule.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
IoSpyRule.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
Lazies.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
logging.properties Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
LogsSubject.java Replace FailureStrategy with FailureMetadata in gtld's Subjects 2017-11-21 18:39:45 -05:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
Providers.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
ReflectiveFieldExtractor.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ShardableTestCase.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SlurpAnswer.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SystemInfo.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SystemPropertyRule.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
TaskQueueHelper.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
TestDataHelper.java Rename all testdata loading files to conform to a single naming scheme 2017-12-01 22:14:06 -05:00
TestLogHandlerUtils.java Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
TestObject.java Add @VirtualEntity checking to Ofy's deleteWithoutBackup() 2017-02-08 17:31:07 -05:00
TruthChainer.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UriParameters.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UserInfo.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00