Refactor out creation of server TRIDs so they can be tested

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152837185
This commit is contained in:
mcilwain 2017-04-11 11:28:11 -07:00 committed by Ben McIlwain
parent af942774f4
commit 8653d2f204
29 changed files with 174 additions and 62 deletions

View file

@ -110,7 +110,7 @@ public class ContactResourceTest extends EntityTestCase {
Key.create(BillingEvent.OneTime.class, 1)))
.setTransferRequestTime(clock.nowUtc())
.setTransferStatus(TransferStatus.SERVER_APPROVED)
.setTransferRequestTrid(Trid.create("client trid"))
.setTransferRequestTrid(Trid.create("client-trid", "server-trid"))
.build())
.build()));
}

View file

@ -90,7 +90,7 @@ public class DomainApplicationTest extends EntityTestCase {
.setDsData(ImmutableSet.of(DelegationSignerData.create(1, 2, 3, new byte[] {0, 1, 2})))
.setLaunchNotice(
LaunchNotice.create("tcnid", "validatorId", START_OF_TIME, START_OF_TIME))
.setCreationTrid(Trid.create("client creation trid"))
.setCreationTrid(Trid.create("client-creation-trid", "server-trid"))
.setPhase(LaunchPhase.LANDRUSH)
// TODO(b/32447342): set period
.setEncodedSignedMarks(ImmutableList.of(EncodedSignedMark.create("base64", "abcdefg=")))

View file

@ -137,7 +137,7 @@ public class DomainResourceTest extends EntityTestCase {
.setServerApproveAutorenewPollMessage(autorenewPollKey)
.setTransferRequestTime(clock.nowUtc().plusDays(1))
.setTransferStatus(TransferStatus.SERVER_APPROVED)
.setTransferRequestTrid(Trid.create("client trid"))
.setTransferRequestTrid(Trid.create("client-trid", "server-trid"))
.build())
.setDeletePollMessage(onetimePollKey)
.setAutorenewBillingEvent(recurringBillKey)

View file

@ -69,7 +69,7 @@ public class HostResourceTest extends EntityTestCase {
Key.create(BillingEvent.OneTime.class, 1)))
.setTransferRequestTime(clock.nowUtc())
.setTransferStatus(TransferStatus.SERVER_APPROVED)
.setTransferRequestTrid(Trid.create("client trid"))
.setTransferRequestTrid(Trid.create("client-trid", "server-trid"))
.build())
.build());
host =

View file

@ -70,7 +70,7 @@ public class PollMessageExternalKeyConverterTest {
.setXmlBytes("<xml></xml>".getBytes(UTF_8))
.setModificationTime(clock.nowUtc())
.setClientId("foo")
.setTrid(Trid.create("ABC-123"))
.setTrid(Trid.create("ABC-123", "server-trid"))
.setBySuperuser(false)
.setReason("reason")
.setRequestedByRegistrar(false)

View file

@ -43,7 +43,7 @@ public class PollMessageTest extends EntityTestCase {
.setXmlBytes("<xml></xml>".getBytes(UTF_8))
.setModificationTime(clock.nowUtc())
.setClientId("foo")
.setTrid(Trid.create("ABC-123"))
.setTrid(Trid.create("ABC-123", "server-trid"))
.setBySuperuser(false)
.setReason("reason")
.setRequestedByRegistrar(false)

View file

@ -44,7 +44,7 @@ public class HistoryEntryTest extends EntityTestCase {
.setModificationTime(clock.nowUtc())
.setClientId("foo")
.setOtherClientId("otherClient")
.setTrid(Trid.create("ABC-123"))
.setTrid(Trid.create("ABC-123", "server-trid"))
.setBySuperuser(false)
.setReason("reason")
.setRequestedByRegistrar(false)