Skip to content

Commit

Permalink
Fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewAden committed Jan 10, 2025
1 parent e854f8f commit dfd421e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ void testDeleteConfigWhenNameSpaceIsPublic() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();

when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(),
any(), "http")).thenReturn(true);
any(), eq("http"))).thenReturn(true);
Result<Boolean> booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID_PUBLIC,
TEST_TAG);

verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), any(),
"http");
eq("http"));

assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode());
assertTrue(booleanResult.getData());
Expand All @@ -242,12 +242,12 @@ void testDeleteConfig() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();

when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(),
any(), "http")).thenReturn(true);
any(), eq("http"))).thenReturn(true);

Result<Boolean> booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, TEST_TAG);

verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), any(),
"http");
eq("http"));

assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode());
assertTrue(booleanResult.getData());
Expand Down

0 comments on commit dfd421e

Please sign in to comment.