Skip to content

Commit 949f674

Browse files
committed
URL Cleanup - Fix broken tests
See gh-22672
1 parent 52650d0 commit 949f674

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.
@@ -73,7 +73,7 @@ public void read() throws IOException {
7373
inputMessage.getHeaders().setContentType(new MediaType("application", "rss+xml", UTF_8));
7474
Channel result = converter.read(Channel.class, inputMessage);
7575
assertEquals("title", result.getTitle());
76-
assertEquals("http://example.com", result.getLink());
76+
assertEquals("https://example.com", result.getLink());
7777
assertEquals("description", result.getDescription());
7878

7979
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.
@@ -947,14 +947,14 @@ public void testCors() throws Exception {
947947
assertEquals(2, configs.size());
948948
CorsConfiguration config = configs.get("/api/**");
949949
assertNotNull(config);
950-
assertArrayEquals(new String[]{"http://domain1.com", "http://domain2.com"}, config.getAllowedOrigins().toArray());
950+
assertArrayEquals(new String[]{"https://domain1.com", "https://domain2.com"}, config.getAllowedOrigins().toArray());
951951
assertArrayEquals(new String[]{"GET", "PUT"}, config.getAllowedMethods().toArray());
952952
assertArrayEquals(new String[]{"header1", "header2", "header3"}, config.getAllowedHeaders().toArray());
953953
assertArrayEquals(new String[]{"header1", "header2"}, config.getExposedHeaders().toArray());
954954
assertFalse(config.getAllowCredentials());
955955
assertEquals(Long.valueOf(123), config.getMaxAge());
956956
config = configs.get("/resources/**");
957-
assertArrayEquals(new String[]{"http://domain1.com"}, config.getAllowedOrigins().toArray());
957+
assertArrayEquals(new String[]{"https://domain1.com"}, config.getAllowedOrigins().toArray());
958958
assertArrayEquals(new String[]{"GET", "HEAD", "POST"}, config.getAllowedMethods().toArray());
959959
assertArrayEquals(new String[]{"*"}, config.getAllowedHeaders().toArray());
960960
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.
@@ -227,8 +227,8 @@ public void sockJsAttributes() {
227227
List<HandshakeInterceptor> interceptors = transportService.getHandshakeInterceptors();
228228
assertThat(interceptors, contains(instanceOf(OriginHandshakeInterceptor.class)));
229229
assertTrue(transportService.shouldSuppressCors());
230-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain1.com"));
231-
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain2.com"));
230+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain1.com"));
231+
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain2.com"));
232232
}
233233

234234

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
@@ -182,8 +182,8 @@ public void simpleBroker() throws Exception {
182182
interceptors = defaultSockJsService.getHandshakeInterceptors();
183183
assertThat(interceptors, contains(instanceOf(FooTestInterceptor.class),
184184
instanceOf(BarTestInterceptor.class), instanceOf(OriginHandshakeInterceptor.class)));
185-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain3.com"));
186-
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain4.com"));
185+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain3.com"));
186+
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain4.com"));
187187

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

0 commit comments

Comments
 (0)