-
Notifications
You must be signed in to change notification settings - Fork 50
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
cleanup all shell scripts #128
Conversation
looks like ShellCheck is failing @balamurugana can you please fix. |
build/minio-go/install.sh
Outdated
# limitations under the License. | ||
# | ||
|
||
MINIO_GO_VERSION="v3.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest go version is 3.0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
run/core/aws-sdk-php/README.md
Outdated
This directory serves as the location for Mint tests using `aws-sdk-php`. Top level `tests.sh` calls `run.sh` to execute tests. | ||
|
||
## Adding new tests | ||
New tests is added into `quick-tests.php` like as new functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New tests is added into quick-tests.php
like as new functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
preinstall.sh
Outdated
$APT install $(cat install-packages.list) | ||
|
||
# set python 3.5 as default | ||
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python 3.6.2 is latest stable version - should we change version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. python is used whatever is provided by default by ubuntu 16.04
mint.sh
Outdated
mkdir -p "$BASE_LOG_DIR/$sdk_name" | ||
|
||
(cd "$BASE_LOG_DIR/$sdk_name"; ./run.sh "$BASE_LOG_DIR/$sdk_name/$OUTPUT_LOG_FILE" "$BASE_LOG_DIR/$sdk_name/$ERROR_LOG_FILE") | ||
rv=$? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/rv/rc/ - more idiomatic.
mint.sh
Outdated
function main() | ||
{ | ||
## $MINT_MODE is used inside every sdks. | ||
echo "To get intermittent logs, 'sudo docker cp ${CONTAINER_ID}:/mint/log /tmp/mint-logs'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what intermittent means in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could fetch logs when tests are in progress/running
mint.sh
Outdated
|
||
CONTAINER_ID=$(awk -F / '{ print substr($NF, 1, 12) }' /proc/1/cpuset) | ||
MINT_DATA_DIR=${MINT_DATA_DIR:-/mint/data} | ||
MINT_MODE=${MINT_MODE:-core} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need MINT_MODE defined here -minio-go functional tests use MODE=quick, dotnet defines MINT_MODE=quick in latest PR. We need to standardize on the env variable so that SDK's can distinguish between quick tests and verbose tests. Each SDK's Readme.md in the mint run/core/... dir also needs a update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix in a separate PR dealing with mint modes
@nitisht fixed shellcheck errors. However shellcheck errors shown now are not errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, if a specific SDK tests fails, say minio-go
fails, mint
stops execution of minio-go
tests, moves to the next SDK and starts the tests.
Wanted to clarify if that is the expected behaviour or mint
should stop the execution completely on first failure and exit?
run/core/aws-sdk-php/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `aws-sdk-php` tests | |||
This directory serves as the location for Mint tests using `aws-sdk-php`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
calls tests.sh
to execute tests.
run/core/aws-sdk-ruby/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `aws-sdk-ruby` tests | |||
This directory serves as the location for Mint tests using `aws-sdk-ruby`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
calls aws-stub-tests.rb
to execute tests.
run/core/awscli/README.md
Outdated
## `awscli` tests. | ||
This directory serves as the location for Mint tests using `awscli`. To add new test case to Mint `awscli` app, just add new method in the `test.sh` file. | ||
## `awscli` tests | ||
This directory serves as the location for Mint tests using `awscli`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
calls tests.sh
to execute tests.
run/core/mc/README.md
Outdated
## `mc` tests. | ||
This directory serves as the location for Mint tests using `mc`. To add new test case to Mint `mc` app, just add new method in the `test.sh` file. | ||
## `mc` tests | ||
This directory serves as the location for Mint tests using `mc`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
calls tests.sh
to execute tests.
run/core/minio-java/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `minio-java` tests | |||
This directory serves as the location for Mint tests using `minio-java`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
executes Java tests.
run/core/minio-js/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `minio-js` tests | |||
This directory serves as the location for Mint tests using `minio-js`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
executes minio-js tests.
run/core/minio-py/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `minio-py` tests | |||
This directory serves as the location for Mint tests using `minio-py`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
executes minio-py tests.
run/core/minio-go/README.md
Outdated
@@ -0,0 +1,17 @@ | |||
## `minio-go` tests | |||
This directory serves as the location for Mint tests using `minio-go`. Top level `tests.sh` calls `run.sh` to execute tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level run.sh
executes minio-go tests.
Agreed, but we need to follow one style and the linter |
@balamurugana there is a reasoning behind such a requested change - https://github.com/koalaman/shellcheck/wiki/SC2046 |
@balamurugana , ran the Dockerfile and Dockerfile.dev - a few more issues:
|
might be a good idea to log the sdk version as well in the output/error log. |
All shellcheck errors and comments are addressed |
This is the current (and correct) behavior.
done
|
travis failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than one typo
run/core/awscli/README.md
Outdated
- A normal response should be redirected to `$AWSCLI_LOG_FILE`, and error response should be redirected to `$AWSCLI_ERROR_LOG_FILE`. | ||
- Do not proceed to next testcase in case of an error. | ||
## Adding new tests | ||
New tests is added into `mint.sh` as new functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New tests is added into test.sh
as new functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This patch does below * cleans up all shell scripts * provides package installation separately * provides way to run tests in non-docker enviroment
No description provided.