Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Below environment variables are required to be passed to the podman container. S
| `SECRET_KEY` | Secret Key for `SERVER_ENDPOINT` credentials | `zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG` |
| `ENABLE_HTTPS` | (Optional) Set `1` to indicate to use HTTPS to access `SERVER_ENDPOINT`. Defaults to `0` (HTTP) | `1` |
| `MINT_MODE` | (Optional) Set mode indicating what category of tests to be run by values `core`, `full`. Defaults to `core` | `full` |
| `MINT_MC_VARIANT` | (Optional) Select `mc` test variant by values `mc`, `ec`. Defaults to `mc`. (Using `ec` requires providing the `ec` repo in the container.) | `ec` | |
| `DOMAIN` | (Optional) Value of MINIO_DOMAIN environment variable used in Minio server | `myminio.com` |
| `ENABLE_VIRTUAL_STYLE` | (Optional) Set `1` to indicate virtual style access . Defaults to `0` (Path style) | `1` |
| `RUN_ON_FAIL` | (Optional) Set `1` to indicate execute all tests independent of failures (currently implemented for minio-go and minio-java) . Defaults to `0` | `1` |
Expand Down
5 changes: 5 additions & 0 deletions build/mc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
# limitations under the License.
#

if [ "${MINT_MC_VARIANT:-mc}" = "ec" ]; then
echo "MINT_MC_VARIANT=ec: skipping upstream mc install (expecting ec-provided repo/binary/tests)"
exit 0
fi

MC_VERSION=$(curl --retry 10 -Ls -o /dev/null -w "%{url_effective}" https://github.com/minio/mc/releases/latest | sed "s/https:\/\/github.com\/minio\/mc\/releases\/tag\///")
if [ -z "$MC_VERSION" ]; then
echo "unable to get mc version from github"
Expand Down
14 changes: 13 additions & 1 deletion run/core/mc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This directory serves as the location for Mint tests using `mc`. Top level `mint.sh` calls `run.sh` to execute tests.

## Adding new tests
New tests is added into `test.sh` as new functions.
Upstream `mc` tests live in `functional-tests.sh` (fetched from `minio/mc` during the Mint image build).

## Running tests manually
- Set environment variables `MINT_DATA_DIR`, `MINT_MODE`, `SERVER_ENDPOINT`, `ACCESS_KEY`, `SECRET_KEY`, `SERVER_REGION` and `ENABLE_HTTPS`
Expand All @@ -17,3 +17,15 @@ export ENABLE_HTTPS=1
export SERVER_REGION=us-east-1
./run.sh /tmp/output.log /tmp/error.log
```

## Running `ec` (enterprise) mc variant
If you want to run `mc` tests using the `ec` fork, set `MINT_MC_VARIANT=ec` and provide the `ec` repo inside the container.

By default `run.sh` looks for:
- `./ec/` (a checkout of the `ec` repository)

It then runs an `ec`-provided runner script at `./ec/mint/run.sh` (relative to this directory).

Override locations/behavior with:
- `MINT_MC_EC_REPO_DIR` (path to the checked out `ec` repo; default `./ec`)
- `MINT_MC_EC_RUNNER` (path to an executable runner script; default `./ec/mint/run.sh`)
26 changes: 25 additions & 1 deletion run/core/mc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,28 @@ fi
output_log_file="$1"
error_log_file="$2"

./functional-tests.sh 1>>"$output_log_file" 2>"$error_log_file"
mc_variant="${MINT_MC_VARIANT:-mc}"

case "$mc_variant" in
ec)
ec_repo_dir="${MINT_MC_EC_REPO_DIR:-./ec}"
ec_runner="${MINT_MC_EC_RUNNER:-${ec_repo_dir}/mint/run.sh}"

if [ ! -f "$ec_runner" ]; then
echo "MINT_MC_VARIANT=ec but missing runner: $ec_runner" >&2
echo "mount the ec repo at ./ec (so ${ec_repo_dir}/mint/run.sh exists) or set MINT_MC_EC_RUNNER" >&2
exit 1
fi

# Use exec for the ec tests
exec bash "$ec_runner" "$output_log_file" "$error_log_file"
;;
mc)
# Run upstream mc tests
./functional-tests.sh 1>>"$output_log_file" 2>"$error_log_file"
;;
*)
echo "unknown MINT_MC_VARIANT: $mc_variant (supported: mc, ec)" >&2
exit 1
;;
esac
Loading