Merge branch '2.3.x'
Closes gh-22304
This commit is contained in:
@@ -50,6 +50,15 @@ class HttpTransportTests {
|
||||
assertThat(transport).isInstanceOf(LocalHttpClientTransport.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenDockerHostVariableIsUnixSchemePrefixedFileReturnsLocal(@TempDir Path tempDir) throws IOException {
|
||||
String dummySocketFilePath = "unix://"
|
||||
+ Files.createTempFile(tempDir, "http-transport", null).toAbsolutePath().toString();
|
||||
Map<String, String> environment = Collections.singletonMap("DOCKER_HOST", dummySocketFilePath);
|
||||
HttpTransport transport = HttpTransport.create(environment::get);
|
||||
assertThat(transport).isInstanceOf(LocalHttpClientTransport.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWhenDoesNotHaveDockerHostVariableReturnsLocal() {
|
||||
HttpTransport transport = HttpTransport.create((name) -> null);
|
||||
|
||||
Reference in New Issue
Block a user