diff --git a/testing/s3minio/src/main/java/org/projectnessie/minio/MinioContainer.java b/testing/s3minio/src/main/java/org/projectnessie/minio/MinioContainer.java index 348029bdc0b..54be92842f0 100644 --- a/testing/s3minio/src/main/java/org/projectnessie/minio/MinioContainer.java +++ b/testing/s3minio/src/main/java/org/projectnessie/minio/MinioContainer.java @@ -47,6 +47,7 @@ final class MinioContainer extends GenericContainer private static final String DEFAULT_STORAGE_DIRECTORY = "/data"; private static final String HEALTH_ENDPOINT = "/minio/health/ready"; + private static final String MINIO_DOMAIN_NIP = "minio.127-0-0-1.nip.io"; private final String accessKey; private final String secretKey; @@ -74,7 +75,7 @@ public MinioContainer(String image, String accessKey, String secretKey, String b withEnv(MINIO_ACCESS_KEY, this.accessKey); withEnv(MINIO_SECRET_KEY, this.secretKey); // S3 SDK encodes bucket names in host names - need to tell Minio which domain to use - withEnv(MINIO_DOMAIN, "localhost"); + withEnv(MINIO_DOMAIN, MINIO_DOMAIN_NIP); withCommand("server", DEFAULT_STORAGE_DIRECTORY); setWaitStrategy( new HttpWaitStrategy() @@ -149,7 +150,7 @@ public URI s3BucketUri(String path) { public void start() { super.start(); - this.hostPort = getHost() + ":" + getMappedPort(DEFAULT_PORT); + this.hostPort = MINIO_DOMAIN_NIP + ":" + getMappedPort(DEFAULT_PORT); this.s3endpoint = String.format("http://%s/", hostPort); this.bucketBaseUri = URI.create(String.format("s3://%s/", bucket())); diff --git a/testing/s3minio/src/main/java/org/projectnessie/minio/MinioExtension.java b/testing/s3minio/src/main/java/org/projectnessie/minio/MinioExtension.java index 602fa0fe7b2..f552b0b87c5 100644 --- a/testing/s3minio/src/main/java/org/projectnessie/minio/MinioExtension.java +++ b/testing/s3minio/src/main/java/org/projectnessie/minio/MinioExtension.java @@ -55,10 +55,7 @@ public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext con // Disable tests on GitHub Actions return enabled("Running on macOS locally"); } - return disabled( - format( - "Disabled on %s, because it doesn't support wildcard localhost FQDNs.", - OS.current().name())); + return disabled(format("Disabled on %s", OS.current().name())); } @Override