Skip to content

Commit 864942a

Browse files
committed
Merge branch '2.0.x' into 2.1.x
2 parents f417fa5 + 7f69e41 commit 864942a

File tree

124 files changed

+412
-411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+412
-411
lines changed

CODE_OF_CONDUCT.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ appropriate to the circumstances. Maintainers are obligated to maintain confiden
4040
with regard to the reporter of an incident.
4141

4242
This Code of Conduct is adapted from the
43-
http://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
44-
http://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]
43+
https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
44+
https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]

CONTRIBUTING.adoc

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ added after the original pull request but before a merge.
6666
* A few unit tests would help a lot as well -- someone has to do it.
6767
* If no-one else is using your branch, please rebase it against the current master (or
6868
other target branch in the main project).
69-
* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
69+
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
7070
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
7171
message (where `XXXX` is the issue number).
7272

@@ -75,15 +75,15 @@ added after the original pull request but before a merge.
7575
== Working with the Code
7676
If you don't have an IDE preference we would recommend that you use
7777
https://spring.io/tools/sts[Spring Tools Suite] or
78-
http://eclipse.org[Eclipse] when working with the code. We use the
79-
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin for maven support. Other IDEs and tools
78+
https://eclipse.org[Eclipse] when working with the code. We use the
79+
https://eclipse.org/m2e/[M2Eclipse] eclipse plugin for maven support. Other IDEs and tools
8080
should also work without issue.
8181

8282

8383

8484
=== Building from Source
85-
Spring Boot source can be build from the command line using
86-
http://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 1.8 or above.
85+
Spring Boot source can be built from the command line using
86+
https://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 1.8 or above.
8787
We include '`Maven Wrapper`' scripts (`./mvnw` or `mvnw.bat`) that you can run rather
8888
than needing to install Maven locally.
8989

@@ -148,7 +148,7 @@ Spring Boot includes a `.setup` files which can be used with the Eclipse Install
148148
provision a new environment. To use the installer:
149149

150150
* Download and run the latest Eclipse Installer from
151-
http://www.eclipse.org/downloads/[eclipse.org/downloads/] (under "Get Eclipse").
151+
https://www.eclipse.org/downloads/[eclipse.org/downloads/] (under "Get Eclipse").
152152
* Switch to "Advanced Mode" using the drop down menu on the right.
153153
* Select "`Eclipse IDE for Java Developers`" under "`Eclipse.org`" as the product to
154154
install and click "`next`".
@@ -170,7 +170,7 @@ easier to navigate.
170170

171171
==== Manual Installation with M2Eclipse
172172
If you prefer to install Eclipse yourself you should use the
173-
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
173+
https://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
174174
installed it is available from the "Eclipse marketplace".
175175

