mirror of
https://github.com/google/nomulus
synced 2026-09-19 06:32:00 +00:00
Expand nomulus get_domain command to load up deleted domain data too (#2018)
This commit is contained in:
@@ -116,4 +116,25 @@ class GetDomainCommandTest extends CommandTestCase<GetDomainCommand> {
|
||||
assertInStdout("domainName=example.tld");
|
||||
assertInStdout("Domain 'example.com' does not exist or is deleted");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_printDeletedDomain() throws Exception {
|
||||
persistDeletedDomain("example.tld", fakeClock.nowUtc().minusDays(1));
|
||||
runCommand("--show_deleted", "example.tld");
|
||||
assertInStdout("domainName=example.tld");
|
||||
assertInStdout("Websafe key: kind:Domain@sql:rO0ABXQABTItVExE");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_printsEntireDomainHistory() throws Exception {
|
||||
persistActiveDomain("example.tld");
|
||||
persistDeletedDomain("example.tld", fakeClock.nowUtc().minusDays(1));
|
||||
runCommand("--show_deleted", "example.tld");
|
||||
assertInStdout("domainName=example.tld");
|
||||
// Active
|
||||
assertInStdout("Websafe key: kind:Domain@sql:rO0ABXQABTItVExE");
|
||||
// Deleted
|
||||
assertInStdout("Websafe key: kind:Domain@sql:rO0ABXQABTQtVExE");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user