diff --git a/build.gradle b/build.gradle index 6dcc967..85d629d 100644 --- a/build.gradle +++ b/build.gradle @@ -28,12 +28,12 @@ buildscript { } ext { - springBootVersion = project.findProperty("springBootVersion") ?: "2.1.10.RELEASE" - springFrameworkVersion = project.findProperty("springFrameworkVersion") ?: "5.1.11.RELEASE" + springBootVersion = project.findProperty("springBootVersion") ?: "2.2.1.RELEASE" + springFrameworkVersion = project.findProperty("springFrameworkVersion") ?: "5.2.1.RELEASE" reactorVersion = project.findProperty("reactorVersion") ?: "Californium-SR13" openServiceBrokerVersion = "3.0.4.RELEASE" springCredhubVersion = "2.0.1.RELEASE" - cfJavaClientVersion = "3.16.0.RELEASE" + cfJavaClientVersion = "3.17.1.RELEASE" checkstyleVersion = "8.21" pmdVersion = "6.19.0" diff --git a/spring-cloud-app-broker-acceptance-tests/build.gradle b/spring-cloud-app-broker-acceptance-tests/build.gradle index 6593fc1..d4c8766 100644 --- a/spring-cloud-app-broker-acceptance-tests/build.gradle +++ b/spring-cloud-app-broker-acceptance-tests/build.gradle @@ -35,9 +35,14 @@ apply plugin: 'org.springframework.boot' dependencies { compile project(":spring-cloud-starter-app-broker-cloudfoundry") compile("org.springframework.boot:spring-boot-starter-webflux") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") + testCompile("org.junit.jupiter:junit-jupiter-api") - testCompile("org.springframework.boot:spring-boot-starter-test") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + testCompile("io.projectreactor:reactor-test") testCompile("org.assertj:assertj-core") } diff --git a/spring-cloud-app-broker-autoconfigure/build.gradle b/spring-cloud-app-broker-autoconfigure/build.gradle index 294dd73..e619c2c 100644 --- a/spring-cloud-app-broker-autoconfigure/build.gradle +++ b/spring-cloud-app-broker-autoconfigure/build.gradle @@ -35,12 +35,9 @@ dependencies { annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") - - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.springframework.boot:spring-boot-starter-webflux") - testImplementation("org.junit.jupiter:junit-jupiter-api") - testImplementation("org.mockito:mockito-junit-jupiter") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } testCompileOnly("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}") testCompileOnly("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}") diff --git a/spring-cloud-app-broker-autoconfigure/src/test/java/org/springframework/cloud/appbroker/autoconfigure/CredHubAutoConfigurationTest.java b/spring-cloud-app-broker-autoconfigure/src/test/java/org/springframework/cloud/appbroker/autoconfigure/CredHubAutoConfigurationTest.java index f17418e..6e85710 100644 --- a/spring-cloud-app-broker-autoconfigure/src/test/java/org/springframework/cloud/appbroker/autoconfigure/CredHubAutoConfigurationTest.java +++ b/spring-cloud-app-broker-autoconfigure/src/test/java/org/springframework/cloud/appbroker/autoconfigure/CredHubAutoConfigurationTest.java @@ -29,9 +29,10 @@ import org.springframework.cloud.appbroker.workflow.binding.CredHubPersistingCre import org.springframework.cloud.appbroker.workflow.binding.CredHubPersistingDeleteServiceInstanceBindingWorkflow; import org.springframework.context.annotation.Bean; import org.springframework.credhub.core.CredHubOperations; +import org.springframework.credhub.core.CredHubTemplate; +import org.springframework.web.client.RestTemplate; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; class CredHubAutoConfigurationTest { @@ -84,7 +85,7 @@ class CredHubAutoConfigurationTest { @Bean public CredHubOperations credHubOperations() { - return mock(CredHubOperations.class); + return new CredHubTemplate(new RestTemplate()); } } diff --git a/spring-cloud-app-broker-core/build.gradle b/spring-cloud-app-broker-core/build.gradle index 5b8aad9..b1a8cbf 100644 --- a/spring-cloud-app-broker-core/build.gradle +++ b/spring-cloud-app-broker-core/build.gradle @@ -19,7 +19,7 @@ description = "Spring Cloud App Broker Core" ext { junitJupiterVersion = "5.5.2" assertjVersion = "3.13.2" - mockitoVersion = "3.0.0" + mockitoVersion = "3.1.0" } dependencyManagement { diff --git a/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/BackingAppManagementServiceTest.java b/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/BackingAppManagementServiceTest.java index dcb00c6..38acdf9 100644 --- a/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/BackingAppManagementServiceTest.java +++ b/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/BackingAppManagementServiceTest.java @@ -39,8 +39,8 @@ import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; @ExtendWith(MockitoExtension.class) class BackingAppManagementServiceTest { @@ -145,7 +145,7 @@ class BackingAppManagementServiceTest { verify(appDeployer).getServiceInstance(any(GetServiceInstanceRequest.class)); verify(targetService).addToBackingApplications(eq(emptyBackingApps), any(), eq("foo-service-id")); - verifyZeroInteractions(managementClient); + verifyNoInteractions(managementClient); verifyNoMoreInteractions(appDeployer, targetService, managementClient); } @@ -232,7 +232,7 @@ class BackingAppManagementServiceTest { verify(appDeployer).getServiceInstance(any(GetServiceInstanceRequest.class)); verify(targetService).addToBackingApplications(eq(emptyBackingApps), any(), eq("foo-service-id")); - verifyZeroInteractions(managementClient); + verifyNoInteractions(managementClient); verifyNoMoreInteractions(appDeployer, targetService, managementClient); } @@ -307,7 +307,7 @@ class BackingAppManagementServiceTest { verify(appDeployer).getServiceInstance(any(GetServiceInstanceRequest.class)); verify(targetService).addToBackingApplications(eq(emptyBackingApps), any(), eq("foo-service-id")); - verifyZeroInteractions(managementClient); + verifyNoInteractions(managementClient); verifyNoMoreInteractions(appDeployer, targetService, managementClient); } @@ -382,7 +382,7 @@ class BackingAppManagementServiceTest { verify(appDeployer).getServiceInstance(any(GetServiceInstanceRequest.class)); verify(targetService).addToBackingApplications(eq(emptyBackingApps), any(), eq("foo-service-id")); - verifyZeroInteractions(managementClient); + verifyNoInteractions(managementClient); verifyNoMoreInteractions(appDeployer, targetService, managementClient); } diff --git a/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/ManagementClientTest.java b/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/ManagementClientTest.java index 36c96b5..cd8b2da 100644 --- a/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/ManagementClientTest.java +++ b/spring-cloud-app-broker-core/src/test/java/org/springframework/cloud/appbroker/manager/ManagementClientTest.java @@ -32,8 +32,8 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; @ExtendWith(MockitoExtension.class) class ManagementClientTest { @@ -73,7 +73,7 @@ class ManagementClientTest { StepVerifier.create(managementClient.start(null)) .verifyComplete(); - verifyZeroInteractions(appManager); + verifyNoInteractions(appManager); } @Test @@ -94,7 +94,7 @@ class ManagementClientTest { StepVerifier.create(managementClient.stop(null)) .verifyComplete(); - verifyZeroInteractions(appManager); + verifyNoInteractions(appManager); } @Test @@ -115,7 +115,7 @@ class ManagementClientTest { StepVerifier.create(managementClient.restart(null)) .verifyComplete(); - verifyZeroInteractions(appManager); + verifyNoInteractions(appManager); } @Test @@ -136,7 +136,7 @@ class ManagementClientTest { StepVerifier.create(managementClient.restage(null)) .verifyComplete(); - verifyZeroInteractions(appManager); + verifyNoInteractions(appManager); } } diff --git a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerTest.java b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerTest.java index f2d8bd3..07999f5 100644 --- a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerTest.java +++ b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerTest.java @@ -864,7 +864,7 @@ class CloudFoundryAppDeployerTest { then(operationsUtils).should().getOperations(argThat(CollectionUtils::isEmpty)); then(cloudFoundryOperations).should().services(); then(operationsServices).should().getInstance(argThat(req -> "my-foo-service".equals(req.getName()))); - then(cloudFoundryClient).shouldHaveZeroInteractions(); + then(cloudFoundryClient).shouldHaveNoInteractions(); then(cloudFoundryOperations).shouldHaveNoMoreInteractions(); then(operationsUtils).shouldHaveNoMoreInteractions(); } @@ -898,7 +898,7 @@ class CloudFoundryAppDeployerTest { argThat(argument -> "foo-space".equals(argument.get(TARGET_PROPERTY_KEY)))); then(cloudFoundryOperations).should().services(); then(operationsServices).should().getInstance(argThat(req -> "my-foo-service".equals(req.getName()))); - then(cloudFoundryClient).shouldHaveZeroInteractions(); + then(cloudFoundryClient).shouldHaveNoInteractions(); then(cloudFoundryOperations).shouldHaveNoMoreInteractions(); then(operationsUtils).shouldHaveNoMoreInteractions(); } diff --git a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerUpdateApplicationTest.java b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerUpdateApplicationTest.java index 9da7ef3..3ca50f1 100644 --- a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerUpdateApplicationTest.java +++ b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppDeployerUpdateApplicationTest.java @@ -295,7 +295,7 @@ class CloudFoundryAppDeployerUpdateApplicationTest { .assertNext(response -> assertThat(response.getName()).isEqualTo(APP_NAME)) .verifyComplete(); - then(applicationsV2).shouldHaveZeroInteractions(); + then(applicationsV2).shouldHaveNoInteractions(); } @Test @@ -545,7 +545,7 @@ class CloudFoundryAppDeployerUpdateApplicationTest { .expectError(RuntimeException.class) .verify(); - then(routes).shouldHaveZeroInteractions(); + then(routes).shouldHaveNoInteractions(); } private Flux getDomains() { diff --git a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppManagerTest.java b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppManagerTest.java index 4c365ed..abc095a 100644 --- a/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppManagerTest.java +++ b/spring-cloud-app-broker-deployer-cloudfoundry/src/test/java/org/springframework/cloud/appbroker/deployer/cloudfoundry/CloudFoundryAppManagerTest.java @@ -61,7 +61,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.start(null)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -93,7 +93,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.start(request)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -102,7 +102,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.stop(null)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -134,7 +134,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.stop(request)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -143,7 +143,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.restart(null)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -176,7 +176,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.restart(request)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -185,7 +185,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.restage(null)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } @@ -218,7 +218,7 @@ class CloudFoundryAppManagerTest { StepVerifier.create(appManager.restage(request)) .verifyComplete(); - then(operationsApplications).shouldHaveZeroInteractions(); + then(operationsApplications).shouldHaveNoInteractions(); then(operations).shouldHaveNoMoreInteractions(); } diff --git a/spring-cloud-app-broker-deployer/build.gradle b/spring-cloud-app-broker-deployer/build.gradle index 356f700..84d2992 100644 --- a/spring-cloud-app-broker-deployer/build.gradle +++ b/spring-cloud-app-broker-deployer/build.gradle @@ -25,7 +25,9 @@ dependencyManagement { dependencies { compile("org.springframework:spring-core") compile("io.projectreactor:reactor-core") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") + testCompile("org.junit.jupiter:junit-jupiter-api") testCompile("org.assertj:assertj-core") } diff --git a/spring-cloud-app-broker-integration-tests/build.gradle b/spring-cloud-app-broker-integration-tests/build.gradle index d574a3e..4851d26 100644 --- a/spring-cloud-app-broker-integration-tests/build.gradle +++ b/spring-cloud-app-broker-integration-tests/build.gradle @@ -40,13 +40,11 @@ dependencies { compile project(":spring-cloud-starter-app-broker-cloudfoundry") compile("org.springframework.boot:spring-boot-starter-webflux") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") - - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.junit.jupiter:junit-jupiter-api") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } testImplementation("io.rest-assured:rest-assured") testImplementation("com.github.tomakehurst:wiremock:${wiremockVersion}") - testImplementation("org.mockito:mockito-junit-jupiter") } test { diff --git a/spring-cloud-app-broker-security-credhub/build.gradle b/spring-cloud-app-broker-security-credhub/build.gradle index 85bbc2a..b282aa7 100644 --- a/spring-cloud-app-broker-security-credhub/build.gradle +++ b/spring-cloud-app-broker-security-credhub/build.gradle @@ -26,10 +26,8 @@ dependencies { compile project(":spring-cloud-app-broker-core") compile("org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") - - testImplementation("org.springframework.boot:spring-boot-starter-test") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } testImplementation("io.projectreactor:reactor-test") - testImplementation("org.junit.jupiter:junit-jupiter-api") - testImplementation("org.mockito:mockito-junit-jupiter") -} \ No newline at end of file +} diff --git a/spring-cloud-app-broker-security-credhub/src/test/java/org/springframework/cloud/appbroker/workflow/binding/CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest.java b/spring-cloud-app-broker-security-credhub/src/test/java/org/springframework/cloud/appbroker/workflow/binding/CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest.java index 83204a1..7f8a047 100644 --- a/spring-cloud-app-broker-security-credhub/src/test/java/org/springframework/cloud/appbroker/workflow/binding/CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest.java +++ b/spring-cloud-app-broker-security-credhub/src/test/java/org/springframework/cloud/appbroker/workflow/binding/CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest.java @@ -44,8 +44,8 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; @ExtendWith(MockitoExtension.class) class CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest { @@ -100,7 +100,7 @@ class CredHubPersistingCreateServiceInstanceAppBindingWorkflowTest { }) .verifyComplete(); - verifyZeroInteractions(this.credHubCredentialOperations); + verifyNoInteractions(this.credHubCredentialOperations); } @Test