Register JNA's native library integration in LinuxSocketDomain
See gh-19836
This commit is contained in:
parent
ef13f04938
commit
62a848f1b1
|
|
@ -22,6 +22,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.sun.jna.LastErrorException;
|
import com.sun.jna.LastErrorException;
|
||||||
|
import com.sun.jna.Native;
|
||||||
|
import com.sun.jna.Platform;
|
||||||
import com.sun.jna.Structure;
|
import com.sun.jna.Structure;
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
@ -33,6 +35,10 @@ import org.springframework.util.Assert;
|
||||||
*/
|
*/
|
||||||
class LinuxDomainSocket extends DomainSocket {
|
class LinuxDomainSocket extends DomainSocket {
|
||||||
|
|
||||||
|
static {
|
||||||
|
Native.register(Platform.C_LIBRARY_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
LinuxDomainSocket(String path) throws IOException {
|
LinuxDomainSocket(String path) throws IOException {
|
||||||
super(path);
|
super(path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@ package org.springframework.boot.cloudnativebuildpack.docker;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.condition.DisabledOnOs;
|
|
||||||
import org.junit.jupiter.api.condition.OS;
|
|
||||||
|
|
||||||
import org.springframework.boot.cloudnativebuildpack.docker.type.ImageReference;
|
import org.springframework.boot.cloudnativebuildpack.docker.type.ImageReference;
|
||||||
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
||||||
|
|
@ -31,7 +29,6 @@ import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnava
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
*/
|
*/
|
||||||
@DisabledIfDockerUnavailable
|
@DisabledIfDockerUnavailable
|
||||||
@DisabledOnOs(OS.LINUX)
|
|
||||||
class DockerApiIntegrationTests {
|
class DockerApiIntegrationTests {
|
||||||
|
|
||||||
private final DockerApi docker = new DockerApi();
|
private final DockerApi docker = new DockerApi();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue