Closed shtripat closed 2 months ago
Now tests can be run by setting SERVER_ENDPOINT both with IP and DNS based addresses like 192.168.0.142:22000 and localhost:22000
Steps to verify the changes
Step-1: Do the below local changes
diff --git a/mint.sh b/mint.sh index 04f213b..3015714 100755 --- a/mint.sh +++ b/mint.sh @@ -165,6 +165,10 @@ function main() { run_list=("${run_list[@]}" "$TESTS_DIR/$sdk") done + run_list=(/mint/run/core/aws-sdk-java-v2) + echo "RUN List ${run_list[*]}" + count="${#run_list[@]}" i=0 for sdk_dir in "${run_list[@]}"; do diff --git a/release.sh b/release.sh index 0268d71..424542f 100755 --- a/release.sh +++ b/release.sh @@ -23,10 +23,10 @@ export WGET="wget --quiet --no-check-certificate" "${MINT_ROOT_DIR}"/create-data-files.sh "${MINT_ROOT_DIR}"/preinstall.sh -# install mint app packages -for pkg in "$MINT_ROOT_DIR/build"/*/install.sh; do - echo "Running $pkg" - $pkg -done +#for pkg in (); do +# echo "Running $pkg" +# $pkg +#done +"${MINT_ROOT_DIR}"/build/aws-sdk-java-v2/install.sh "${MINT_ROOT_DIR}"/postinstall.sh
Step-2: Build the mint image using podman (as mint uses podman)
mint
podman image prune && podman container prune && podman build -t localhost/minio/mint . -f Dockerfile
Note down the built image id
Step-3: Start a local MinIO instance with TLS enabled
CI=true MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 minio server /tmp/site1{1...4} --address ":22000" --console-address ":9021" --certs-dir ~/.minio/certs
Certs can be generated using certgen tool as below and copied to ~/.minio/certs
certgen
~/.minio/certs
certgen --host "localhost,127.0.0.1"
Step-4: Run the test both using IP and DNS name as below
podman run -e "SERVER_ENDPOINT=192.168.0.142:22000" -e "ACCESS_KEY=minio" -e "SECRET_KEY=minio123" -e "ENABLE_HTTPS=1" -e "ENABLE_VIRTUAL_STYLE=0" <Image ID>
and
podman run -e "SERVER_ENDPOINT=localhost:22000" --net=host -e "ACCESS_KEY=minio" -e "SECRET_KEY=minio123" -e "ENABLE_HTTPS=1" -e "ENABLE_VIRTUAL_STYLE=0" <Image ID>
The tests should run fine and report success respectively as below
Running with SERVER_ENDPOINT: 192.168.0.142:22000 ACCESS_KEY: minio SECRET_KEY: ***REDACTED*** ENABLE_HTTPS: 1 SERVER_REGION: us-east-1 MINT_DATA_DIR: /mint/data MINT_MODE: core ENABLE_VIRTUAL_STYLE: 0 RUN_ON_FAIL: 0 To get logs, run 'docker cp :/mint/log /tmp/mint-logs' verify depth is 5 Can't use SSL_get_servername depth=0 O = Certgen Development, OU = shubhendu@fedora-shubhendu (Shubhendu Ram Tripathi) verify error:num=18:self-signed certificate verify return:1 depth=0 O = Certgen Development, OU = shubhendu@fedora-shubhendu (Shubhendu Ram Tripathi) verify return:1 DONE renamed 'cert1.pem' -> '/usr/local/share/ca-certificates/cert1.pem' rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL RUN List /mint/run/core/aws-sdk-java-v2 (1/1) Running aws-sdk-java-v2 tests ... done in 7 seconds All tests ran successfully
Running with SERVER_ENDPOINT: localhost:22000 ACCESS_KEY: minio SECRET_KEY: ***REDACTED*** ENABLE_HTTPS: 1 SERVER_REGION: us-east-1 MINT_DATA_DIR: /mint/data MINT_MODE: core ENABLE_VIRTUAL_STYLE: 0 RUN_ON_FAIL: 0 To get logs, run 'docker cp :/mint/log /tmp/mint-logs' verify depth is 5 Can't use SSL_get_servername depth=0 O = Certgen Development, OU = shubhendu@fedora-shubhendu (Shubhendu Ram Tripathi) verify error:num=18:self-signed certificate verify return:1 depth=0 O = Certgen Development, OU = shubhendu@fedora-shubhendu (Shubhendu Ram Tripathi) verify return:1 DONE renamed 'cert1.pem' -> '/usr/local/share/ca-certificates/cert1.pem' rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL RUN List /mint/run/core/aws-sdk-java-v2 (1/1) Running aws-sdk-java-v2 tests ... done in 4 seconds All tests ran successfully
Now tests can be run by setting SERVER_ENDPOINT both with IP and DNS based addresses like 192.168.0.142:22000 and localhost:22000
Steps to verify the changes
Step-1: Do the below local changes
Step-2: Build the
mint
image using podman (as mint uses podman)Note down the built image id
Step-3: Start a local MinIO instance with TLS enabled
Certs can be generated using
certgen
tool as below and copied to~/.minio/certs
Step-4: Run the test both using IP and DNS name as below
and
The tests should run fine and report success respectively as below
and