Merge branch '2.1.x'

This commit is contained in:
Andy Wilkinson
2019-09-02 17:22:09 +01:00
5 changed files with 22 additions and 4 deletions

View File

@@ -98,10 +98,12 @@ class ApplicationBuilder {
resourcesJarStream.putNextEntry(new ZipEntry("META-INF/resources/nested-meta-inf-resource.txt"));
resourcesJarStream.write("nested".getBytes());
resourcesJarStream.closeEntry();
resourcesJarStream.putNextEntry(
new ZipEntry("META-INF/resources/nested-reserved-!#$%&()*+,:=?@[]-meta-inf-resource.txt"));
resourcesJarStream.write("encoded-name".getBytes());
resourcesJarStream.closeEntry();
if (!isWindows()) {
resourcesJarStream.putNextEntry(
new ZipEntry("META-INF/resources/nested-reserved-!#$%&()*+,:=?@[]-meta-inf-resource.txt"));
resourcesJarStream.write("encoded-name".getBytes());
resourcesJarStream.closeEntry();
}
return resourcesJar;
}
}
@@ -162,4 +164,8 @@ class ApplicationBuilder {
assertThat(execute.getExitCode()).isEqualTo(0);
}
private boolean isWindows() {
return File.separatorChar == '\\';
}
}

View File

@@ -17,6 +17,8 @@
package org.springframework.boot.context.embedded;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -41,6 +43,7 @@ public class EmbeddedServletContainerJarDevelopmentIntegrationTests {
}
@TestTemplate
@DisabledOnOs(OS.WINDOWS)
public void metaInfResourceFromDependencyWithNameThatContainsReservedCharactersIsAvailableViaHttp(
RestTemplate rest) {
ResponseEntity<String> entity = rest.getForEntity(

View File

@@ -17,6 +17,8 @@
package org.springframework.boot.context.embedded;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -41,6 +43,7 @@ public class EmbeddedServletContainerJarPackagingIntegrationTests {
}
@TestTemplate
@DisabledOnOs(OS.WINDOWS)
public void nestedMetaInfResourceWithNameThatContainsReservedCharactersIsAvailableViaHttp(RestTemplate rest) {
ResponseEntity<String> entity = rest.getForEntity(
"/nested-reserved-%21%23%24%25%26%28%29%2A%2B%2C%3A%3D%3F%40%5B%5D-meta-inf-resource.txt",

View File

@@ -24,6 +24,8 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -48,6 +50,7 @@ public class EmbeddedServletContainerWarDevelopmentIntegrationTests {
}
@TestTemplate
@DisabledOnOs(OS.WINDOWS)
public void metaInfResourceFromDependencyWithNameThatContainsReservedCharactersIsAvailableViaHttp(
RestTemplate rest) {
ResponseEntity<String> entity = rest.getForEntity(

View File

@@ -24,6 +24,8 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -48,6 +50,7 @@ public class EmbeddedServletContainerWarPackagingIntegrationTests {
}
@TestTemplate
@DisabledOnOs(OS.WINDOWS)
public void nestedMetaInfResourceWithNameThatContainsReservedCharactersIsAvailableViaHttp(RestTemplate rest) {
ResponseEntity<String> entity = rest.getForEntity(
"/nested-reserved-%21%23%24%25%26%28%29%2A%2B%2C%3A%3D%3F%40%5B%5D-meta-inf-resource.txt",