mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 11:19:35 +02:00
Remove redundant inputXml log in EPP flows
Currently the input XML to an EPP flow is logged twice, once in FlowRunner and once in FlowReporter. The log by FlowReporter was used by reporting but this is no longer the case. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200057153
This commit is contained in:
parent
fe1b2778ec
commit
8f666ad017
2 changed files with 0 additions and 40 deletions
|
@ -14,9 +14,7 @@
|
|||
|
||||
package google.registry.flows;
|
||||
|
||||
import static com.google.common.io.BaseEncoding.base64;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.TestDataHelper.loadFile;
|
||||
import static google.registry.testing.TestLogHandlerUtils.findFirstLogMessageByPrefix;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
@ -76,26 +74,6 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
when(flowReporter.eppInput.getTargetIds()).thenReturn(ImmutableList.of("target.foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRecordToLogs_eppInput_basic() throws Exception {
|
||||
flowReporter.recordToLogs();
|
||||
assertThat(parseJsonMap(findFirstLogMessageByPrefix(handler, "FLOW-LOG-SIGNATURE-EPPINPUT: ")))
|
||||
.containsExactly(
|
||||
"xml", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>\n",
|
||||
"xmlBytes", "PHhtbC8+"); // Base64-encoding of "<xml/>".
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRecordToLogs_eppInput_complex() throws Exception {
|
||||
String domainCreateXml = loadFile(getClass(), "domain_create_prettyprinted.xml");
|
||||
flowReporter.inputXmlBytes = domainCreateXml.getBytes(UTF_8);
|
||||
flowReporter.recordToLogs();
|
||||
assertThat(parseJsonMap(findFirstLogMessageByPrefix(handler, "FLOW-LOG-SIGNATURE-EPPINPUT: ")))
|
||||
.containsExactly(
|
||||
"xml", domainCreateXml,
|
||||
"xmlBytes", base64().encode(domainCreateXml.getBytes(UTF_8)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_basic() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue