From 541fbff3521cc9a14b5e8c94f3efe69366dd0e3a Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 20 Jul 2017 13:36:46 +0100 Subject: [PATCH 1/4] Change matcher to accoutn for updates in mockito --- .../PropertyBasedSshSessionFactoryTest.java | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactoryTest.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactoryTest.java index cf41ce6d..45fb97ba 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactoryTest.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactoryTest.java @@ -16,7 +16,17 @@ package org.springframework.cloud.config.server.ssh; -import com.jcraft.jsch.*; +import static org.mockito.Matchers.isNull; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.Map; + import org.eclipse.jgit.transport.OpenSshConfig.Host; import org.junit.Assert; import org.junit.Test; @@ -27,16 +37,11 @@ import org.mockito.runners.MockitoJUnitRunner; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.HashMap; -import java.util.Map; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; +import com.jcraft.jsch.HostKey; +import com.jcraft.jsch.HostKeyRepository; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; +import com.jcraft.jsch.UserInfo; /** * Unit tests for property based SSH config processor @@ -127,7 +132,7 @@ public class PropertyBasedSshSessionFactoryTest { factory.createSession(hc, null, SshUriPropertyProcessor.getHostname(sshKey.getUri()), 22, null); ArgumentCaptor captor = ArgumentCaptor.forClass(HostKey.class); - verify(hostKeyRepository).add(captor.capture(), any(UserInfo.class)); + verify(hostKeyRepository).add(captor.capture(), isNull(UserInfo.class)); HostKey hostKey = captor.getValue(); Assert.assertEquals("gitlab.example.local", hostKey.getHost()); Assert.assertEquals(HOST_KEY, hostKey.getKey()); From d52715c06121ecc80e8d383db1bc5d89399f3f68 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 20 Jul 2017 10:52:01 -0600 Subject: [PATCH 2/4] Update SNAPSHOT to 1.3.2.RELEASE --- docs/pom.xml | 2 +- pom.xml | 4 ++-- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 4 ++-- spring-cloud-config-monitor/pom.xml | 4 ++-- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index abc036ed..94df5dee 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE .. diff --git a/pom.xml b/pom.xml index 866033d2..9df51fe4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE pom Spring Cloud Config Spring Cloud Config @@ -22,7 +22,7 @@ config - 1.2.1.BUILD-SNAPSHOT + 1.2.3.RELEASE spring-cloud-config-dependencies diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 7151af7a..fa5a9b8c 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 812bba71..544504a6 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.3.2.RELEASE + 1.3.3.RELEASE spring-cloud-config-dependencies - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 35a06878..730a5cf8 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE .. spring-cloud-config-monitor @@ -13,7 +13,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 1.3.1.BUILD-SNAPSHOT + 1.3.1.RELEASE diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index ca14f67b..9be491a2 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 4482de8a..94a3dc7d 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 55800605..f148c52f 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -5,10 +5,10 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE spring-cloud-starter-config - 1.3.2.BUILD-SNAPSHOT + 1.3.2.RELEASE spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From 00e08f99b3adf6fb7246ec9dcc354a671b621591 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 20 Jul 2017 11:03:29 -0600 Subject: [PATCH 3/4] Going back to snapshots --- docs/pom.xml | 2 +- pom.xml | 4 ++-- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 4 ++-- spring-cloud-config-monitor/pom.xml | 4 ++-- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 94df5dee..abc036ed 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 9df51fe4..866033d2 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config @@ -22,7 +22,7 @@ config - 1.2.3.RELEASE + 1.2.1.BUILD-SNAPSHOT spring-cloud-config-dependencies diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index fa5a9b8c..7151af7a 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 544504a6..812bba71 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.3.3.RELEASE + 1.3.2.RELEASE spring-cloud-config-dependencies - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 730a5cf8..35a06878 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT .. spring-cloud-config-monitor @@ -13,7 +13,7 @@ Spring Cloud Config Monitor ${basedir}/../.. - 1.3.1.RELEASE + 1.3.1.BUILD-SNAPSHOT diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index 9be491a2..ca14f67b 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 94a3dc7d..4482de8a 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index f148c52f..55800605 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -5,10 +5,10 @@ org.springframework.cloud spring-cloud-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT spring-cloud-starter-config - 1.3.2.RELEASE + 1.3.2.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud From ebbe75d6aab1fa7f9dadebf3bfa45b27524a90c3 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 20 Jul 2017 11:03:30 -0600 Subject: [PATCH 4/4] Bumping versions to 1.3.3.BUILD-SNAPSHOT after release --- docs/pom.xml | 2 +- pom.xml | 2 +- spring-cloud-config-client/pom.xml | 2 +- spring-cloud-config-dependencies/pom.xml | 2 +- spring-cloud-config-monitor/pom.xml | 2 +- spring-cloud-config-sample/pom.xml | 2 +- spring-cloud-config-server/pom.xml | 2 +- spring-cloud-starter-config/pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index abc036ed..7f6f0a2a 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT .. diff --git a/pom.xml b/pom.xml index 866033d2..9737cf89 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT pom Spring Cloud Config Spring Cloud Config diff --git a/spring-cloud-config-client/pom.xml b/spring-cloud-config-client/pom.xml index 7151af7a..686f090f 100644 --- a/spring-cloud-config-client/pom.xml +++ b/spring-cloud-config-client/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-dependencies/pom.xml b/spring-cloud-config-dependencies/pom.xml index 812bba71..5f428051 100644 --- a/spring-cloud-config-dependencies/pom.xml +++ b/spring-cloud-config-dependencies/pom.xml @@ -9,7 +9,7 @@ spring-cloud-config-dependencies - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT pom spring-cloud-config-dependencies Spring Cloud Config Dependencies diff --git a/spring-cloud-config-monitor/pom.xml b/spring-cloud-config-monitor/pom.xml index 35a06878..33635942 100644 --- a/spring-cloud-config-monitor/pom.xml +++ b/spring-cloud-config-monitor/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT .. spring-cloud-config-monitor diff --git a/spring-cloud-config-sample/pom.xml b/spring-cloud-config-sample/pom.xml index ca14f67b..871e07a3 100644 --- a/spring-cloud-config-sample/pom.xml +++ b/spring-cloud-config-sample/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-config-server/pom.xml b/spring-cloud-config-server/pom.xml index 4482de8a..b9e1d68c 100644 --- a/spring-cloud-config-server/pom.xml +++ b/spring-cloud-config-server/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-config/pom.xml b/spring-cloud-starter-config/pom.xml index 55800605..a7da2753 100644 --- a/spring-cloud-starter-config/pom.xml +++ b/spring-cloud-starter-config/pom.xml @@ -5,10 +5,10 @@ org.springframework.cloud spring-cloud-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT spring-cloud-starter-config - 1.3.2.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT spring-cloud-starter-config Spring Cloud Starter https://projects.spring.io/spring-cloud