mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Set clock used to validate Tmch signature in tests
The signature has expired on Mon Jun 25 23:59:59 UTC 2018. Instead of fixing all the test files with a new signed mark, we inject the clock used to validate the signature. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=202116721
This commit is contained in:
parent
94044847ee
commit
44c517f111
5 changed files with 14 additions and 1 deletions
|
@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.ImmutableSortedMap;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.tmch.TmchCertificateAuthority;
|
||||
import google.registry.util.DateTimeUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
|
@ -42,6 +43,8 @@ public class EppLifecycleDomainApplicationTest extends EppTestCase {
|
|||
|
||||
@Before
|
||||
public void initTld() {
|
||||
// Setting the clock used for SignedMark signature validity.
|
||||
TmchCertificateAuthority.clock = () -> DateTime.parse("2015-01-01TZ");
|
||||
createTld("example", ImmutableSortedMap.of(
|
||||
DateTimeUtils.START_OF_TIME, TldState.SUNRISE,
|
||||
START_OF_GA, TldState.GENERAL_AVAILABILITY));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue