From 2bd5ffe8bcad047743b4b9532547565f917a89d9 Mon Sep 17 00:00:00 2001 From: Luke McCrone Date: Wed, 18 Feb 2026 18:53:14 -0300 Subject: [PATCH] test: remove obsolete recording code --- tests/.env.default | 1 - tests/.env.docker.default | 1 - tests/README.md | 4 +- tests/commands/abort_multipart_upload.sh | 2 - tests/commands/complete_multipart_upload.sh | 1 - tests/commands/copy_object.sh | 2 - tests/commands/create_bucket.sh | 2 - tests/commands/create_multipart_upload.sh | 3 - tests/commands/delete_bucket.sh | 1 - tests/commands/delete_bucket_policy.sh | 2 - tests/commands/delete_bucket_tagging.sh | 2 - tests/commands/delete_object.sh | 2 - tests/commands/delete_object_tagging.sh | 1 - tests/commands/delete_objects.sh | 1 - tests/commands/get_bucket_acl.sh | 2 - tests/commands/get_bucket_location.sh | 4 - .../commands/get_bucket_ownership_controls.sh | 1 - tests/commands/get_bucket_policy.sh | 5 - tests/commands/get_bucket_tagging.sh | 2 - tests/commands/get_bucket_versioning.sh | 1 - tests/commands/get_object.sh | 3 - tests/commands/get_object_attributes.sh | 1 - tests/commands/get_object_legal_hold.sh | 2 - .../commands/get_object_lock_configuration.sh | 1 - tests/commands/get_object_retention.sh | 1 - tests/commands/get_object_tagging.sh | 1 - tests/commands/head_bucket.sh | 1 - tests/commands/head_object.sh | 1 - tests/commands/list_buckets.sh | 2 - tests/commands/list_multipart_uploads.sh | 3 - tests/commands/list_object_versions.sh | 1 - tests/commands/list_objects.sh | 1 - tests/commands/list_objects_v2.sh | 1 - tests/commands/list_parts.sh | 1 - tests/commands/put_bucket_acl.sh | 5 - .../commands/put_bucket_ownership_controls.sh | 1 - tests/commands/put_bucket_policy.sh | 2 - tests/commands/put_bucket_tagging.sh | 2 - tests/commands/put_bucket_versioning.sh | 1 - tests/commands/put_object.sh | 2 - tests/commands/put_object_legal_hold.sh | 2 - tests/commands/put_object_retention.sh | 1 - tests/commands/put_object_tagging.sh | 1 - tests/commands/select_object_content.sh | 1 - tests/commands/upload_part.sh | 1 - tests/commands/upload_part_copy.sh | 2 - tests/drivers/rest.sh | 1 - tests/report.sh | 95 ------------------- tests/setup.sh | 3 - 49 files changed, 2 insertions(+), 178 deletions(-) diff --git a/tests/.env.default b/tests/.env.default index 7b47c090..b3534c64 100644 --- a/tests/.env.default +++ b/tests/.env.default @@ -20,7 +20,6 @@ USERS_FOLDER=$PWD/iam IAM_TYPE=folder DIRECT=false #DIRECT_DISPLAY_NAME= -#COVERAGE_DB=coverage.sql USERNAME_ONE=ABCDEFG PASSWORD_ONE=HIJKLMN USERNAME_TWO=HIJKLMN diff --git a/tests/.env.docker.default b/tests/.env.docker.default index 2ac04636..2db70f26 100644 --- a/tests/.env.docker.default +++ b/tests/.env.docker.default @@ -18,7 +18,6 @@ USERS_FOLDER=$PWD/iam IAM_TYPE=folder DIRECT=false #DIRECT_DISPLAY_NAME= -#COVERAGE_DB=coverage.sql USERNAME_ONE=ABCDEFG PASSWORD_ONE=HIJKLMN USERNAME_TWO=HIJKLMN diff --git a/tests/README.md b/tests/README.md index 30d18d25..870b85f4 100644 --- a/tests/README.md +++ b/tests/README.md @@ -155,8 +155,6 @@ A single instance can be run with `docker-compose -f docker-compose-bats.yml up **DIRECT_AWS_USER_ID**: AWS policy 12-digit user ID if **DIRECT** is set to **true**. -**COVERAGE_DB**: database to store client command coverage info and usage counts, if using. - **USERNAME_ONE**, **PASSWORD_ONE**, **USERNAME_TWO**, **PASSWORD_TWO**: setup_user (v1), credentials for users created and tested for non-root user **versitygw** operations (non-setup_user_v2). **TEST_FILE_FOLDER**: where to put temporary test files. @@ -189,6 +187,8 @@ A single instance can be run with `docker-compose -f docker-compose-bats.yml up **MAX_OPENSSL_COMMAND_LOG_BYTES**: number of OpenSSL command bytes to display in command log, can prevent the display of too many chars in the case of large payload commands, -1 means display whole command +**COVERAGE_LOG**: if set, where to write test or test suite coverage data + ## REST Scripts REST scripts are included for calls to S3's REST API in the `./tests/rest_scripts/` folder. To call a script, the following parameters are needed: diff --git a/tests/commands/abort_multipart_upload.sh b/tests/commands/abort_multipart_upload.sh index ad0085ca..ea089e99 100644 --- a/tests/commands/abort_multipart_upload.sh +++ b/tests/commands/abort_multipart_upload.sh @@ -15,7 +15,6 @@ # under the License. abort_multipart_upload() { - record_command "abort-multipart-upload" "client:s3api" if [ $# -ne 3 ]; then log 2 "'abort multipart upload' command requires bucket, key, upload ID" return 1 @@ -47,7 +46,6 @@ abort_multipart_upload_with_user() { log 2 "'abort multipart upload' command requires bucket, key, upload ID, username, password" return 1 fi - record_command "abort-multipart-upload" "client:s3api" if ! abort_multipart_upload_error=$(AWS_ACCESS_KEY_ID="$4" AWS_SECRET_ACCESS_KEY="$5" send_command aws --no-verify-ssl s3api abort-multipart-upload --bucket "$1" --key "$2" --upload-id "$3" 2>&1); then log 2 "Error aborting upload: $abort_multipart_upload_error" export abort_multipart_upload_error diff --git a/tests/commands/complete_multipart_upload.sh b/tests/commands/complete_multipart_upload.sh index 04ea7b64..62f90415 100644 --- a/tests/commands/complete_multipart_upload.sh +++ b/tests/commands/complete_multipart_upload.sh @@ -20,7 +20,6 @@ complete_multipart_upload() { return 1 fi log 5 "complete multipart upload id: $3, parts: $4" - record_command "complete-multipart-upload" "client:s3api" error=$(send_command aws --no-verify-ssl s3api complete-multipart-upload --bucket "$1" --key "$2" --upload-id "$3" --multipart-upload '{"Parts": '"$4"'}' 2>&1) || local completed=$? if [[ $completed -ne 0 ]]; then log 2 "error completing multipart upload: $error" diff --git a/tests/commands/copy_object.sh b/tests/commands/copy_object.sh index 614714c5..e5a5548c 100644 --- a/tests/commands/copy_object.sh +++ b/tests/commands/copy_object.sh @@ -21,7 +21,6 @@ copy_object() { fi local exit_code=0 local error - record_command "copy-object" "client:$1" if [[ $1 == 's3' ]]; then error=$(send_command aws --no-verify-ssl s3 cp "$2" s3://"$3/$4" 2>&1) || exit_code=$? elif [[ $1 == 's3api' ]]; then @@ -44,7 +43,6 @@ copy_object() { } copy_object_empty() { - record_command "copy-object" "client:s3api" error=$(send_command aws --no-verify-ssl s3api copy-object 2>&1) || local result=$? if [[ $result -eq 0 ]]; then log 2 "copy object with empty parameters returned no error" diff --git a/tests/commands/create_bucket.sh b/tests/commands/create_bucket.sh index 9f20fa2b..1d2363d0 100644 --- a/tests/commands/create_bucket.sh +++ b/tests/commands/create_bucket.sh @@ -25,7 +25,6 @@ create_bucket() { return 1 fi - record_command "create-bucket" "client:$1" local exit_code=0 local error if [[ $1 == 's3' ]]; then @@ -98,7 +97,6 @@ create_bucket_with_user() { create_bucket_object_lock_enabled() { log 6 "create_bucket_object_lock_enabled" - record_command "create-bucket" "client:s3api" if ! check_param_count "create_bucket_object_lock_enabled" "bucket" 1 $#; then return 1 fi diff --git a/tests/commands/create_multipart_upload.sh b/tests/commands/create_multipart_upload.sh index 6f521afa..70d56fb0 100644 --- a/tests/commands/create_multipart_upload.sh +++ b/tests/commands/create_multipart_upload.sh @@ -41,7 +41,6 @@ create_multipart_upload_rest_with_checksum_type_and_algorithm_error() { } create_multipart_upload_s3api() { - record_command "create-multipart-upload" "client:s3api" if ! check_param_count_v2 "bucket, key" 2 $#; then return 1 fi @@ -83,7 +82,6 @@ create_multipart_upload_s3api_custom() { } create_multipart_upload_s3api_params() { - record_command "create-multipart-upload" "client:s3api" if ! check_param_count_v2 "bucket, key, content type, metadata, object lock legal hold status, \ object lock mode, object lock retain until date, and tagging" 8 $#; then return 1 @@ -108,7 +106,6 @@ create_multipart_upload_s3api_params() { } create_multipart_upload_s3api_with_user() { - record_command "create-multipart-upload" "client:s3api" if ! check_param_count_v2 "bucket, key, username, password" 4 $#; then return 1 fi diff --git a/tests/commands/delete_bucket.sh b/tests/commands/delete_bucket.sh index bdf80d29..63e9bcc4 100644 --- a/tests/commands/delete_bucket.sh +++ b/tests/commands/delete_bucket.sh @@ -18,7 +18,6 @@ # fail if params are bad, or bucket exists and user is unable to delete bucket delete_bucket() { log 6 "delete_bucket" - record_command "delete-bucket" "client:$1" if [ $# -ne 2 ]; then log 2 "'delete_bucket' command requires client, bucket" return 1 diff --git a/tests/commands/delete_bucket_policy.sh b/tests/commands/delete_bucket_policy.sh index 38333b6e..5e47d422 100644 --- a/tests/commands/delete_bucket_policy.sh +++ b/tests/commands/delete_bucket_policy.sh @@ -15,7 +15,6 @@ # under the License. delete_bucket_policy() { - record_command "delete-bucket-policy" "client:$1" if [[ $# -ne 2 ]]; then log 2 "delete bucket policy command requires command type, bucket" return 1 @@ -54,7 +53,6 @@ delete_bucket_policy_rest() { } delete_bucket_policy_with_user() { - record_command "delete-bucket-policy" "client:s3api" if [[ $# -ne 3 ]]; then log 2 "'delete bucket policy with user' command requires bucket, username, password" return 1 diff --git a/tests/commands/delete_bucket_tagging.sh b/tests/commands/delete_bucket_tagging.sh index b1301eaa..220e303b 100644 --- a/tests/commands/delete_bucket_tagging.sh +++ b/tests/commands/delete_bucket_tagging.sh @@ -15,7 +15,6 @@ # under the License. delete_bucket_tagging() { - record_command "delete-bucket-tagging" "client:$1" if [ $# -ne 2 ]; then log 2 "delete bucket tagging command missing command type, bucket name" return 1 @@ -38,7 +37,6 @@ delete_bucket_tagging() { delete_bucket_tagging_with_user() { log 6 "delete_bucket_tagging_with_user" - record_command "delete-bucket-tagging" "client:s3api" if [ $# -ne 3 ]; then log 2 "delete bucket tagging command missing username, password, bucket name" return 1 diff --git a/tests/commands/delete_object.sh b/tests/commands/delete_object.sh index 6f7d7da2..ce4551ab 100644 --- a/tests/commands/delete_object.sh +++ b/tests/commands/delete_object.sh @@ -17,7 +17,6 @@ # params: client, bucket, key delete_object() { log 6 "delete_object" - record_command "delete-object" "client:$1" if ! check_param_count "delete_object" "command type, bucket, key" 3 $#; then return 1 fi @@ -124,7 +123,6 @@ delete_object_version_rest_bypass_retention() { } delete_object_with_user() { - record_command "delete-object" "client:$1" if ! check_param_count "delete_object_version_bypass_retention" "command type, bucket, key, access ID, secret key" 5 $#; then return 1 fi diff --git a/tests/commands/delete_object_tagging.sh b/tests/commands/delete_object_tagging.sh index 78a21e93..e589cf78 100644 --- a/tests/commands/delete_object_tagging.sh +++ b/tests/commands/delete_object_tagging.sh @@ -15,7 +15,6 @@ # under the License. delete_object_tagging() { - record_command "delete-object-tagging" "client:$1" if [[ $# -ne 3 ]]; then log 2 "delete object tagging command missing command type, bucket, key" return 1 diff --git a/tests/commands/delete_objects.sh b/tests/commands/delete_objects.sh index 0f1bbf24..77ee0465 100644 --- a/tests/commands/delete_objects.sh +++ b/tests/commands/delete_objects.sh @@ -15,7 +15,6 @@ # under the License. delete_objects() { - record_command "delete-objects" "client:s3api" if [[ $# -ne 3 ]]; then log 2 "'delete-objects' command requires bucket name, two object keys" return 1 diff --git a/tests/commands/get_bucket_acl.sh b/tests/commands/get_bucket_acl.sh index b7f253c8..4d5eb657 100644 --- a/tests/commands/get_bucket_acl.sh +++ b/tests/commands/get_bucket_acl.sh @@ -15,7 +15,6 @@ # under the License. get_bucket_acl() { - record_command "get-bucket-acl" "client:$1" if [ $# -ne 2 ]; then log 2 "bucket ACL command missing command type, bucket name" return 1 @@ -37,7 +36,6 @@ get_bucket_acl() { } get_bucket_acl_with_user() { - record_command "get-bucket-acl" "client:s3api" if [ $# -ne 3 ]; then log 2 "'get bucket ACL with user' command requires bucket name, username, password" return 1 diff --git a/tests/commands/get_bucket_location.sh b/tests/commands/get_bucket_location.sh index 7b3f15f5..a0b030b5 100644 --- a/tests/commands/get_bucket_location.sh +++ b/tests/commands/get_bucket_location.sh @@ -15,7 +15,6 @@ # under the License. get_bucket_location() { - record_command "get-bucket-location" "client:$1" if [[ $# -ne 2 ]]; then log 2 "get bucket location command requires command type, bucket name" return 1 @@ -42,7 +41,6 @@ get_bucket_location() { } get_bucket_location_aws() { - record_command "get-bucket-location" "client:s3api" if [[ $# -ne 1 ]]; then log 2 "get bucket location (aws) requires bucket name" return 1 @@ -57,7 +55,6 @@ get_bucket_location_aws() { } get_bucket_location_s3cmd() { - record_command "get-bucket-location" "client:s3cmd" if [[ $# -ne 1 ]]; then echo "get bucket location (s3cmd) requires bucket name" return 1 @@ -73,7 +70,6 @@ get_bucket_location_s3cmd() { } get_bucket_location_mc() { - record_command "get-bucket-location" "client:mc" if ! check_param_count_v2 "bucket name" 1 $#; then return 1 fi diff --git a/tests/commands/get_bucket_ownership_controls.sh b/tests/commands/get_bucket_ownership_controls.sh index 18bd67d2..be112dd7 100644 --- a/tests/commands/get_bucket_ownership_controls.sh +++ b/tests/commands/get_bucket_ownership_controls.sh @@ -20,7 +20,6 @@ get_bucket_ownership_controls() { return 0 fi - record_command "get-bucket-ownership-controls" "client:s3api" if [[ $# -ne 1 ]]; then log 2 "'get bucket ownership controls' command requires bucket name" return 1 diff --git a/tests/commands/get_bucket_policy.sh b/tests/commands/get_bucket_policy.sh index 301e6a8b..a9ec1687 100644 --- a/tests/commands/get_bucket_policy.sh +++ b/tests/commands/get_bucket_policy.sh @@ -16,7 +16,6 @@ get_bucket_policy() { log 6 "get_bucket_policy '$1' '$2'" - record_command "get-bucket-policy" "client:$1" if ! check_param_count "get_bucket_policy" "command type, bucket" 2 $#; then return 1 fi @@ -42,7 +41,6 @@ get_bucket_policy() { get_bucket_policy_s3api() { log 6 "get_bucket_policy_s3api '$1'" - record_command "get-bucket-policy" "client:s3api" if ! check_param_count "get_bucket_policy_s3api" "bucket" 1 $#; then return 1 fi @@ -63,7 +61,6 @@ get_bucket_policy_s3api() { } get_bucket_policy_with_user() { - record_command "get-bucket-policy" "client:s3api" if ! check_param_count "get_bucket_policy_with_user" "bucket, username, password" 3 $#; then return 1 fi @@ -82,7 +79,6 @@ get_bucket_policy_with_user() { } get_bucket_policy_s3cmd() { - record_command "get-bucket-policy" "client:s3cmd" if ! check_param_count "get_bucket_policy_s3cmd" "bucket" 1 $#; then return 1 fi @@ -167,7 +163,6 @@ search_for_first_policy_line_or_full_policy() { } get_bucket_policy_mc() { - record_command "get-bucket-policy" "client:mc" if ! check_param_count "get_bucket_policy_mc" "bucket" 1 $#; then return 1 fi diff --git a/tests/commands/get_bucket_tagging.sh b/tests/commands/get_bucket_tagging.sh index eda69afb..dbea39a0 100644 --- a/tests/commands/get_bucket_tagging.sh +++ b/tests/commands/get_bucket_tagging.sh @@ -19,7 +19,6 @@ get_bucket_tagging() { log 6 "get_bucket_tagging" assert [ $# -eq 2 ] - record_command "get-bucket-tagging" "client:$1" local result if [[ $1 == 's3api' ]]; then tags=$(send_command aws --no-verify-ssl s3api get-bucket-tagging --bucket "$2" 2>&1) || result=$? @@ -47,7 +46,6 @@ get_bucket_tagging_with_user() { log 2 "'get_bucket_tagging_with_user' command requires ID, key, bucket" return 1 fi - record_command "get-bucket-tagging" "client:s3api" local result if ! tags=$(AWS_ACCESS_KEY_ID="$1" AWS_SECRET_ACCESS_KEY="$2" send_command aws --no-verify-ssl s3api get-bucket-tagging --bucket "$3" 2>&1); then log 5 "tags error: $tags" diff --git a/tests/commands/get_bucket_versioning.sh b/tests/commands/get_bucket_versioning.sh index debc49ab..4ceadf8a 100644 --- a/tests/commands/get_bucket_versioning.sh +++ b/tests/commands/get_bucket_versioning.sh @@ -15,7 +15,6 @@ # under the License. get_bucket_versioning() { - record_command "get-bucket-versioning" "client:s3api" if [[ $# -ne 2 ]]; then log 2 "get bucket versioning command requires command type, bucket name" return 1 diff --git a/tests/commands/get_object.sh b/tests/commands/get_object.sh index 36c70b44..73329ed6 100644 --- a/tests/commands/get_object.sh +++ b/tests/commands/get_object.sh @@ -16,7 +16,6 @@ get_object() { log 6 "get_object" - record_command "get-object" "client:$1" if [ $# -ne 4 ]; then log 2 "get object command requires command type, bucket, key, destination" return 1 @@ -45,7 +44,6 @@ get_object() { } get_object_with_range() { - record_command "get-object" "client:s3api" if [[ $# -ne 4 ]]; then log 2 "'get object with range' requires bucket, key, range, outfile" return 1 @@ -59,7 +57,6 @@ get_object_with_range() { get_object_with_user() { log 6 "get_object_with_user" - record_command "get-object" "client:$1" if [ $# -ne 6 ]; then log 2 "'get object with user' command requires command type, bucket, key, save location, aws ID, aws secret key" return 1 diff --git a/tests/commands/get_object_attributes.sh b/tests/commands/get_object_attributes.sh index 7591b222..cc53ebcd 100644 --- a/tests/commands/get_object_attributes.sh +++ b/tests/commands/get_object_attributes.sh @@ -15,7 +15,6 @@ # under the License. get_object_attributes() { - record_command "get-object-attributes" "client:s3api" if [[ $# -ne 2 ]]; then log 2 "'get object attributes' command requires bucket, key" return 1 diff --git a/tests/commands/get_object_legal_hold.sh b/tests/commands/get_object_legal_hold.sh index d9cc9769..0c5c9a98 100644 --- a/tests/commands/get_object_legal_hold.sh +++ b/tests/commands/get_object_legal_hold.sh @@ -19,7 +19,6 @@ get_object_legal_hold() { log 2 "'get object legal hold' command requires bucket, key" return 1 fi - record_command "get-object-legal-hold" "client:s3api" legal_hold=$(send_command aws --no-verify-ssl s3api get-object-legal-hold --bucket "$1" --key "$2" 2>&1) || local get_result=$? if [[ $get_result -ne 0 ]]; then log 2 "error getting object legal hold: $legal_hold" @@ -49,7 +48,6 @@ get_object_legal_hold_version_id() { log 2 "'get_object_legal_hold_version_id' command requires bucket, key, version id" return 1 fi - record_command "get-object-legal-hold" "client:s3api" if ! legal_hold=$(send_command aws --no-verify-ssl s3api get-object-legal-hold --bucket "$1" --key "$2" --version-id "$3" 2>&1); then log 2 "error getting object legal hold w/version id: $legal_hold" return 1 diff --git a/tests/commands/get_object_lock_configuration.sh b/tests/commands/get_object_lock_configuration.sh index 6ecc0be4..d4394412 100644 --- a/tests/commands/get_object_lock_configuration.sh +++ b/tests/commands/get_object_lock_configuration.sh @@ -17,7 +17,6 @@ source ./tests/drivers/params.sh get_object_lock_configuration() { - record_command "get-object-lock-configuration" "client:s3api" if ! check_param_count "get_object_lock_configuration" "client, bucket name" 2 $#; then return 1 fi diff --git a/tests/commands/get_object_retention.sh b/tests/commands/get_object_retention.sh index bb4ffff4..53c38397 100644 --- a/tests/commands/get_object_retention.sh +++ b/tests/commands/get_object_retention.sh @@ -15,7 +15,6 @@ # under the License. get_object_retention() { - record_command "get-object-retention" "client:s3api" if [[ $# -ne 2 ]]; then log 2 "'get object retention' command requires bucket, key" return 1 diff --git a/tests/commands/get_object_tagging.sh b/tests/commands/get_object_tagging.sh index 3df51ec5..4ac85a6f 100644 --- a/tests/commands/get_object_tagging.sh +++ b/tests/commands/get_object_tagging.sh @@ -15,7 +15,6 @@ # under the License. get_object_tagging() { - record_command "get-object-tagging" "client:$1" if [ $# -ne 3 ]; then log 2 "get object tag command missing command type, bucket, and/or key" return 1 diff --git a/tests/commands/head_bucket.sh b/tests/commands/head_bucket.sh index a42e5736..d15b4f53 100644 --- a/tests/commands/head_bucket.sh +++ b/tests/commands/head_bucket.sh @@ -23,7 +23,6 @@ source ./tests/report.sh # 2 - misc error head_bucket() { log 6 "head_bucket '$1' '$2'" - record_command "head-bucket" "client:$1" if ! check_param_count "head_bucket" "client, bucket name" 2 $#; then return 1 fi diff --git a/tests/commands/head_object.sh b/tests/commands/head_object.sh index 4ea9a355..53363d0a 100644 --- a/tests/commands/head_object.sh +++ b/tests/commands/head_object.sh @@ -15,7 +15,6 @@ # under the License. head_object() { - record_command "head-object" "client:$1" if [ $# -ne 3 ]; then log 2 "head-object missing command, bucket name, object name" return 2 diff --git a/tests/commands/list_buckets.sh b/tests/commands/list_buckets.sh index 6fb6a1e3..d644bd90 100644 --- a/tests/commands/list_buckets.sh +++ b/tests/commands/list_buckets.sh @@ -16,7 +16,6 @@ list_buckets() { log 6 "list_buckets" - record_command "list-buckets" "client:$1" if [ $# -ne 1 ]; then log 2 "list buckets command missing command type" return 1 @@ -55,7 +54,6 @@ list_buckets() { } list_buckets_with_user() { - record_command "list-buckets" "client:$1" if [ $# -ne 3 ]; then log 2 "'list buckets as user' command missing command type, username, password" return 1 diff --git a/tests/commands/list_multipart_uploads.sh b/tests/commands/list_multipart_uploads.sh index fecac844..37eb9da5 100644 --- a/tests/commands/list_multipart_uploads.sh +++ b/tests/commands/list_multipart_uploads.sh @@ -15,7 +15,6 @@ # under the License. list_multipart_uploads() { - record_command "list-multipart-uploads" "client:s3api" if [[ $# -ne 1 ]]; then log 2 "'list multipart uploads' command requires bucket name" return 1 @@ -27,7 +26,6 @@ list_multipart_uploads() { } list_multipart_uploads_rest() { - record_command "list_multipart_uploads_rest" "client:rest" if ! check_param_count "list_multipart_upload_rest" "bucket" 1 $#; then return 1 fi @@ -44,7 +42,6 @@ list_multipart_uploads_rest() { } list_multipart_uploads_with_user() { - record_command "list-multipart-uploads" "client:s3api" if [[ $# -ne 3 ]]; then log 2 "'list multipart uploads' command requires bucket name, username, password" return 1 diff --git a/tests/commands/list_object_versions.sh b/tests/commands/list_object_versions.sh index f9ee9200..6f5d73ac 100644 --- a/tests/commands/list_object_versions.sh +++ b/tests/commands/list_object_versions.sh @@ -15,7 +15,6 @@ # under the License. list_object_versions() { - record_command "list-object-versions" "client:s3api" if ! check_param_count "list_object_versions" "client, bucket name" 2 $#; then return 1 fi diff --git a/tests/commands/list_objects.sh b/tests/commands/list_objects.sh index 6c9e5862..a4ff2480 100644 --- a/tests/commands/list_objects.sh +++ b/tests/commands/list_objects.sh @@ -21,7 +21,6 @@ source ./tests/commands/command.sh # return 0 if able to list, 1 if not list_objects() { log 6 "list_objects" - record_command "list-objects" "client:$1" if ! check_param_count "list_object" "client, bucket" 2 $#; then return 1 fi diff --git a/tests/commands/list_objects_v2.sh b/tests/commands/list_objects_v2.sh index 594253b2..4520a38b 100644 --- a/tests/commands/list_objects_v2.sh +++ b/tests/commands/list_objects_v2.sh @@ -22,7 +22,6 @@ list_objects_v2() { log 2 "list objects command missing bucket and/or path" return 1 fi - record_command "list-objects-v2 client:s3api" objects=$(send_command aws --no-verify-ssl s3api list-objects-v2 --bucket "$1") || local result=$? if [[ $result -ne 0 ]]; then log 2 "error listing objects: $objects" diff --git a/tests/commands/list_parts.sh b/tests/commands/list_parts.sh index 8cb944c2..93b4a720 100644 --- a/tests/commands/list_parts.sh +++ b/tests/commands/list_parts.sh @@ -31,7 +31,6 @@ list_parts_with_user() { log 2 "'list_parts_with_user' requires username, password, bucket, key, upload ID" return 1 fi - record_command 'list-parts' 'client:s3api' if ! listed_parts=$(AWS_ACCESS_KEY_ID="$1" AWS_SECRET_ACCESS_KEY="$2" send_command aws --no-verify-ssl s3api list-parts --bucket "$3" --key "$4" --upload-id "$5" 2>&1); then log 2 "Error listing multipart upload parts: $listed_parts" return 1 diff --git a/tests/commands/put_bucket_acl.sh b/tests/commands/put_bucket_acl.sh index 0ebfad02..7ac6f34d 100644 --- a/tests/commands/put_bucket_acl.sh +++ b/tests/commands/put_bucket_acl.sh @@ -21,7 +21,6 @@ source ./tests/drivers/rest.sh put_bucket_acl_s3api() { log 6 "put_bucket_acl_s3api" - record_command "put-bucket-acl" "client:s3api" if [[ $# -ne 2 ]]; then log 2 "put bucket acl command requires bucket name, acl file" return 1 @@ -36,7 +35,6 @@ put_bucket_acl_s3api() { put_bucket_acl_s3api_with_user() { log 6 "put_bucket_acl_s3api_with_user" - record_command "put-bucket-acl" "client:s3api" if [[ $# -ne 4 ]]; then log 2 "put bucket acl command requires bucket name, acl file, username, password" return 1 @@ -78,7 +76,6 @@ reset_bucket_acl() { } put_bucket_canned_acl_s3cmd() { - record_command "put-bucket-acl" "client:s3cmd" if [[ $# -ne 2 ]]; then log 2 "put bucket acl command requires bucket name, permission" return 1 @@ -95,7 +92,6 @@ put_bucket_canned_acl() { log 2 "'put bucket canned acl' command requires bucket name, canned ACL" return 1 fi - record_command "put-bucket-acl" "client:s3api" if ! error=$(send_command aws --no-verify-ssl s3api put-bucket-acl --bucket "$1" --acl "$2" 2>&1); then log 2 "error re-setting bucket acls: $error" return 1 @@ -108,7 +104,6 @@ put_bucket_canned_acl_with_user() { log 2 "'put bucket canned acl with user' command requires bucket name, canned ACL, username, password" return 1 fi - record_command "put-bucket-acl" "client:s3api" if ! error=$(AWS_ACCESS_KEY_ID="$3" AWS_SECRET_ACCESS_KEY="$4" send_command aws --no-verify-ssl s3api put-bucket-acl --bucket "$1" --acl "$2" 2>&1); then log 2 "error re-setting bucket acls: $error" return 1 diff --git a/tests/commands/put_bucket_ownership_controls.sh b/tests/commands/put_bucket_ownership_controls.sh index a93ec8ab..435a8b10 100644 --- a/tests/commands/put_bucket_ownership_controls.sh +++ b/tests/commands/put_bucket_ownership_controls.sh @@ -26,7 +26,6 @@ put_bucket_ownership_controls() { log 2 "'put_bucket_ownership_controls' requires bucket name, rule" return 1 fi - record_command "put-bucket-ownership-controls" "client:s3api" if ! error=$(send_command aws --no-verify-ssl s3api put-bucket-ownership-controls --bucket "$1" --ownership-controls="Rules=[{ObjectOwnership=$2}]" 2>&1); then log 2 "error putting bucket ownership controls: $error" return 1 diff --git a/tests/commands/put_bucket_policy.sh b/tests/commands/put_bucket_policy.sh index 9b60691a..0b22596e 100644 --- a/tests/commands/put_bucket_policy.sh +++ b/tests/commands/put_bucket_policy.sh @@ -18,7 +18,6 @@ source ./tests/drivers/params.sh put_bucket_policy() { log 6 "put_bucket_policy '$1' '$2' '$3'" - record_command "put-bucket-policy" "client:$1" if ! check_param_count "put_bucket_policy" "command type, bucket, policy file" 3 $#; then return 1 fi @@ -50,7 +49,6 @@ put_bucket_policy() { } put_bucket_policy_with_user() { - record_command "put-bucket-policy" "client:s3api" if ! check_param_count "put_bucket_policy_with_user" "bucket, policy file, username, password" 4 $#; then return 1 fi diff --git a/tests/commands/put_bucket_tagging.sh b/tests/commands/put_bucket_tagging.sh index 95581812..a5602b3c 100644 --- a/tests/commands/put_bucket_tagging.sh +++ b/tests/commands/put_bucket_tagging.sh @@ -22,7 +22,6 @@ put_bucket_tagging() { fi local error local result=0 - record_command "put-bucket-tagging" "client:$1" if [[ $1 == 's3api' ]]; then error=$(send_command aws --no-verify-ssl s3api put-bucket-tagging --bucket "$2" --tagging "TagSet=[{Key=$3,Value=$4}]") || result=$? elif [[ $1 == 'mc' ]]; then @@ -41,7 +40,6 @@ put_bucket_tagging() { put_bucket_tagging_with_user() { log 6 "put_bucket_tagging_with_user" assert [ $# -eq 5 ] - record_command "put-bucket-tagging" "client:$1" if ! error=$(AWS_ACCESS_KEY_ID="$4" AWS_SECRET_ACCESS_KEY="$5" send_command aws --no-verify-ssl s3api put-bucket-tagging --bucket "$1" --tagging "TagSet=[{Key=$2,Value=$3}]"); then log 2 "error putting bucket tagging: $error" return 1 diff --git a/tests/commands/put_bucket_versioning.sh b/tests/commands/put_bucket_versioning.sh index 910cfcbb..a36156a6 100644 --- a/tests/commands/put_bucket_versioning.sh +++ b/tests/commands/put_bucket_versioning.sh @@ -15,7 +15,6 @@ # under the License. put_bucket_versioning() { - record_command "put-bucket-versioning" "client:s3api" if [[ $# -ne 3 ]]; then log 2 "put bucket versioning command requires command type, bucket name, 'Enabled' or 'Suspended'" return 1 diff --git a/tests/commands/put_object.sh b/tests/commands/put_object.sh index 95519b34..86482996 100644 --- a/tests/commands/put_object.sh +++ b/tests/commands/put_object.sh @@ -18,7 +18,6 @@ source ./tests/report.sh put_object() { log 6 "put_object" - record_command "put-object" "client:$1" if [ $# -ne 4 ]; then log 2 "put object command requires command type, source, destination bucket, destination key" return 1 @@ -48,7 +47,6 @@ put_object() { } put_object_with_user() { - record_command "put-object" "client:$1" if [ $# -ne 6 ]; then log 2 "put object command requires command type, source, destination bucket, destination key, aws ID, aws secret key" return 1 diff --git a/tests/commands/put_object_legal_hold.sh b/tests/commands/put_object_legal_hold.sh index 5bf71913..d7e68eb3 100644 --- a/tests/commands/put_object_legal_hold.sh +++ b/tests/commands/put_object_legal_hold.sh @@ -15,7 +15,6 @@ # under the License. put_object_legal_hold() { - record_command "put-object-legal-hold" "client:s3api" if ! check_param_count "put_object_legal_hold" "client, bucket, key, hold status ('ON' or 'OFF')" 4 $#; then return 1 fi @@ -49,7 +48,6 @@ put_object_legal_hold_rest() { } put_object_legal_hold_version_id() { - record_command "put-object-legal-hold" "client:s3api" if ! check_param_count "put_object_legal_hold_version_id" "bucket, key, version ID, hold status ('ON' or 'OFF')" 4 $#; then return 1 fi diff --git a/tests/commands/put_object_retention.sh b/tests/commands/put_object_retention.sh index eeb04830..c63ac086 100644 --- a/tests/commands/put_object_retention.sh +++ b/tests/commands/put_object_retention.sh @@ -15,7 +15,6 @@ # under the License. put_object_retention() { - record_command "put-object-retention" "client:s3api" if [[ $# -ne 4 ]]; then log 2 "'put object retention' command requires bucket, key, retention mode, retention date" return 1 diff --git a/tests/commands/put_object_tagging.sh b/tests/commands/put_object_tagging.sh index f694c30f..a08dabae 100644 --- a/tests/commands/put_object_tagging.sh +++ b/tests/commands/put_object_tagging.sh @@ -22,7 +22,6 @@ put_object_tagging() { fi local error local result - record_command "put-object-tagging" "client:$1" if [[ $1 == 's3api' ]]; then error=$(send_command aws --no-verify-ssl s3api put-object-tagging --bucket "$2" --key "$3" --tagging "TagSet=[{Key=$4,Value=$5}]" 2>&1) || result=$? elif [[ $1 == 'mc' ]]; then diff --git a/tests/commands/select_object_content.sh b/tests/commands/select_object_content.sh index a10e0368..3b3ed14c 100644 --- a/tests/commands/select_object_content.sh +++ b/tests/commands/select_object_content.sh @@ -15,7 +15,6 @@ # under the License. select_object_content() { - record_command "select-object-content" "client:s3api" if [[ $# -ne 7 ]]; then log 2 "'select object content' command requires bucket, key, expression, expression type, input serialization, output serialization, outfile" return 1 diff --git a/tests/commands/upload_part.sh b/tests/commands/upload_part.sh index 23da052d..31bbd1d2 100644 --- a/tests/commands/upload_part.sh +++ b/tests/commands/upload_part.sh @@ -32,7 +32,6 @@ upload_part_with_user() { return 1 fi local etag_json - record_command "upload-part" "client:s3api" if ! etag_json=$(AWS_ACCESS_KEY_ID="$6" AWS_SECRET_ACCESS_KEY="$7" send_command aws --no-verify-ssl s3api upload-part --bucket "$1" --key "$2" --upload-id "$3" --part-number "$5" --body "$4-$(($5-1))" 2>&1); then log 2 "Error uploading part $5: $etag_json" return 1 diff --git a/tests/commands/upload_part_copy.sh b/tests/commands/upload_part_copy.sh index 4314dde5..f6a638cd 100644 --- a/tests/commands/upload_part_copy.sh +++ b/tests/commands/upload_part_copy.sh @@ -15,7 +15,6 @@ # under the License. upload_part_copy() { - record_command "upload-part-copy" "client:s3api" if [ $# -ne 5 ]; then log 2 "upload multipart part copy function must have bucket, key, upload ID, file name, part number" return 1 @@ -32,7 +31,6 @@ upload_part_copy() { } upload_part_copy_with_range() { - record_command "upload-part-copy" "client:s3api" if [ $# -ne 6 ]; then log 2 "upload multipart part copy function must have bucket, key, upload ID, file name, part number, range" return 1 diff --git a/tests/drivers/rest.sh b/tests/drivers/rest.sh index 957ecb65..33b51239 100644 --- a/tests/drivers/rest.sh +++ b/tests/drivers/rest.sh @@ -259,7 +259,6 @@ get_go_params() { if [[ "$param" == "--" ]]; then return 1 fi - log 5 "param: $param" echo "$param" done return 0 diff --git a/tests/report.sh b/tests/report.sh index e1a1ebda..cb91a5d8 100644 --- a/tests/report.sh +++ b/tests/report.sh @@ -16,101 +16,6 @@ source ./tests/drivers/params.sh -check_and_create_database() { - # Define SQL commands to create a table - SQL_CREATE_TABLE="CREATE TABLE IF NOT EXISTS entries ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - command TEXT NOT NULL, - client TEXT NOT NULL, - count INTEGER DEFAULT 1, - UNIQUE(command, client) - );" - -# Execute the SQL commands to create the database and table -sqlite3 "$COVERAGE_DB" <&1); then - log 2 "error in sqlite statement: $error" - fi -} - -record_result() { - if [ -z "$COVERAGE_DB" ]; then - log 5 "no coverage db set, not recording" - return 0 - fi - # Define SQL commands to create a table - SQL_CREATE_TABLE="CREATE TABLE IF NOT EXISTS results ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - command TEXT NOT NULL, - client TEXT, - count INTEGER, - pass INTEGER DEFAULT 1, - UNIQUE(command, client) - );" - # Execute the SQL commands to create the database and table - sqlite3 "$COVERAGE_DB" <> "$TIME_LOG" fi fi - if [[ -n "$COVERAGE_DB" ]]; then - record_result - fi if [[ "$BATS_TEST_COMPLETED" -ne 1 ]]; then if [[ -e "$COMMAND_LOG" ]]; then cat "$COMMAND_LOG"