minio / mint

Collection of tests to detect overall correctness of MinIO server.
Apache License 2.0
78 stars 50 forks source link

update minio-js test run as per the new ts workflow #360

Closed prakashsvmx closed 1 year ago

prakashsvmx commented 1 year ago

PR to adopt minio-js ts workflow based release

Note: this PR uses the minio-js master branch for now , It will be updated once minio-js is released

Testing /Verification:

Diff to run only minio-js tests

```diff diff --git a/mint.sh b/mint.sh index 04f213b..928db2d 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/minio-js) + # /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..f9839d9 100755 --- a/release.sh +++ b/release.sh @@ -24,9 +24,10 @@ export WGET="wget --quiet --no-check-certificate" "${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/minio-js/install.sh "${MINT_ROOT_DIR}"/postinstall.sh ```

Build and run the tests

``` ## Start MinIO Server CI=true MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 minio server /tmp/site1{1...4} --address ":22000" --console-address ":9021" # Sample Build and run of the tests podman image prune && podman container prune && podman build -t minio/mint . -f Dockerfile && podman run -e "SERVER_ENDPOINT=192.168.88.242:22000" -e "ACCESS_KEY=minio" -e "SECRET_KEY=minio123" -e "ENABLE_HTTPS=0" -e "ENABLE_VIRTUAL_STYLE=0" minio/mint # Run Result SERVER_ENDPOINT: 192.168.88.242:22000 ACCESS_KEY: minio SECRET_KEY: ***REDACTED*** ENABLE_HTTPS: 0 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' RUN List /mint/run/core/minio-js (1/1) Running minio-js tests ... done in 51 seconds All tests ran successfully ```
harshavardhana commented 1 year ago

Note: this PR uses the minio-js master branch for now , It will be updated once minio-js is released

should we make a new release? @prakashsvmx

prakashsvmx commented 1 year ago

Yes. @harshavardhana

harshavardhana commented 1 year ago

@prakashsvmx please update the PR minio-js is released.

prakashsvmx commented 1 year ago

Thank you @harshavardhana . I have updated to test the latest release.

Using minio-js RELEASE 7.1.1
....

Running minio-js tests ... done in 50 seconds

All tests ran successfully
trim21 commented 1 year ago

Sorry didn't notice this PR early.

There is no need to copy .mocharc.js and babel-register.js, also no need to copy dependencies and devDependencies, we should just use these configs from source.

install deps with npm i(lockfile removed) and run test with npm run test from minio/minio-js directly.

This also cause extra maintenance complexity, changing test or build config may break mint tests.