migrate mint tests to latest versions (#9424)

This commit is contained in:
Harshavardhana 2020-04-22 16:06:58 -07:00 committed by GitHub
parent 4cd6ca02c7
commit 6817c5ea58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 57 additions and 146 deletions

View File

@ -1,17 +1,11 @@
FROM ubuntu:16.04 FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV GOROOT /usr/local/go ENV GOROOT /usr/local/go
ENV GOPATH /usr/local/gopath
ENV GOPATH /usr/local
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
ENV MINT_ROOT_DIR /mint ENV MINT_ROOT_DIR /mint
COPY mint /mint COPY mint /mint
RUN apt-get --yes update && apt-get --yes upgrade && \ RUN apt-get --yes update && apt-get --yes upgrade && \

View File

@ -57,7 +57,7 @@ RUN yarn test
#------------------------------------------------------------- #-------------------------------------------------------------
# Stage 3: Run Gateway Tests # Stage 3: Run Gateway Tests
#------------------------------------------------------------- #-------------------------------------------------------------
FROM ubuntu:16.04 FROM ubuntu:18.04
COPY --from=0 /go/src/github.com/minio/minio/minio /usr/bin/minio COPY --from=0 /go/src/github.com/minio/minio/minio /usr/bin/minio
COPY buildscripts/gateway-tests.sh /usr/bin/gateway-tests.sh COPY buildscripts/gateway-tests.sh /usr/bin/gateway-tests.sh
@ -66,7 +66,7 @@ COPY mint /mint
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV GOROOT /usr/local/go ENV GOROOT /usr/local/go
ENV GOPATH /usr/local ENV GOPATH /usr/local/gopath
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
ENV SIMPLE_CI 1 ENV SIMPLE_CI 1
ENV MINT_ROOT_DIR /mint ENV MINT_ROOT_DIR /mint

View File

@ -48,7 +48,7 @@ function main()
SERVER_ENDPOINT=127.0.0.1:24240 ENABLE_HTTPS=0 ACCESS_KEY=minio \ SERVER_ENDPOINT=127.0.0.1:24240 ENABLE_HTTPS=0 ACCESS_KEY=minio \
SECRET_KEY=minio123 MINT_MODE="full" /mint/entrypoint.sh \ SECRET_KEY=minio123 MINT_MODE="full" /mint/entrypoint.sh \
aws-sdk-go aws-sdk-java aws-sdk-php aws-sdk-ruby awscli \ aws-sdk-go aws-sdk-java aws-sdk-php aws-sdk-ruby awscli \
healthcheck mc minio-dotnet minio-java minio-js \ healthcheck mc minio-dotnet minio-js \
minio-py s3cmd s3select security minio-py s3cmd s3select security
rv=$? rv=$?

View File

@ -1,87 +0,0 @@
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV GOROOT /usr/local/go
ENV GOPATH /usr/local
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
WORKDIR /mint
RUN apt-get --yes update && apt-get --yes upgrade && \
apt-get --yes --quiet install wget jq curl dnsmasq
ENV MINT_ROOT_DIR /mint
ENV MINT_RUN_CORE_DIR $MINT_ROOT_DIR/run/core
ENV MINT_RUN_SECURITY_DIR $MINT_ROOT_DIR/run/security
ENV WGET "wget --quiet --no-check-certificate"
COPY create-data-files.sh /mint
RUN /mint/create-data-files.sh
COPY install-packages.list /mint
COPY preinstall.sh /mint
RUN /mint/preinstall.sh
COPY run /mint/run
COPY build/awscli /mint/build/awscli
RUN build/awscli/install.sh
COPY build/aws-sdk-java /mint/build/aws-sdk-java
RUN build/aws-sdk-java/install.sh
COPY build/aws-sdk-go /mint/build/aws-sdk-go
RUN build/aws-sdk-go/install.sh
COPY build/aws-sdk-php /mint/build/aws-sdk-php
RUN build/aws-sdk-php/install.sh
COPY build/aws-sdk-ruby /mint/build/aws-sdk-ruby
RUN build/aws-sdk-ruby/install.sh
COPY build/mc /mint/build/mc
RUN build/mc/install.sh
COPY build/minio-go /mint/build/minio-go
RUN build/minio-go/install.sh
COPY build/minio-java /mint/build/minio-java
RUN build/minio-java/install.sh
COPY build/minio-js /mint/build/minio-js
RUN build/minio-js/install.sh
COPY build/minio-py /mint/build/minio-py
RUN build/minio-py/install.sh
COPY build/s3cmd /mint/build/s3cmd
RUN build/s3cmd/install.sh
COPY build/minio-dotnet/ /mint/build/minio-dotnet/
RUN /mint/build/minio-dotnet/install.sh
COPY build/security /mint/build/security
RUN build/security/install.sh
COPY build/worm /mint/build/worm
RUN build/worm/install.sh
COPY build/healthcheck /mint/build/healthcheck
RUN build/healthcheck/install.sh
COPY build/s3select /mint/build/s3select
RUN build/s3select/install.sh
COPY remove-packages.list /mint
COPY postinstall.sh /mint
RUN /mint/postinstall.sh
COPY mint.sh /mint/mint.sh
COPY entrypoint.sh /mint/entrypoint.sh
ENTRYPOINT ["/mint/entrypoint.sh"]

View File

@ -82,7 +82,7 @@ All test logs are stored in `/mint/log/log.json` as multiple JSON document. Bel
After making changes to Mint source code a local docker image can be built/run by After making changes to Mint source code a local docker image can be built/run by
```sh ```sh
$ docker build -t minio/mint . -f Dockerfile.dev $ docker build -t minio/mint . -f Dockerfile.mint
$ docker run -e SERVER_ENDPOINT=play.minio.io:9000 -e ACCESS_KEY=Q3AM3UQ867SPQQA43P2F \ $ docker run -e SERVER_ENDPOINT=play.minio.io:9000 -e ACCESS_KEY=Q3AM3UQ867SPQQA43P2F \
-e SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG \ -e SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG \
-e ENABLE_HTTPS=1 -e MINT_MODE=full minio/mint:latest -e ENABLE_HTTPS=1 -e MINT_MODE=full minio/mint:latest

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
# #
# Mint (C) 2017 Minio, Inc. # Mint (C) 20172-2020 Minio, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -15,4 +15,4 @@
# limitations under the License. # limitations under the License.
# #
gem install --no-rdoc --no-ri aws-sdk-resources:3.56.0 aws-sdk multipart_body gem install --no-rdoc --no-ri aws-sdk-resources aws-sdk multipart_body

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
# #
# Mint (C) 2017 Minio, Inc. # Mint (C) 2017-2020 Minio, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -15,6 +15,4 @@
# limitations under the License. # limitations under the License.
# #
AWS_CLI_VERSION="1.16.309" pip3 install awscli --upgrade
python -m pip install awscli==$AWS_CLI_VERSION

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Mint (C) 2017 Minio, Inc. # Mint (C) 2017-2020 Minio, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -39,4 +39,4 @@ rm -fr "${temp_dir}"
cd "$MINIO_DOTNET_SDK_PATH" cd "$MINIO_DOTNET_SDK_PATH"
dotnet restore /p:Configuration=Mint dotnet restore /p:Configuration=Mint
dotnet publish --runtime ubuntu.16.04-x64 --output out /p:Configuration=Mint dotnet publish --runtime ubuntu.18.04-x64 --output out /p:Configuration=Mint

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
# #
# Mint (C) 2017 Minio, Inc. # Mint (C) 2017-2020 Minio, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -22,8 +22,6 @@ if [ -z "$MINIO_PY_VERSION" ]; then
fi fi
test_run_dir="$MINT_RUN_CORE_DIR/minio-py" test_run_dir="$MINT_RUN_CORE_DIR/minio-py"
# FIX https://github.com/pypa/pip/issues/5221 pip3 install --user faker
python -m pip install --upgrade pip pip3 install minio=="$MINIO_PY_VERSION"
python -m pip install --user faker
python -m pip install minio=="$MINIO_PY_VERSION"
$WGET --output-document="$test_run_dir/tests.py" "https://raw.githubusercontent.com/minio/minio-py/${MINIO_PY_VERSION}/tests/functional/tests.py" $WGET --output-document="$test_run_dir/tests.py" "https://raw.githubusercontent.com/minio/minio-py/${MINIO_PY_VERSION}/tests/functional/tests.py"

View File

@ -1,17 +1,18 @@
git git
python3-pip python3-pip
nodejs nodejs
ruby openjdk-8-jdk
ruby-dev openjdk-8-jre
ruby-bundler
php
php7.0-curl
php-xml
default-jre
default-jdk
ant
dirmngr dirmngr
apt-transport-https
dotnet-sdk-2.1 dotnet-sdk-2.1
ca-certificates-mono ca-certificates-mono
nuget nuget
libunwind8 libunwind8
ruby
ruby-dev
ruby-bundler
php
php-curl
php-xml
ant

View File

@ -111,7 +111,7 @@ function trust_s3_endpoint_tls_cert()
# Download the public certificate from the server # Download the public certificate from the server
openssl s_client -showcerts -connect "$SERVER_ENDPOINT" </dev/null 2>/dev/null | \ openssl s_client -showcerts -connect "$SERVER_ENDPOINT" </dev/null 2>/dev/null | \
openssl x509 -outform PEM -out /usr/local/share/ca-certificates/s3_server_cert.crt || \ openssl x509 -outform PEM -out /usr/local/share/ca-certificates/s3_server_cert.crt || \
exit -1 exit 1
# Load the certificate in the system # Load the certificate in the system
update-ca-certificates --fresh >/dev/null update-ca-certificates --fresh >/dev/null
@ -191,7 +191,6 @@ function main()
echo -n "($i/$count) Running $sdk_name tests ... " echo -n "($i/$count) Running $sdk_name tests ... "
if ! run_test "$sdk_dir"; then if ! run_test "$sdk_dir"; then
(( i-- )) (( i-- ))
break
fi fi
done done

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
# #
# Mint (C) 2017 Minio, Inc. # Mint (C) 2017-2020 Minio, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -26,13 +26,19 @@ fi
$APT install apt-transport-https $APT install apt-transport-https
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb if ! $WGET --output-document=packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb | bash -; then
echo "unable to download dotnet packages"
exit 1
fi
dpkg -i packages-microsoft-prod.deb dpkg -i packages-microsoft-prod.deb
rm -f packages-microsoft-prod.deb rm -f packages-microsoft-prod.deb
$APT update $APT update
$APT install gnupg ca-certificates
# download and install golang # download and install golang
GO_VERSION="1.13.5" GO_VERSION="1.13.10"
GO_INSTALL_PATH="/usr/local" GO_INSTALL_PATH="/usr/local"
download_url="https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" download_url="https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz"
if ! $WGET --output-document=- "$download_url" | tar -C "${GO_INSTALL_PATH}" -zxf -; then if ! $WGET --output-document=- "$download_url" | tar -C "${GO_INSTALL_PATH}" -zxf -; then
@ -42,7 +48,9 @@ fi
xargs --arg-file="${MINT_ROOT_DIR}/install-packages.list" apt --quiet --yes install xargs --arg-file="${MINT_ROOT_DIR}/install-packages.list" apt --quiet --yes install
# set python 3.5 as default nuget update -self
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
# set python 3.6 as default
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
sync sync

View File

@ -3,7 +3,7 @@ git
python3-pip python3-pip
ruby-dev ruby-dev
ruby-bundler ruby-bundler
default-jdk openjdk-8-jdk
ant ant
dotnet dotnet
nuget nuget

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,13 +18,13 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"
error_log_file="$2" error_log_file="$2"
# run tests # run tests
cd /mint/run/core/aws-sdk-java/ || exit -1 cd /mint/run/core/aws-sdk-java/ || exit 1
java -jar FunctionalTests.jar 1>>"$output_log_file" 2>"$error_log_file" java -jar FunctionalTests.jar 1>>"$output_log_file" 2>"$error_log_file"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"

View File

@ -18,7 +18,7 @@
# handle command line arguments # handle command line arguments
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>" echo "usage: run.sh <OUTPUT-LOG-FILE> <ERROR-LOG-FILE>"
exit -1 exit 1
fi fi
output_log_file="$1" output_log_file="$1"