Bumping Spring Boot to 2.2.1.RELEASE

Upgrading mockito to match boots managed version

Removing JUnit vintage and duplicated dependencies
This commit is contained in:
Alberto Rios
2019-11-15 19:16:15 +01:00
committed by Roy Clarkson
parent 55afc5605f
commit f5ebb7945b
14 changed files with 49 additions and 48 deletions

View File

@@ -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"

View File

@@ -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")
}

View File

@@ -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}")

View File

@@ -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());
}
}

View File

@@ -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 {

View File

@@ -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);
}

View File

@@ -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);
}
}

View File

@@ -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();
}

View File

@@ -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<Domain> getDomains() {

View File

@@ -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();
}

View File

@@ -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")
}

View File

@@ -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 {

View File

@@ -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")
}
}

View File

@@ -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