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:
Ben McIlwain 2018-06-11 08:47:54 -07:00
parent fe1b2778ec
commit 8f666ad017
2 changed files with 0 additions and 40 deletions

View file

@ -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);