Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added AWS Java SDK v2 based tests #375

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

shtripat
Copy link
Contributor

This PR adds AWS Java SDK v2 based tests to make sure basics S3 functions works fine.

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)
+       # /mint/run/core/minio-js
+       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)

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 --host "localhost,127.0.0.1"

Step-4: Run the test

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>

The tests should run fine and report success

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'
renamed 'cert2.pem' -> '/usr/local/share/ca-certificates/cert2.pem'
renamed 'cert3.pem' -> '/usr/local/share/ca-certificates/cert3.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 32 seconds

All tests ran successfully

Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
@shtripat
Copy link
Contributor Author

The shellcheck failing for gradlew itself

@harshavardhana
Copy link
Member

The shellcheck failing for gradlew itself

lets ask shellcheck to ignore that file

harshavardhana
harshavardhana previously approved these changes Jan 12, 2024
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
harshavardhana
harshavardhana previously approved these changes Jan 12, 2024
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
harshavardhana
harshavardhana previously approved these changes Jan 18, 2024
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
@harshavardhana harshavardhana merged commit 5772d8c into minio:master Jan 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants