@@ -0,0 +1,3457 @@
+/*%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.trino.plugin.hive.containers;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.ImmutableSet;%0Aimport com.google.common.net.HostAndPort;%0Aimport io.airlift.log.Logger;%0Aimport io.trino.testing.containers.BaseTestContainer;%0Aimport org.testcontainers.containers.Network;%0A%0Aimport java.util.Map;%0Aimport java.util.Optional;%0Aimport java.util.Set;%0A%0Aimport static java.lang.String.format;%0A%0Apublic class Minio%0A        extends BaseTestContainer%0A%7B%0A    private static final Logger log = Logger.get(Minio.class);%0A%0A    public static final String DEFAULT_IMAGE = %22minio/minio:RELEASE.2021-07-15T22-27-34Z%22;%0A    public static final String DEFAULT_HOST_NAME = %22minio%22;%0A%0A    public static final int MINIO_API_PORT = 4566;%0A    public static final int MINIO_CONSOLE_PORT = 4567;%0A%0A    public static Builder builder()%0A    %7B%0A        return new Builder();%0A    %7D%0A%0A    private Minio(%0A            String image,%0A            String hostName,%0A            Set%3CInteger%3E exposePorts,%0A            Map%3CString, String%3E filesToMount,%0A            Map%3CString, String%3E envVars,%0A            Optional%3CNetwork%3E network,%0A            int retryLimit)%0A    %7B%0A        super(%0A                image,%0A                hostName,%0A                exposePorts,%0A                filesToMount,%0A                envVars,%0A                network,%0A                retryLimit);%0A    %7D%0A%0A    @Override%0A    protected void setupContainer()%0A    %7B%0A        super.setupContainer();%0A        withRunCommand(%0A                ImmutableList.of(%0A                        %22server%22,%0A                        %22--address%22, %220.0.0.0:%22 + MINIO_API_PORT,%0A                        %22--console-address%22, %220.0.0.0:%22 + MINIO_CONSOLE_PORT,%0A                        %22/data%22));%0A    %7D%0A%0A    @Override%0A    protected void startContainer()%0A    %7B%0A        super.startContainer();%0A        log.info(format(%0A                %22MinIO container started with address for api: http://%25s and console: http://%25s%22,%0A                getMinioApiEndpoint().toString(),%0A                getMinioConsoleEndpoint().toString()));%0A    %7D%0A%0A    public HostAndPort getMinioApiEndpoint()%0A    %7B%0A        return getMappedHostAndPortForExposedPort(MINIO_API_PORT);%0A    %7D%0A%0A    public HostAndPort getMinioConsoleEndpoint()%0A    %7B%0A        return getMappedHostAndPortForExposedPort(MINIO_CONSOLE_PORT);%0A    %7D%0A%0A    public static class Builder%0A            extends BaseTestContainer.Builder%3CMinio.Builder, Minio%3E%0A    %7B%0A        private Builder()%0A        %7B%0A            this.image = DEFAULT_IMAGE;%0A            this.hostName = DEFAULT_HOST_NAME;%0A            this.exposePorts =%0A                    ImmutableSet.of(%0A                            MINIO_API_PORT,%0A                            MINIO_CONSOLE_PORT);%0A        %7D%0A%0A        @Override%0A        public Minio build()%0A        %7B%0A            return new Minio(image, hostName, exposePorts, filesToMount, envVars, network, startupRetryLimit);%0A        %7D%0A    %7D%0A%7D%0A

Add MinIo test container