Bumping versions

This commit is contained in:
buildmaster
2023-06-17 00:27:07 +00:00
parent 640d6d3fa8
commit 5bfc1577ba
4 changed files with 31 additions and 27 deletions

View File

@@ -8,7 +8,7 @@
|spring.cloud.config.fail-fast | `+++false+++` | Flag to indicate that failure to connect to the server is fatal (default false).
|spring.cloud.config.headers | | Additional headers used to create the client request.
|spring.cloud.config.initialize-on-context-refresh | `+++false+++` | Flag to initialize bootstrap configuration on context refresh event. Default false.
|spring.cloud.config.label | | The label name to use to pull remote configuration properties. The default is set on the server (generally "master" for a git based server).
|spring.cloud.config.label | | The label name to use to pull remote configuration properties. The default is set on the server (generally "main" for a git based server).
|spring.cloud.config.media-type | | The Accept header media type to send to config server.
|spring.cloud.config.name | | Name of application used to fetch remote properties.
|spring.cloud.config.override-none | `+++false+++` | Flag to indicate that when {@link #setAllowOverride(boolean) allowOverride} is true, external properties should take lowest priority and should not override any existing property sources (including local config files). Default false.

View File

@@ -165,7 +165,8 @@ public class ConfigServerConfigDataLoader implements ConfigDataLoader<ConfigServ
// , is used as a profile-separator for property sources
// from vault
// - is the default profile-separator for property sources
// TODO This is error prone logic see https://github.com/spring-cloud/spring-cloud-config/issues/2291
// TODO This is error prone logic see
// https://github.com/spring-cloud/spring-cloud-config/issues/2291
if (propertySourceName.matches(".*[-,]" + profile + ".*")) {
// // TODO: switch to Options.with() when implemented
options.add(Option.PROFILE_SPECIFIC);

View File

@@ -69,7 +69,8 @@ class ConfigServerConfigDataLoaderTests {
@Disabled
@Test
// TODO Enable once we have https://github.com/spring-cloud/spring-cloud-config/issues/2291
// TODO Enable once we have
// https://github.com/spring-cloud/spring-cloud-config/issues/2291
void filterPropertySourcesThatAreNotProfileSpecific() {
PropertySource p1 = new PropertySource("p1", Collections.singletonMap("foo", "bar"));
PropertySource p2 = new PropertySource("p2", Collections.singletonMap("hello", "world"));
@@ -80,7 +81,8 @@ class ConfigServerConfigDataLoaderTests {
@Disabled
@Test
// TODO Enable once we have https://github.com/spring-cloud/spring-cloud-config/issues/2291
// TODO Enable once we have
// https://github.com/spring-cloud/spring-cloud-config/issues/2291
void returnPropertySourcesThatAreProfileSpecific() {
PropertySource p1 = new PropertySource("p1-dev", Collections.singletonMap("foo", "bar"));
PropertySource p2 = new PropertySource("p2-dev", Collections.singletonMap("hello", "world"));
@@ -96,42 +98,43 @@ class ConfigServerConfigDataLoaderTests {
@Disabled
@Test
// TODO Enable once we have https://github.com/spring-cloud/spring-cloud-config/issues/2291
// TODO Enable once we have
// https://github.com/spring-cloud/spring-cloud-config/issues/2291
void filterPropertySourcesWithDocuments() {
PropertySource p1 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/application.yml",
Collections.singletonMap("foo", "bar"));
"configserver:git@github.com:demo/support-configuration-repo.git/application.yml",
Collections.singletonMap("foo", "bar"));
PropertySource p2 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/application-foo.yml",
Collections.singletonMap("foo", "bar"));
"configserver:git@github.com:demo/support-configuration-repo.git/application-foo.yml",
Collections.singletonMap("foo", "bar"));
PropertySource p3 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
PropertySource p4 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.properties' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.properties' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
Map<String, Object> activatesOnProfileCamelCase = new HashMap<>();
activatesOnProfileCamelCase.put("spring.config.activate.onProfile", "foo");
PropertySource p5 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #1)",
activatesOnProfileCamelCase);
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #1)",
activatesOnProfileCamelCase);
Map<String, Object> activatesOnProfile = new HashMap<>();
activatesOnProfile.put("spring.config.activate.on-profile", "foo");
PropertySource p6 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #2)",
activatesOnProfile);
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application.properties' via location 'commons/' (document #2)",
activatesOnProfile);
PropertySource p7 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/application-foo.yaml",
Collections.singletonMap("hello", "world"));
"configserver:git@github.com:demo/support-configuration-repo.git/application-foo.yaml",
Collections.singletonMap("hello", "world"));
PropertySource p8 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.yaml' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.yaml' via location 'commons/' (document #0)",
Collections.singletonMap("hello", "world"));
PropertySource p9 = new PropertySource(
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.yaml' via location 'commons/' (document #1)",
Collections.singletonMap("hello", "world"));
"configserver:git@github.com:demo/support-configuration-repo.git/Config resource 'file [/var/folders/k3/zv8hzdm17vv69j485fv3cf9r0000gp/T/config-repo-14772121892716396795/commons/application-foo.yaml' via location 'commons/' (document #1)",
Collections.singletonMap("hello", "world"));
ConfigData configData = setupConfigServerConfigDataLoader(Arrays.asList(p1, p2, p3, p4, p5, p6, p7, p8, p9),
"application-slash", "foo");
"application-slash", "foo");
assertThat(configData.getPropertySources().size()).isEqualTo(7);
}

View File

@@ -50,7 +50,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.verify;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
@SpringBootTest(classes = HttpClientSupportTest.TestConfiguration.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class HttpClientSupportTest {
@LocalServerPort
@@ -71,7 +71,7 @@ public class HttpClientSupportTest {
@EnabledOnJre(JRE.JAVA_8)
public void httpsProxy() throws GeneralSecurityException, IOException {
WireMockServer wireMockProxyServer = new WireMockServer(
options().httpDisabled(true).dynamicHttpsPort().enableBrowserProxying(true).trustAllProxyTargets(true));
options().httpDisabled(true).dynamicHttpsPort().enableBrowserProxying(true).trustAllProxyTargets(true));
WireMockServer wireMockServer = new WireMockServer(options().httpDisabled(true).dynamicHttpsPort());
wireMockProxyServer.start();
wireMockServer.start();
@@ -91,7 +91,7 @@ public class HttpClientSupportTest {
try {
httpClient = HttpClientSupport.builder(properties).build();
response = httpClient
.execute(new HttpGet("https://localhost:" + wireMockServer.httpsPort() + "/test/proxy"));
.execute(new HttpGet("https://localhost:" + wireMockServer.httpsPort() + "/test/proxy"));
}
finally {
if (response != null) {