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:
guyben 2018-06-26 06:09:22 -07:00 committed by Ben McIlwain
parent 94044847ee
commit 44c517f111
5 changed files with 14 additions and 1 deletions

View file

@ -73,6 +73,8 @@ public class UpdateSmdCommandTest extends CommandTestCase<UpdateSmdCommand> {
@Before
public void init() {
// Setting the clock used for SignedMark signature validity.
TmchCertificateAuthority.clock = () -> DateTime.parse("2015-01-01TZ");
inject.setStaticField(Ofy.class, "clock", clock);
createTld("xn--q9jyb4c");
clock.advanceOneMilli();