Skip to content

Commit

Permalink
Periodic tests review 98 (#243)
Browse files Browse the repository at this point in the history
* fix test 98

* fix test 20

* fix test 96

* fix test 96 add purge
  • Loading branch information
folkzb authored Dec 6, 2024
1 parent 1c4eeff commit 9675094
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ Describe 'Access the public bucket and check the access of objects:' category:"B
;;
"mgc")
mgc workspace set $profile-second > /dev/null
When run bash ./spec/retry_command.sh "mgc object-storage objects download --src $test_bucket_name/$file1_name --dst . --raw"
#When run mgc object-storage objects download --src $test_bucket_name/$file1_name --dst . --raw
#When run bash ./spec/retry_command.sh "mgc object-storage objects download --src $test_bucket_name/$file1_name --dst . --raw"
When run mgc object-storage objects download --src $test_bucket_name/$file1_name --dst . --raw
The status should be failure
The output should include "403 Forbidden"
#The stderr should include "403 Forbidden"
The stderr should include "403 Forbidden"
;;
esac
rclone purge --log-file /dev/null "$profile:$test_bucket_name" > /dev/null
Expand Down
5 changes: 3 additions & 2 deletions spec/098_bucket-invalid-name-validation_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Describe 'Create invalid bucket' category:"Skip"
mgc workspace set $profile > /dev/null
When run bash ./spec/retry_command.sh "mgc object-storage buckets create "$bucket_name" --raw"
#When run mgc object-storage buckets create "$bucket_name" --raw
The error should include "InvalidBucketName"
The stdout should include "InvalidBucketName"
;;
"rclone")
When run rclone mkdir "$profile:$bucket_name" -v
Expand Down Expand Up @@ -79,9 +79,10 @@ Describe 'Create bucket with invalid names' category:"BucketManagement"
;;
"mgc")
Skip if "mgc cli está validando tamanho do nome" check_length "$bucket_name"
mgc workspace set $profile > /dev/null
When run bash ./spec/retry_command.sh "mgc object-storage buckets create "$bucket_name" --raw"
# When run mgc object-storage buckets create "$bucket_name" --raw
The error should include "InvalidBucketName"
The stdout should include "InvalidBucketName"
;;
"rclone")
When run rclone mkdir "$profile:$bucket_name" -v
Expand Down
10 changes: 6 additions & 4 deletions spec/expected_failure/096_readonly_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,25 @@ Describe 'Read-only List objects:' category:"BucketPermission"
test_bucket_name="$bucket_name-$client-$profile"
printf "\n$test_bucket_name" >> ./report/buckets_to_delete.txt
Skip if "No such a "$1-readonly" user" is_variable_null "$profile"
aws --profile $1 s3api create-bucket --bucket $test_bucket_name --acl public-read > /dev/null
case "$client" in
"aws-s3api" | "aws")
When run aws --profile $profile s3api list-objects-v2 --bucket test-test #$test_bucket_name
When run aws --profile $profile s3api list-objects-v2 --bucket $test_bucket_name
The stdout should include RequestCharged
;;
"aws-s3")
When run aws --profile $profile s3 ls s3://test-test #$test_bucket_name
When run aws --profile $profile s3 ls s3://$test_bucket_name
;;
"rclone")
When run rclone lsd $profile:test-test -v #$test_bucket_name -v
When run rclone lsd $profile:$test_bucket_name -v
;;
"mgc")
mgc workspace set $profile > /dev/null
When run mgc object-storage objects list test-test --raw #$test_bucket_name
When run mgc object-storage objects list $test_bucket_name --raw
The stdout should include FILES
;;
esac
rclone purge --log-file /dev/null "$1:$test_bucket_name" > /dev/null
The status should be success
End
End
Expand Down

0 comments on commit 9675094

Please sign in to comment.