Currently, attempts to attach a policy to a user who already has
the policy attached to them results in a 400.
This change handles cases where policy attach/detach operations
are automated using scripts/jobs. A re-run of the attach/detach
step should not fail the entire job.
fixes#4876
The latest `mc rb` test cleans all the site data, and on the demo site,
there are sometimes WORM files put in by some users, which leads to
a failure. This test should only be run on sites where the user knows he can
clean everything without errors.
Fixes#4874
`head -c 0` leads to an `head: illegal byte count -- 0` error under macOS. We should also provide the input with `-i` parameter (it's ok under GNU/Linux too)
client-s3.Stat() does not properly detect a prefix when there is another
lower one,
e.g: Stat() of 'dir/' fails when there is 'dir-name/' in the same parent
prefix.
A recent commit changed the behavior of client-s3.GetObjectLockConfig()
without properly checking the behavior of the callers introducing a bug
during mv command where the target is an S3 server.
Add some tests for the mc mv command as well.
`mc cat >/tmp/output` is not working properly due to mc cat versioning
changes, this commit fixes the issue to make mc cat works as expected.
It also adds a unit test for it.
- mc rm doesn't fail for SSE-C encrypted objects because
we use multi-object delete - this behavior is S3 compatible
- changes needed to ensure that keys are set appropriately
when doing server side copy.
In addition to the general bucket name created for functinal tests,
some tests inside this latter creates separated buckets but remove
them using rm command which does not support removing buckets anymore.
`mc find alias/bucket` without trailing slash is actually printing 'alias/bucket' as
first element in the output, the thing which is not taken into consideration in test_find
test. This commit will ask `mc find` to list 'alias/bucket/' instead to have a similar
output as gnu `ls` cmd.
Change the function name "fail" to "show_on_failure"
Add another function called "show_on_success" to handle certain
failure assert scenarios
Add missing Log success message for "test_config_host_add" and
"test_config_host_add_error" functions.
Fixes#2305
Previously `error` field is not populated properly due to double
formatting error message into JSON string. This patch fixes the issue
by avoid second time formatting in `printf` command.