Skip to content

Commit

Permalink
[#6414] improve(CLI): Add catalog command context CLI
Browse files Browse the repository at this point in the history
fix test bugs.
  • Loading branch information
Abyss-lord committed Feb 11, 2025
1 parent a65b394 commit 2135aab
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ void setUp() {
mockOptions = mock(Options.class);
System.setOut(new PrintStream(outContent));
System.setErr(new PrintStream(errContent));
Main.useExit = false;
}

@AfterEach
Expand Down Expand Up @@ -179,6 +178,7 @@ void testCreateCatalogCommand() {

@Test
void testCreateCatalogCommandWithoutProvider() {
Main.useExit = false;
CommandContext mockContext = mock(CommandContext.class);
when(mockContext.url()).thenReturn("http://localhost:8080");
CreateCatalog mockCreateCatalog =
Expand Down Expand Up @@ -258,6 +258,7 @@ void testSetCatalogPropertyCommand() {

@Test
void testSetCatalogPropertyCommandWithoutPropertyAndValue() {
Main.useExit = false;
CommandContext mockContext = mock(CommandContext.class);
when(mockContext.url()).thenReturn("http://localhost:8080");
SetCatalogProperty mockSetProperty =
Expand All @@ -270,6 +271,7 @@ void testSetCatalogPropertyCommandWithoutPropertyAndValue() {

@Test
void testSetCatalogPropertyCommandWithoutProperty() {
Main.useExit = false;
CommandContext mockContext = mock(CommandContext.class);
when(mockContext.url()).thenReturn("http://localhost:8080");
SetCatalogProperty mockSetProperty =
Expand Down

0 comments on commit 2135aab

Please sign in to comment.