diff --git a/aip-console-jenkins/src/test/java/io/jenkins/plugins/aipconsole/AddVersionBuilderTest.java b/aip-console-jenkins/src/test/java/io/jenkins/plugins/aipconsole/AddVersionBuilderTest.java index 2a4df619..ab8b0809 100644 --- a/aip-console-jenkins/src/test/java/io/jenkins/plugins/aipconsole/AddVersionBuilderTest.java +++ b/aip-console-jenkins/src/test/java/io/jenkins/plugins/aipconsole/AddVersionBuilderTest.java @@ -110,7 +110,9 @@ public void setUp() { public void testAddVersionStepToJob() throws Exception { FreeStyleProject project = getProjectWithDefaultAddVersion(); project = jenkins.configRoundtrip(project); - jenkins.assertEqualDataBoundBeans(new AddVersionBuilder(TEST_APP_NAME, TEST_ARCHIVE_NAME), project.getBuildersList().get(0)); + AddVersionBuilder job = new AddVersionBuilder(TEST_APP_NAME, TEST_ARCHIVE_NAME); + job.setDomainName(""); + jenkins.assertEqualDataBoundBeans(job, project.getBuildersList().get(0)); } @Test @@ -305,6 +307,7 @@ public void testBuildCreateAppOnNodeWithNameSuccess() throws Exception { addVersionBuilder.setFilePath(createTempFileAndGetPath(TEST_ARCHIVE_NAME)); addVersionBuilder.setAutoCreate(true); addVersionBuilder.setNodeName(TEST_NODE_NAME); + addVersionBuilder.setDomainName(null); FreeStyleProject project = getProjectWithBuilder(addVersionBuilder); doNothing(). @@ -314,7 +317,7 @@ public void testBuildCreateAppOnNodeWithNameSuccess() throws Exception { doReturn(Collections.singletonList(new NodeDto(TEST_NODE_NAME, TEST_NODE_NAME, "http", "localhost", 8082))) .when(restApiService).getForEntity(eq("/api/nodes"), isA(TypeReference.class)); doReturn("createAppGuid") - .when(jobsService).startCreateApplication(TEST_APP_NAME, TEST_NODE_NAME); + .when(jobsService).startCreateApplication(TEST_APP_NAME, TEST_NODE_NAME, null); doReturn(TEST_APP_NAME) .when(jobsService).pollAndWaitForJobFinished(eq("createAppGuid"), any(), any(), any()); doReturn(true) diff --git a/aip-console-tools-core/src/test/java/com/castsoftware/aip/console/tools/core/services/ApplicationServiceImplTest.java b/aip-console-tools-core/src/test/java/com/castsoftware/aip/console/tools/core/services/ApplicationServiceImplTest.java index c73a1664..ebc364d1 100644 --- a/aip-console-tools-core/src/test/java/com/castsoftware/aip/console/tools/core/services/ApplicationServiceImplTest.java +++ b/aip-console-tools-core/src/test/java/com/castsoftware/aip/console/tools/core/services/ApplicationServiceImplTest.java @@ -99,7 +99,7 @@ public void testGetOrCreateApplicationApplicationFound() throws Exception { public void testGetOrCreateApplicationCreateJobFailure() throws Exception { when(restApiService.getForEntity(API_APP_ENDPOINT, Applications.class)) .thenReturn(new Applications()); - when(jobsService.startCreateApplication(TEST_APP_NAME, null)) + when(jobsService.startCreateApplication(TEST_APP_NAME, null, null)) .thenThrow(new JobServiceException()); applicationService.getOrCreateApplicationFromName(TEST_APP_NAME, true); @@ -110,7 +110,7 @@ public void testGetOrCreateApplicationCreateJobFailure() throws Exception { public void testGetOrCreateApplicationJobFailed() throws Exception { when(restApiService.getForEntity(API_APP_ENDPOINT, Applications.class)) .thenReturn(new Applications()); - when(jobsService.startCreateApplication(TEST_APP_NAME, null)) + when(jobsService.startCreateApplication(TEST_APP_NAME, null, null)) .thenReturn(TEST_JOB_GUID); when(jobsService.pollAndWaitForJobFinished(eq(TEST_JOB_GUID), any())) .thenReturn(null); @@ -123,7 +123,7 @@ public void testGetOrCreateApplicationJobFailed() throws Exception { public void testGetOrCreateApplicationOk() throws Exception { when(restApiService.getForEntity(API_APP_ENDPOINT, Applications.class)) .thenReturn(new Applications()); - when(jobsService.startCreateApplication(TEST_APP_NAME, null)) + when(jobsService.startCreateApplication(TEST_APP_NAME, null, null)) .thenReturn(TEST_JOB_GUID); when(jobsService.pollAndWaitForJobFinished(eq(TEST_JOB_GUID), any())) .thenReturn(TEST_APP_GUID);