mirror of
https://github.com/google/nomulus.git
synced 2025-08-12 04:29:39 +02:00
Remove unused nomulus tool command (#1870)
This command was used to compare mapreduce-generated escrow deposits with those generated by dataflow. <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1870) <!-- Reviewable:end -->
This commit is contained in:
parent
fa3f2a2f21
commit
0cf6d38b97
4 changed files with 0 additions and 198 deletions
|
@ -1,63 +0,0 @@
|
|||
// Copyright 2021 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.tools.javascrap;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import google.registry.rde.RdeTestData;
|
||||
import google.registry.tools.CommandTestCase;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link CompareEscrowDepositsCommand}. */
|
||||
class CompareEscrowDepositsCommandTest extends CommandTestCase<CompareEscrowDepositsCommand> {
|
||||
|
||||
@Test
|
||||
void testFailure_wrongNumberOfFiles() throws Exception {
|
||||
String file1 = writeToNamedTmpFile("file1", "foo".getBytes(StandardCharsets.UTF_8));
|
||||
String file2 = writeToNamedTmpFile("file2", "bar".getBytes(StandardCharsets.UTF_8));
|
||||
String file3 = writeToNamedTmpFile("file3", "baz".getBytes(StandardCharsets.UTF_8));
|
||||
assertThrows(IllegalArgumentException.class, () -> runCommand(file1));
|
||||
assertThrows(IllegalArgumentException.class, () -> runCommand(file1, file2, file3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_sameContentDifferentOrder() throws Exception {
|
||||
String file1 = writeToNamedTmpFile("file1", RdeTestData.loadBytes("deposit_full.xml").read());
|
||||
String file2 =
|
||||
writeToNamedTmpFile("file2", RdeTestData.loadBytes("deposit_full_out_of_order.xml").read());
|
||||
runCommand(file1, file2);
|
||||
assertThat(getStdoutAsString())
|
||||
.contains("The two deposits contain the same domains and registrars.");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_differentContent() throws Exception {
|
||||
String file1 = writeToNamedTmpFile("file1", RdeTestData.loadBytes("deposit_full.xml").read());
|
||||
String file2 =
|
||||
writeToNamedTmpFile("file2", RdeTestData.loadBytes("deposit_full_different.xml").read());
|
||||
runCommand(file1, file2);
|
||||
assertThat(getStdoutAsString())
|
||||
.isEqualTo(
|
||||
"domains only in deposit1:\n"
|
||||
+ "example2.test\n"
|
||||
+ "domains only in deposit2:\n"
|
||||
+ "example3.test\n"
|
||||
+ "registrars only in deposit2:\n"
|
||||
+ "RegistrarY\n"
|
||||
+ "The two deposits differ.\n");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue