Skip to content

Commit 20f1f46

Browse files
committed
URL Cleanup - Fix broken tests
See gh-22669
1 parent c51a257 commit 20f1f46

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.
@@ -920,14 +920,14 @@ public void testCors() throws Exception {
920920
assertEquals(2, configs.size());
921921
CorsConfiguration config = configs.get("/api/**");
922922
assertNotNull(config);
923-
assertArrayEquals(new String[]{"http://domain1.com", "http://domain2.com"}, config.getAllowedOrigins().toArray());
923+
assertArrayEquals(new String[]{"https://domain1.com", "https://domain2.com"}, config.getAllowedOrigins().toArray());
924924
assertArrayEquals(new String[]{"GET", "PUT"}, config.getAllowedMethods().toArray());
925925
assertArrayEquals(new String[]{"header1", "header2", "header3"}, config.getAllowedHeaders().toArray());
926926
assertArrayEquals(new String[]{"header1", "header2"}, config.getExposedHeaders().toArray());
927927
assertFalse(config.getAllowCredentials());
928928
assertEquals(Long.valueOf(123), config.getMaxAge());
929929
config = configs.get("/resources/**");
930-
assertArrayEquals(new String[]{"http://domain1.com"}, config.getAllowedOrigins().toArray());
930+
assertArrayEquals(new String[]{"https://domain1.com"}, config.getAllowedOrigins().toArray());
931931
assertArrayEquals(new String[]{"GET", "HEAD", "POST"}, config.getAllowedMethods().toArray());
932932
assertArrayEquals(new String[]{"*"}, config.getAllowedHeaders().toArray());
933933
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-2018 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.
@@ -224,8 +224,8 @@ public void sockJsAttributes() {
224224
List<HandshakeInterceptor> interceptors = transportService.getHandshakeInterceptors();
225225
assertThat(interceptors, contains(instanceOf(OriginHandshakeInterceptor.class)));
226226
assertTrue(transportService.shouldSuppressCors());
227-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain1.com"));
228-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain2.com"));
227+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain1.com"));
228+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain2.com"));
229229
}
230230

231231

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
@@ -184,8 +184,8 @@ public void simpleBroker() throws Exception {
184184
interceptors = defaultSockJsService.getHandshakeInterceptors();
185185
assertThat(interceptors, contains(instanceOf(FooTestInterceptor.class),
186186
instanceOf(BarTestInterceptor.class), instanceOf(OriginHandshakeInterceptor.class)));
187-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain3.com"));
188-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain4.com"));
187+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain3.com"));
188+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain4.com"));
189189

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

0 commit comments

Comments
 (0)