Use HTTPS for external links wherever possible

See gh-16276
This commit is contained in:
Spring Operator
2019-03-20 17:06:39 -05:00
committed by Andy Wilkinson
parent 878a635bfb
commit fb242c27d2
14 changed files with 31 additions and 31 deletions

View File

@@ -72,19 +72,19 @@ public class InitCommandTests extends AbstractHttpClientMockTests {
@Test
public void listServiceCapabilitiesText() throws Exception {
mockSuccessfulMetadataTextGet();
this.command.run("--list", "--target=http://fake-service");
this.command.run("--list", "--target=https://fake-service");
}
@Test
public void listServiceCapabilities() throws Exception {
mockSuccessfulMetadataGet(true);
this.command.run("--list", "--target=http://fake-service");
this.command.run("--list", "--target=https://fake-service");
}
@Test
public void listServiceCapabilitiesV2() throws Exception {
mockSuccessfulMetadataGetV2(true);
this.command.run("--list", "--target=http://fake-service");
this.command.run("--list", "--target=https://fake-service");
}
@Test
@@ -357,7 +357,7 @@ public class InitCommandTests extends AbstractHttpClientMockTests {
@Test
public void userAgent() throws Exception {
this.command.run("--list", "--target=http://fake-service");
this.command.run("--list", "--target=https://fake-service");
verify(this.http).execute(this.requestCaptor.capture());
Header agent = this.requestCaptor.getValue().getHeaders("User-Agent")[0];
assertThat(agent.getValue()).startsWith("SpringBootCli/");

View File

@@ -38,7 +38,7 @@ public class InitializrServiceTests extends AbstractHttpClientMockTests {
@Test
public void loadMetadata() throws Exception {
mockSuccessfulMetadataGet(false);
InitializrServiceMetadata metadata = this.invoker.loadMetadata("http://foo/bar");
InitializrServiceMetadata metadata = this.invoker.loadMetadata("https://foo/bar");
assertThat(metadata).isNotNull();
}

View File

@@ -54,7 +54,7 @@ public class ProjectGenerationRequestTests {
@Test
public void customServer() throws URISyntaxException {
String customServerUrl = "http://foo:8080/initializr";
String customServerUrl = "https://foo:8080/initializr";
this.request.setServiceUrl(customServerUrl);
this.request.getDependencies().add("security");
assertThat(this.request.generateUrl(createDefaultMetadata())).isEqualTo(new URI(