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

add listobject test #268

Merged
merged 2 commits into from
Apr 18, 2018
Merged

add listobject test #268

merged 2 commits into from
Apr 18, 2018

Conversation

halfcrazy
Copy link
Contributor

No description provided.

@halfcrazy
Copy link
Contributor Author

block until minio-dotnet has a new release.

@harshavardhana
Copy link
Member

@halfcrazy would you be able to complete this PR ? If not @nitisht shall we complete this PR and take it in ?

@halfcrazy halfcrazy force-pushed the listobject branch 2 times, most recently from 594a52f to 27cab82 Compare April 8, 2018 12:55
@halfcrazy halfcrazy changed the title [WIP]add listobject test add listobject test Apr 8, 2018
@halfcrazy
Copy link
Contributor Author

halfcrazy commented Apr 8, 2018

@harshavardhana done.

@halfcrazy halfcrazy force-pushed the listobject branch 6 times, most recently from f873cd9 to 064db12 Compare April 8, 2018 14:42
@halfcrazy halfcrazy changed the title add listobject test [WIP]add listobject test Apr 8, 2018
@halfcrazy halfcrazy changed the title [WIP]add listobject test add listobject test Apr 8, 2018
@kannappanr
Copy link
Collaborator

@halfcrazy Travis is failing.

(1/12) Running aws-sdk-go tests ... FAILED in 1 seconds
{
  "alert": "",
  "args": {
    "bucketName": "aws-sdk-go-test-64alsbtblekn96",
    "expiry": 120000000000,
    "objectName": "testObject"
  },
  "duration": 201,
  "error": "AWS S3 key count mismatch",
  "function": "testListObjects",
  "message": "AWS SDK Go listobjects with prefix '' expected 2 key but got 1",
  "name": "aws-sdk-go",
  "status": "FAIL"
}

@halfcrazy
Copy link
Contributor Author

@kannappanr kan relates to minio/minio#5686, I think the test fails because minio "cannot treat /prefix or prefix differently."

.travis.yml Outdated
@@ -11,5 +11,6 @@ services:
script:
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
- docker build -f Dockerfile.dev -t play.minio.io/mint:travis-$TRAVIS_PULL_REQUEST_SHA .
- docker run play.minio.io/mint:travis-$TRAVIS_PULL_REQUEST_SHA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not run this @halfcrazy we don't have play.minio.io registry anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but play.minio.io/mint:travis-$TRAVIS_PULL_REQUEST_SHA this image was built in previous line docker build -f Dockerfile.dev -t play.minio.io/mint:travis-$TRAVIS_PULL_REQUEST_SHA . it's a local image .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do that @halfcrazy there is no need to run it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without running it, tests will not run on travis-ci.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halfcrazy we dont have Docker registry at play.minio anymore, so docker run/pull wont work here. Please remove the line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitisht It doesn't really pull image from play.minio, instead it use the image built in previous line. Like this

 script:
   - bash -c 'shopt -s globstar; shellcheck **/*.sh'
   - docker build -f Dockerfile.dev -t local_image_name .
   - docker run local_image_name

entrypoint.sh Outdated
@@ -20,4 +20,4 @@
# Get the pid to be used for kill command if required
main_pid="$!"
trap 'echo -e "\nAborting Mint..."; kill $main_pid' SIGINT SIGTERM
wait
wait -n
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any specific reason that you need wait -n here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To tell travis-ci if mint.sh has test failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we can add a comment with this... in mind.

mint.sh Outdated
@@ -140,9 +140,11 @@ function main()
## Report when all tests in run_list are run
if [ $i -eq "$count" ]; then
echo -e "\nAll tests ran successfully"
exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed - do you have a rationale for why this was added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, exit 0 could be omitted.

@halfcrazy halfcrazy force-pushed the listobject branch 3 times, most recently from 5a68023 to da55a56 Compare April 10, 2018 04:09
@@ -142,7 +142,8 @@ function main()
echo -e "\nAll tests ran successfully"
else
echo -e "\nExecuted $i out of $count tests successfully."
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why exit here?

Copy link
Contributor Author

@halfcrazy halfcrazy Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it means we have tests failed, exit 1 will tell entrypoint.sh that we have tests failed, and then entrypoint.sh will exit with the none zero exit code. So travis-ci will fail. Otherwise, travis-ci will treat it as a success.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis is failing now in aws-sdk-go, can you pls take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitisht relates to minio/minio#5686, I think the test fails because minio "cannot treat /prefix or prefix differently." Maybe comment those code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not possible for us to differentiate our backend is simply filesystem which has no such distinction for files with / and no /. In practical applications you would never create such objects. It is not possible to copy such objects out from S3 to local filesystem using any tools such as s3cmd or AWS cli

So testing such scenario wouldn't be needed. We only need to test if PUT indeed succeeds with / in the beginning and the object is created.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harshavardhana Update. PTAL

@halfcrazy halfcrazy force-pushed the listobject branch 5 times, most recently from 3f22116 to 0707ed6 Compare April 15, 2018 09:12
@halfcrazy halfcrazy force-pushed the listobject branch 8 times, most recently from 39345e9 to 0177202 Compare April 15, 2018 12:28
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @halfcrazy

@nitisht nitisht merged commit c3a3d3f into minio:master Apr 18, 2018
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.

4 participants