mirror of
https://github.com/google/nomulus
synced 2026-08-31 21:27:09 +00:00
Update signed marks files and add an expiration test
We'll continue to use injected clocks for the rest of our tests that use signed marks files, so that they don't all fail after the current validity period. The new test TmchTestDataExpirationTest will let us know when the files are expired, so we can update them. All updated test data files come from https://newgtlds.icann.org/en/about/trademark-clearinghouse/registries-registrars ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=202208196
This commit is contained in:
@@ -39,8 +39,12 @@ public final class TmchTestData {
|
||||
/** Extracts SMD XML from an ASCII-armored file. */
|
||||
public static byte[] loadSmd(String file) {
|
||||
String data = loadFile(file);
|
||||
return base64().decode(whitespace().removeFrom(data.substring(
|
||||
data.indexOf(BEGIN_ENCODED_SMD) + BEGIN_ENCODED_SMD.length(),
|
||||
data.indexOf(END_ENCODED_SMD))));
|
||||
return base64()
|
||||
.decode(
|
||||
whitespace()
|
||||
.removeFrom(
|
||||
data.substring(
|
||||
data.indexOf(BEGIN_ENCODED_SMD) + BEGIN_ENCODED_SMD.length(),
|
||||
data.indexOf(END_ENCODED_SMD))));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user