Skip to content

Commit

Permalink
Improve the test case NamespaceServiceTest.testFindNamespace()
Browse files Browse the repository at this point in the history
  • Loading branch information
klboke committed Jul 31, 2022
1 parent 4a8d92c commit e7d1bac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public void testFindNamespace() {
assertEquals(testNamespaceName, namespaceVO.getBaseInfo().getNamespaceName());

ReleaseDTO errorRelease = new ReleaseDTO();
someRelease.setConfigurations("\"a\":\"123\",\"b\":\"123\"");
when(releaseService.loadLatestRelease(testAppId, Env.DEV, testClusterName, "hermes")).thenReturn(errorRelease);
errorRelease.setConfigurations("\"a\":\"123\",\"b\":\"123\"");
when(releaseService.loadLatestRelease(testAppId, Env.DEV, testClusterName, testNamespaceName)).thenReturn(errorRelease);
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(()-> namespaceService.findNamespaceBOs(testAppId, Env.DEV, testClusterName))
.withMessageStartingWith("Parse namespaces error, expected: 1, but actual: 0, cannot get those namespaces: [application]");
Expand Down

0 comments on commit e7d1bac

Please sign in to comment.