Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ private String verifyAndFetchHost(String host) {
+ host
+ ". Please verify that the specified host follows the 'https://${service}.${universeDomain}/' format");
}
return url.getProtocol() + "://" + url.getHost() + "/";
return url.getProtocol() + "://" + url.getAuthority() + "/";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ void testHost() {
});
}

@Test
void testHostWithPort() {
this.contextRunner
.withPropertyValues("spring.cloud.gcp.storage.host=http://localhost:54321")
.run(
context -> {
Storage storage = context.getBean("storage", Storage.class);
assertThat(storage.getOptions().getHost()).isEqualTo("http://localhost:54321/");
});
}

@Test
void testUniverseDomainAndHostSet() {
this.contextRunner
Expand Down