176176
Spring Boot includes project specific source formatting settings, in order to have these

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/CloudFoundryWebFluxEndpointIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ public void responseToOptionsRequestIncludesCorsHeaders() {
112112
this.contextRunner.run(withWebTestClient((client) -> client.options()
113113
.uri("/cfApplication/test").accept(MediaType.APPLICATION_JSON)
114114
.header("Access-Control-Request-Method", "POST")
115-
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
115+
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
116116
.expectHeader()
117-
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
117+
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
118118
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST")));
119119
}
120120

@@ -203,7 +203,7 @@ public CloudFoundryWebFluxEndpointHandlerMapping cloudFoundryWebEndpointServletH
203203
EndpointMediaTypes endpointMediaTypes,
204204
CloudFoundrySecurityInterceptor interceptor) {
205205
CorsConfiguration corsConfiguration = new CorsConfiguration();
206-
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
206+
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
207207
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
208208
return new CloudFoundryWebFluxEndpointHandlerMapping(
209209
new EndpointMapping("/cfApplication"),

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void cloudFoundryPlatformActive() {
9999
this.contextRunner
100100
.withPropertyValues("VCAP_APPLICATION:---",
101101
"vcap.application.application_id:my-app-id",
102-
"vcap.application.cf_api:http://my-cloud-controller.com")
102+
"vcap.application.cf_api:https://my-cloud-controller.com")
103103
.run((context) -> {
104104
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
105105
context);
@@ -123,7 +123,7 @@ public void cloudfoundryapplicationProducesActuatorMediaType() {
123123
this.contextRunner
124124
.withPropertyValues("VCAP_APPLICATION:---",
125125
"vcap.application.application_id:my-app-id",
126-
"vcap.application.cf_api:http://my-cloud-controller.com")
126+
"vcap.application.cf_api:https://my-cloud-controller.com")
127127
.run((context) -> {
128128
WebTestClient webTestClient = WebTestClient
129129
.bindToApplicationContext(context).build();
@@ -137,7 +137,7 @@ public void cloudFoundryPlatformActiveSetsApplicationId() {
137137
this.contextRunner
138138
.withPropertyValues("VCAP_APPLICATION:---",
139139
"vcap.application.application_id:my-app-id",
140-
"vcap.application.cf_api:http://my-cloud-controller.com")
140+
"vcap.application.cf_api:https://my-cloud-controller.com")
141141
.run((context) -> {
142142
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
143143
context);
@@ -154,7 +154,7 @@ public void cloudFoundryPlatformActiveSetsCloudControllerUrl() {
154154
this.contextRunner
155155
.withPropertyValues("VCAP_APPLICATION:---",
156156
"vcap.application.application_id:my-app-id",
157-
"vcap.application.cf_api:http://my-cloud-controller.com")
157+
"vcap.application.cf_api:https://my-cloud-controller.com")
158158
.run((context) -> {
159159
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
160160
context);
@@ -165,7 +165,7 @@ public void cloudFoundryPlatformActiveSetsCloudControllerUrl() {
165165
String cloudControllerUrl = (String) ReflectionTestUtils
166166
.getField(interceptorSecurityService, "cloudControllerUrl");
167167
assertThat(cloudControllerUrl)
168-
.isEqualTo("http://my-cloud-controller.com");
168+
.isEqualTo("https://my-cloud-controller.com");
169169
});
170170
}
171171

@@ -190,7 +190,7 @@ public void cloudFoundryPathsIgnoredBySpringSecurity() {
190190
this.contextRunner
191191
.withPropertyValues("VCAP_APPLICATION:---",
192192
"vcap.application.application_id:my-app-id",
193-
"vcap.application.cf_api:http://my-cloud-controller.com")
193+
"vcap.application.cf_api:https://my-cloud-controller.com")
194194
.run((context) -> {
195195
WebFilterChainProxy chainProxy = context
196196
.getBean(WebFilterChainProxy.class);
@@ -237,7 +237,7 @@ public void allEndpointsAvailableUnderCloudFoundryWithoutEnablingWebIncludes() {
237237
this.contextRunner.withUserConfiguration(TestConfiguration.class)
238238
.withPropertyValues("VCAP_APPLICATION:---",
239239
"vcap.application.application_id:my-app-id",
240-
"vcap.application.cf_api:http://my-cloud-controller.com")
240+
"vcap.application.cf_api:https://my-cloud-controller.com")
241241
.run((context) -> {
242242
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
243243
context);
@@ -255,7 +255,7 @@ public void endpointPathCustomizationIsNotApplied() {
255255
this.contextRunner.withUserConfiguration(TestConfiguration.class)
256256
.withPropertyValues("VCAP_APPLICATION:---",
257257
"vcap.application.application_id:my-app-id",
258-
"vcap.application.cf_api:http://my-cloud-controller.com")
258+
"vcap.application.cf_api:https://my-cloud-controller.com")
259259
.run((context) -> {
260260
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
261261
context);
@@ -279,7 +279,7 @@ public void healthEndpointInvokerShouldBeCloudFoundryWebExtension() {
279279
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
280280
.withPropertyValues("VCAP_APPLICATION:---",
281281
"vcap.application.application_id:my-app-id",
282-
"vcap.application.cf_api:http://my-cloud-controller.com")
282+
"vcap.application.cf_api:https://my-cloud-controller.com")
283283
.run((context) -> {
284284
Collection<ExposableWebEndpoint> endpoints = getHandlerMapping(
285285
context).getEndpoints();
@@ -302,7 +302,7 @@ public void skipSslValidation() {
302302
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
303303
.withPropertyValues("VCAP_APPLICATION:---",
304304
"vcap.application.application_id:my-app-id",
305-
"vcap.application.cf_api:http://my-cloud-controller.com",
305+
"vcap.application.cf_api:https://my-cloud-controller.com",
306306
"management.cloudfoundry.skip-ssl-validation:true")
307307
.run((context) -> {
308308
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
@@ -325,7 +325,7 @@ public void sslValidationNotSkippedByDefault() {
325325
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
326326
.withPropertyValues("VCAP_APPLICATION:---",
327327
"vcap.application.application_id:my-app-id",
328-
"vcap.application.cf_api:http://my-cloud-controller.com")
328+
"vcap.application.cf_api:https://my-cloud-controller.com")
329329
.run((context) -> {
330330
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
331331
context);

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityInterceptorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void setup() {
6161
@Test
6262
public void preHandleWhenRequestIsPreFlightShouldBeOk() {
6363
MockServerWebExchange request = MockServerWebExchange.from(MockServerHttpRequest
64-
.options("/a").header(HttpHeaders.ORIGIN, "http://example.com")
64+
.options("/a").header(HttpHeaders.ORIGIN, "https://example.com")
6565
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET").build());
6666
StepVerifier.create(this.interceptor.preHandle(request, "/a")).consumeNextWith(
6767
(response) -> assertThat(response.getStatus()).isEqualTo(HttpStatus.OK))

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityServiceTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class ReactiveCloudFoundrySecurityServiceTests {
4646
private static final String CLOUD_CONTROLLER_PERMISSIONS = CLOUD_CONTROLLER
4747
+ "/v2/apps/my-app-id/permissions";
4848

49-
private static final String UAA_URL = "http://my-cloud-controller.com/uaa";
49+
private static final String UAA_URL = "https://my-cloud-controller.com/uaa";
5050

5151
private ReactiveCloudFoundrySecurityService securityService;
5252

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveTokenValidatorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public void validateTokenWhenExpiredShouldThrowException() throws Exception {
255255
public void validateTokenWhenIssuerIsNotValidShouldThrowException() throws Exception {
256256
given(this.securityService.fetchTokenKeys()).willReturn(Mono.just(VALID_KEYS));
257257
given(this.securityService.getUaaUrl())
258-
.willReturn(Mono.just("http://other-uaa.com"));
258+
.willReturn(Mono.just("https://other-uaa.com"));
259259
String header = "{ \"alg\": \"RS256\", \"kid\": \"valid-key\", \"typ\": \"JWT\", \"scope\": [\"actuator.read\"]}";
260260
String claims = "{ \"exp\": 2147483647, \"iss\": \"http://localhost:8080/uaa/oauth/token\", \"scope\": [\"foo.bar\"]}";
261261
StepVerifier

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryActuatorAutoConfigurationTests.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void cloudFoundryPlatformActive() {
8585
this.contextRunner
8686
.withPropertyValues("VCAP_APPLICATION:---",
8787
"vcap.application.application_id:my-app-id",
88-
"vcap.application.cf_api:http://my-cloud-controller.com")
88+
"vcap.application.cf_api:https://my-cloud-controller.com")
8989
.run((context) -> {
9090
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
9191
context);
@@ -109,7 +109,7 @@ public void cloudfoundryapplicationProducesActuatorMediaType() throws Exception
109109
this.contextRunner
110110
.withPropertyValues("VCAP_APPLICATION:---",
111111
"vcap.application.application_id:my-app-id",
112-
"vcap.application.cf_api:http://my-cloud-controller.com")
112+
"vcap.application.cf_api:https://my-cloud-controller.com")
113113
.run((context) -> {
114114
MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(context).build();
115115
mockMvc.perform(get("/cloudfoundryapplication"))
@@ -123,7 +123,7 @@ public void cloudFoundryPlatformActiveSetsApplicationId() {
123123
this.contextRunner
124124
.withPropertyValues("VCAP_APPLICATION:---",
125125
"vcap.application.application_id:my-app-id",
126-
"vcap.application.cf_api:http://my-cloud-controller.com")
126+
"vcap.application.cf_api:https://my-cloud-controller.com")
127127
.run((context) -> {
128128
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
129129
context);
@@ -140,7 +140,7 @@ public void cloudFoundryPlatformActiveSetsCloudControllerUrl() {
140140
this.contextRunner
141141
.withPropertyValues("VCAP_APPLICATION:---",
142142
"vcap.application.application_id:my-app-id",
143-
"vcap.application.cf_api:http://my-cloud-controller.com")
143+
"vcap.application.cf_api:https://my-cloud-controller.com")
144144
.run((context) -> {
145145
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
146146
context);
@@ -151,7 +151,7 @@ public void cloudFoundryPlatformActiveSetsCloudControllerUrl() {
151151
String cloudControllerUrl = (String) ReflectionTestUtils
152152
.getField(interceptorSecurityService, "cloudControllerUrl");
153153
assertThat(cloudControllerUrl)
154-
.isEqualTo("http://my-cloud-controller.com");
154+
.isEqualTo("https://my-cloud-controller.com");
155155
});
156156
}
157157

@@ -160,7 +160,7 @@ public void skipSslValidation() {
160160
this.contextRunner
161161
.withPropertyValues("VCAP_APPLICATION:---",
162162
"vcap.application.application_id:my-app-id",
163-
"vcap.application.cf_api:http://my-cloud-controller.com",
163+
"vcap.application.cf_api:https://my-cloud-controller.com",
164164
"management.cloudfoundry.skip-ssl-validation:true")
165165
.run((context) -> {
166166
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
@@ -230,7 +230,7 @@ public void allEndpointsAvailableUnderCloudFoundryWithoutExposeAllOnWeb() {
230230
this.contextRunner.withUserConfiguration(TestConfiguration.class)
231231
.withPropertyValues("VCAP_APPLICATION:---",
232232
"vcap.application.application_id:my-app-id",
233-
"vcap.application.cf_api:http://my-cloud-controller.com")
233+
"vcap.application.cf_api:https://my-cloud-controller.com")
234234
.run((context) -> {
235235
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
236236
context);
@@ -248,7 +248,7 @@ public void endpointPathCustomizationIsNotApplied() {
248248
this.contextRunner
249249
.withPropertyValues("VCAP_APPLICATION:---",
250250
"vcap.application.application_id:my-app-id",
251-
"vcap.application.cf_api:http://my-cloud-controller.com",
251+
"vcap.application.cf_api:https://my-cloud-controller.com",
252252
"management.endpoints.web.path-mapping.test=custom")
253253
.withUserConfiguration(TestConfiguration.class).run((context) -> {
254254
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
@@ -272,7 +272,7 @@ public void healthEndpointInvokerShouldBeCloudFoundryWebExtension() {
272272
this.contextRunner
273273
.withPropertyValues("VCAP_APPLICATION:---",
274274
"vcap.application.application_id:my-app-id",
275-
"vcap.application.cf_api:http://my-cloud-controller.com")
275+
"vcap.application.cf_api:https://my-cloud-controller.com")
276276
.withConfiguration(
277277
AutoConfigurations.of(HealthIndicatorAutoConfiguration.class,
278278
HealthEndpointAutoConfiguration.class))

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryMvcWebEndpointIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public void responseToOptionsRequestIncludesCorsHeaders() {
9797
load(TestEndpointConfiguration.class, (client) -> client.options()
9898
.uri("/cfApplication/test").accept(MediaType.APPLICATION_JSON)
9999
.header("Access-Control-Request-Method", "POST")
100-
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
100+
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
101101
.expectHeader()
102-
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
102+
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
103103
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST"));
104104
}
105105

@@ -202,7 +202,7 @@ public CloudFoundryWebEndpointServletHandlerMapping cloudFoundryWebEndpointServl
202202
EndpointMediaTypes endpointMediaTypes,
203203
CloudFoundrySecurityInterceptor interceptor) {
204204
CorsConfiguration corsConfiguration = new CorsConfiguration();
205-
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
205+
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
206206
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
207207
return new CloudFoundryWebEndpointServletHandlerMapping(
208208
new EndpointMapping("/cfApplication"),

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityInterceptorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void setup() {
6464
@Test
6565
public void preHandleWhenRequestIsPreFlightShouldReturnTrue() {
6666
this.request.setMethod("OPTIONS");
67-
this.request.addHeader(HttpHeaders.ORIGIN, "http://example.com");
67+
this.request.addHeader(HttpHeaders.ORIGIN, "https://example.com");
6868
this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET");
6969
SecurityResponse response = this.interceptor.preHandle(this.request,
7070
EndpointId.of("test"));

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityServiceTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,12 +49,12 @@
4949
*/
5050
public class CloudFoundrySecurityServiceTests {
5151

52-
private static final String CLOUD_CONTROLLER = "http://my-cloud-controller.com";
52+
private static final String CLOUD_CONTROLLER = "https://my-cloud-controller.com";
5353

5454
private static final String CLOUD_CONTROLLER_PERMISSIONS = CLOUD_CONTROLLER
5555
+ "/v2/apps/my-app-id/permissions";
5656

57-
private static final String UAA_URL = "http://my-uaa.com";
57+
private static final String UAA_URL = "https://my-uaa.com";
5858

5959
private CloudFoundrySecurityService securityService;
6060

@@ -148,7 +148,7 @@ public void getAccessLevelWhenCloudControllerIsNotReachableThrowsException() {
148148
@Test
149149
public void fetchTokenKeysWhenSuccessfulShouldReturnListOfKeysFromUAA() {
150150
this.server.expect(requestTo(CLOUD_CONTROLLER + "/info"))
151-
.andRespond(withSuccess("{\"token_endpoint\":\"http://my-uaa.com\"}",
151+
.andRespond(withSuccess("{\"token_endpoint\":\"https://my-uaa.com\"}",
152152
MediaType.APPLICATION_JSON));
153153
String tokenKeyValue = "-----BEGIN PUBLIC KEY-----\n"
154154
+ "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\n"

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/TokenValidatorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void validateTokenWhenExpiredShouldThrowException() throws Exception {
179179
@Test
180180
public void validateTokenWhenIssuerIsNotValidShouldThrowException() throws Exception {
181181
given(this.securityService.fetchTokenKeys()).willReturn(VALID_KEYS);
182-
given(this.securityService.getUaaUrl()).willReturn("http://other-uaa.com");
182+
given(this.securityService.getUaaUrl()).willReturn("https://other-uaa.com");
183183
String header = "{ \"alg\": \"RS256\", \"kid\": \"valid-key\", \"typ\": \"JWT\", \"scope\": [\"actuator.read\"]}";
184184
String claims = "{ \"exp\": 2147483647, \"iss\": \"http://localhost:8080/uaa/oauth/token\"}";
185185
assertThatExceptionOfType(CloudFoundryAuthorizationException.class)

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/LinkTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ public void createWhenHrefIsNullShouldThrowException() {
3636

3737
@Test
3838
public void getHrefShouldReturnHref() {
39-
String href = "http://example.com";
39+
String href = "https://example.com";
4040
Link link = new Link(href);
4141
assertThat(link.getHref()).isEqualTo(href);
4242
}
4343

4444
@Test
4545
public void isTemplatedWhenContainsPlaceholderShouldReturnTrue() {
46-
String href = "http://example.com/{path}";
46+
String href = "https://example.com/{path}";
4747
Link link = new Link(href);
4848
assertThat(link.isTemplated()).isTrue();
4949
}
5050

5151
@Test
5252
public void isTemplatedWhenContainsNoPlaceholderShouldReturnFalse() {
53-
String href = "http://example.com/path";
53+
String href = "https://example.com/path";
5454
Link link = new Link(href);
5555
assertThat(link.isTemplated()).isFalse();
5656
}

0 commit comments

Comments
 (0)