minio / mint

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

minio-js tests fail on server #220

Closed nitisht closed 6 years ago

nitisht commented 6 years ago

Following error is return when running minio-js tests against latest rc with mint.

To get logs, run 'sudo docker cp 12f24cb16cbe:/mint/log /tmp/mint-logs'
(1/1) Running minio-js tests ... FAILED in 4 seconds
{
  "name": "minio-js",
  "function": "\"after all\" hook",
  "duration": 7,
  "status": "FAIL",
  "error": "S3Error: The bucket you tried to delete is not empty at Object.parseError (node_modules/minio/dist/main/xml-parsers.js:56:11) at node_modules/minio/dist/main/transformers.js:117:22 at DestroyableTransform._flush (node_modules/minio/dist/main/transformers.js:48:26) at DestroyableTransform.<anonymous> (node_modules/minio/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:135:12) at finishMaybe (node_modules/minio/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:371:12) at endWritable (node_modules/minio/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:378:3) at DestroyableTransform.Writable.end (node_modules/minio/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:356:5) at IncomingMessage.onend (_stream_readable.js:511:10) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)"
}
kannappanr commented 6 years ago

The failure is in PresignedPostPolicy. The issue is that because the js sdk doesn't return a URL with a trailing "/", because of which the server returns this error code. Could be related to https://github.com/minio/minio/pull/5095 The following command with appropriate file value will succed

curl https://play.minio.io:9000/kannappan/ -F x-amz-algorithm=AWS4-HMAC-SHA256 -F x-amz-credential=Q3AM3UQ867SPQQA43P2F/20171115/us-east-1/s3/aws4_request -F x-amz-date=20171115T090327Z -F x-amz-signature=08692f7117adf7bb4516f5e7b06c834aa2c4061ebbfda5e9f798012c20023d2a -F bucket=kannappan -F policy=eyJleHBpcmF0aW9uIjoiMjAxNy0xMS0yMlQwOTowMzoyNy44MjVaIiwiY29uZGl0aW9ucyI6W1siZXEiLCIkYnVja2V0Iiwia2FubmFwcGFuIl0sWyJlcSIsIiRrZXkiLCJ0ZXN0Il0sWyJlcSIsIiR4LWFtei1kYXRlIiwiMjAxNzExMTVUMDkwMzI3WiJdLFsiZXEiLCIkeC1hbXotYWxnb3JpdGhtIiwiQVdTNC1ITUFDLVNIQTI1NiJdLFsiZXEiLCIkeC1hbXotY3JlZGVudGlhbCIsIlEzQU0zVVE4NjdTUFFRQTQzUDJGLzIwMTcxMTE1L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QiXV19 -F key=test -F file=@<FILE> 

while the following will fail because it is missing trailing "/"

curl https://play.minio.io:9000/kannappan -F x-amz-algorithm=AWS4-HMAC-SHA256 -F x-amz-credential=Q3AM3UQ867SPQQA43P2F/20171115/us-east-1/s3/aws4_request -F x-amz-date=20171115T090327Z -F x-amz-signature=08692f7117adf7bb4516f5e7b06c834aa2c4061ebbfda5e9f798012c20023d2a -F bucket=kannappan -F policy=eyJleHBpcmF0aW9uIjoiMjAxNy0xMS0yMlQwOTowMzoyNy44MjVaIiwiY29uZGl0aW9ucyI6W1siZXEiLCIkYnVja2V0Iiwia2FubmFwcGFuIl0sWyJlcSIsIiRrZXkiLCJ0ZXN0Il0sWyJlcSIsIiR4LWFtei1kYXRlIiwiMjAxNzExMTVUMDkwMzI3WiJdLFsiZXEiLCIkeC1hbXotYWxnb3JpdGhtIiwiQVdTNC1ITUFDLVNIQTI1NiJdLFsiZXEiLCIkeC1hbXotY3JlZGVudGlhbCIsIlEzQU0zVVE4NjdTUFFRQTQzUDJGLzIwMTcxMTE1L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QiXV19 -F key=test -F file=@<FILE> 
nitisht commented 6 years ago

Tested, fixed by https://github.com/minio/minio/pull/5192