Skip to content

Commit b7b3461

Browse files
committed
URL Cleanup - Fix broken tests
See gh-22673
1 parent 2e75aec commit b7b3461

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-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.
@@ -69,7 +69,7 @@ public void read() throws IOException {
6969
inputMessage.getHeaders().setContentType(new MediaType("application", "rss+xml", StandardCharsets.UTF_8));
7070
Channel result = converter.read(Channel.class, inputMessage);
7171
assertEquals("title", result.getTitle());
72-
assertEquals("http://example.com", result.getLink());
72+
assertEquals("https://example.com", result.getLink());
7373
assertEquals("description", result.getDescription());
7474

7575
List<?> items = result.getItems();

spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-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.
@@ -922,14 +922,14 @@ public void testCors() throws Exception {
922922
assertEquals(2, configs.size());
923923
CorsConfiguration config = configs.get("/api/**");
924924
assertNotNull(config);
925-
assertArrayEquals(new String[]{"http://domain1.com", "http://domain2.com"}, config.getAllowedOrigins().toArray());
925+
assertArrayEquals(new String[]{"https://domain1.com", "https://domain2.com"}, config.getAllowedOrigins().toArray());
926926
assertArrayEquals(new String[]{"GET", "PUT"}, config.getAllowedMethods().toArray());
927927
assertArrayEquals(new String[]{"header1", "header2", "header3"}, config.getAllowedHeaders().toArray());
928928
assertArrayEquals(new String[]{"header1", "header2"}, config.getExposedHeaders().toArray());
929929
assertFalse(config.getAllowCredentials());
930930
assertEquals(Long.valueOf(123), config.getMaxAge());
931931
config = configs.get("/resources/**");
932-
assertArrayEquals(new String[]{"http://domain1.com"}, config.getAllowedOrigins().toArray());
932+
assertArrayEquals(new String[]{"https://domain1.com"}, config.getAllowedOrigins().toArray());
933933
assertArrayEquals(new String[]{"GET", "HEAD", "POST"}, config.getAllowedMethods().toArray());
934934
assertArrayEquals(new String[]{"*"}, config.getAllowedHeaders().toArray());
935935
assertNull(config.getExposedHeaders());

spring-websocket/src/test/java/org/springframework/web/socket/config/HandlersBeanDefinitionParserTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-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.
@@ -228,8 +228,8 @@ public void sockJsAttributes() {
228228
List<HandshakeInterceptor> interceptors = transportService.getHandshakeInterceptors();
229229
assertThat(interceptors, contains(instanceOf(OriginHandshakeInterceptor.class)));
230230
assertTrue(transportService.shouldSuppressCors());
231-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain1.com"));
232-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain2.com"));
231+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain1.com"));
232+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain2.com"));
233233
}
234234

235235

spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ public void simpleBroker() throws Exception {
183183
interceptors = defaultSockJsService.getHandshakeInterceptors();
184184
assertThat(interceptors, contains(instanceOf(FooTestInterceptor.class),
185185
instanceOf(BarTestInterceptor.class), instanceOf(OriginHandshakeInterceptor.class)));
186-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain3.com"));
187-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain4.com"));
186+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain3.com"));
187+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain4.com"));
188188

189189
SimpUserRegistry userRegistry = this.appContext.getBean(SimpUserRegistry.class);
190190
assertNotNull(userRegistry);

0 commit comments

Comments
 (0)