Fix list_cursors command for globals (#1840)

This commit is contained in:
Weimin Yu
2022-11-04 11:18:20 -04:00
committed by GitHub
parent 4da474e094
commit e01448b52e
2 changed files with 22 additions and 15 deletions
@@ -15,6 +15,7 @@
package google.registry.tools;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.createTlds;
import static google.registry.testing.DatabaseHelper.persistResource;
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -41,6 +42,12 @@ public class ListCursorsCommandTest extends CommandTestCase<ListCursorsCommand>
fakeClock.setTo(DateTime.parse("1984-12-21T06:07:08.789Z"));
}
@Test
void testlistCursors_globalScoped() throws Exception {
createTld("com");
runCommand("--type=RECURRING_BILLING");
}
@Test
void testListCursors_noTlds_printsNothing() throws Exception {
runCommand("--type=BRDA");