~wombelix/aws-c-s3

ba258ea279f51319e2aa0b87a3546b94ccb0d9f7 — Dominik Wombacher 4 months ago 2c28e3d
tests: Disable 161 tests tat require an AWS account with S3 buckets set up in a particular way.
2 files changed, 231 insertions(+), 0 deletions(-)

A 0001-disable-tests-that-require-internet-connectivity.patch
M aws-c-s3.spec
A 0001-disable-tests-that-require-internet-connectivity.patch => 0001-disable-tests-that-require-internet-connectivity.patch +230 -0
@@ 0,0 1,230 @@
diff -urN a/tests/CMakeLists.txt b/tests/CMakeLists.txt
--- a/tests/CMakeLists.txt	2024-05-03 21:01:26.620815614 +0000
+++ b/tests/CMakeLists.txt	2024-05-03 21:16:48.939747211 +0000
@@ -37,119 +37,20 @@
 add_test_case(test_s3_update_meta_requests_trigger_prepare)
 add_test_case(test_s3_client_update_connections_finish_result)
 
-add_net_test_case(test_s3_client_exceed_retries)
-add_net_test_case(test_s3_client_acquire_connection_fail)
 add_net_test_case(test_s3_meta_request_fail_prepare_request)
 add_net_test_case(test_s3_meta_request_sign_request_fail)
-add_net_test_case(test_s3_meta_request_send_request_finish_fail)
-add_net_test_case(test_s3_auto_range_put_missing_upload_id)
 
 add_net_test_case(test_s3_cancel_mpu_create_not_sent)
-add_net_test_case(test_s3_cancel_mpu_create_completed)
-add_net_test_case(test_s3_cancel_mpu_one_part_completed)
-add_net_test_case(test_s3_cancel_mpu_one_part_completed_async)
-add_net_test_case(test_s3_cancel_mpu_all_parts_completed)
-add_net_test_case(test_s3_cancel_mpu_cancellable_requests)
-add_net_test_case(test_s3_pause_mpu_cancellable_requests)
 add_net_test_case(test_s3_cancel_mpd_nothing_sent)
 add_net_test_case(test_s3_cancel_mpd_one_part_sent)
-add_net_test_case(test_s3_cancel_mpd_one_part_completed)
-add_net_test_case(test_s3_cancel_mpd_two_parts_completed)
-add_net_test_case(test_s3_cancel_mpd_head_object_sent)
-add_net_test_case(test_s3_cancel_mpd_head_object_completed)
-add_net_test_case(test_s3_cancel_mpd_empty_object_get_with_part_number_1_sent)
-add_net_test_case(test_s3_cancel_mpd_empty_object_get_with_part_number_1_completed)
-add_net_test_case(test_s3_cancel_mpd_pending_streaming)
-add_net_test_case(test_s3_cancel_prepare)
-
-add_net_test_case(test_s3_get_object_tls_disabled)
-add_net_test_case(test_s3_get_object_tls_enabled)
-add_net_test_case(test_s3_get_object_tls_default)
-add_net_test_case(test_s3_get_object_less_than_part_size)
-add_net_test_case(test_s3_get_object_empty_object)
-add_net_test_case(test_s3_get_object_multiple)
-add_net_test_case(test_s3_get_object_multiple_serial)
-add_net_test_case(test_s3_get_object_sse_kms)
-add_net_test_case(test_s3_get_object_sse_aes256)
-add_net_test_case(test_s3_get_object_backpressure_small_increments)
-add_net_test_case(test_s3_get_object_backpressure_big_increments)
-add_net_test_case(test_s3_get_object_backpressure_initial_size_zero)
-add_net_test_case(test_s3_get_object_part)
-add_net_test_case(test_s3_no_signing)
-add_net_test_case(test_s3_signing_override)
-add_net_test_case(test_s3_put_object_tls_disabled)
-add_net_test_case(test_s3_put_object_tls_enabled)
-add_net_test_case(test_s3_put_object_tls_default)
-add_net_test_case(test_s3_multipart_put_object_with_acl)
-add_net_test_case(test_s3_put_object_multiple)
-add_net_test_case(test_s3_put_object_multiple_with_filepath)
-add_net_test_case(test_s3_put_object_less_than_part_size)
-add_net_test_case(test_s3_put_object_less_than_part_size_with_content_encoding)
-add_net_test_case(test_s3_put_object_mpu_with_content_encoding)
-add_net_test_case(test_s3_put_object_multipart_threshold)
-add_net_test_case(test_s3_put_object_multipart_threshold_less_than_part_size)
-add_net_test_case(test_s3_put_object_empty_object)
-add_net_test_case(test_s3_put_object_with_part_remainder)
-add_net_test_case(test_s3_put_object_sse_kms)
-add_net_test_case(test_s3_put_object_sse_kms_multipart)
-add_net_test_case(test_s3_put_object_sse_aes256)
-add_net_test_case(test_s3_put_object_sse_aes256_multipart)
-add_net_test_case(test_s3_put_object_sse_c_aes256_multipart)
-add_net_test_case(test_s3_put_object_sse_c_aes256_multipart_with_checksum)
-add_net_test_case(test_s3_put_object_singlepart_no_content_md5_enabled)
-add_net_test_case(test_s3_put_object_singlepart_no_content_md5_disabled)
-add_net_test_case(test_s3_put_object_singlepart_correct_content_md5_enabled)
-add_net_test_case(test_s3_put_object_singlepart_correct_content_md5_disabled)
-add_net_test_case(test_s3_put_object_singlepart_incorrect_content_md5_enabled)
-add_net_test_case(test_s3_put_object_singlepart_incorrect_content_md5_disabled)
-add_net_test_case(test_s3_put_object_multipart_no_content_md5_enabled)
-add_net_test_case(test_s3_put_object_multipart_no_content_md5_disabled)
-add_net_test_case(test_s3_put_object_multipart_correct_content_md5_enabled)
-add_net_test_case(test_s3_put_object_multipart_correct_content_md5_disabled)
-add_net_test_case(test_s3_put_object_multipart_incorrect_content_md5_enabled)
-add_net_test_case(test_s3_put_object_multipart_incorrect_content_md5_disabled)
+
 add_net_test_case(test_s3_upload_part_message_with_content_md5)
 add_net_test_case(test_s3_upload_part_message_without_content_md5)
 add_net_test_case(test_s3_create_multipart_upload_message_with_content_md5)
 add_net_test_case(test_s3_complete_multipart_message_with_content_md5)
-add_net_test_case(test_s3_put_object_double_slashes)
-add_net_test_case(test_s3_put_object_no_content_length)
-add_net_test_case(test_s3_put_object_single_part_no_content_length)
-add_net_test_case(test_s3_put_object_zero_size_no_content_length)
-add_net_test_case(test_s3_put_large_object_no_content_length_with_checksum)
-add_net_test_case(test_s3_put_object_no_content_length_multiple)
-add_net_test_case(test_s3_put_object_async_singlepart)
-add_net_test_case(test_s3_put_object_async_multipart)
-add_net_test_case(test_s3_put_object_async_read_completes_synchronously)
-add_net_test_case(test_s3_put_object_small_reads)
-add_net_test_case(test_s3_put_object_async_small_reads)
-add_net_test_case(test_s3_put_object_async_no_content_length_partial_part)
-add_net_test_case(test_s3_put_object_async_no_content_length_1part)
-add_net_test_case(test_s3_put_object_async_no_content_length_empty_part2)
-add_net_test_case(test_s3_put_object_async_no_content_length_2parts)
-add_net_test_case(test_s3_put_object_async_fail_reading)
-add_net_test_case(test_s3_many_async_uploads_without_data)
-add_net_test_case(test_s3_download_empty_file_with_checksum)
-add_net_test_case(test_s3_download_single_part_file_with_checksum)
-add_net_test_case(test_s3_download_multipart_file_with_checksum)
-add_net_test_case(test_s3_asyncwrite_empty_file)
-add_net_test_case(test_s3_asyncwrite_small_file_1_write)
-add_net_test_case(test_s3_asyncwrite_small_file_1_write_then_eof)
-add_net_test_case(test_s3_asyncwrite_small_file_many_writes)
-add_net_test_case(test_s3_asyncwrite_1_part)
-add_net_test_case(test_s3_asyncwrite_1_part_many_writes)
-add_net_test_case(test_s3_asyncwrite_1_part_then_eof)
-add_net_test_case(test_s3_asyncwrite_2_parts_1_write)
-add_net_test_case(test_s3_asyncwrite_2_parts_2_partsize_writes)
-add_net_test_case(test_s3_asyncwrite_2_parts_first_write_over_partsize)
-add_net_test_case(test_s3_asyncwrite_2_parts_first_write_under_partsize)
-add_net_test_case(test_s3_asyncwrite_tolerate_empty_writes)
-add_net_test_case(test_s3_asyncwrite_write_from_future_callback)
 add_net_test_case(test_s3_asyncwrite_fails_if_request_has_completed)
-add_net_test_case(test_s3_asyncwrite_fails_if_write_after_eof)
 add_net_test_case(test_s3_asyncwrite_fails_if_writes_overlap)
 add_net_test_case(test_s3_asyncwrite_cancel_forces_completion)
-add_net_test_case(test_s3_asyncwrite_cancel_sends_abort)
 
 if(ENABLE_MRAP_TESTS)
     add_net_test_case(test_s3_get_object_less_than_part_size_mrap)
@@ -158,55 +59,10 @@
     add_net_test_case(test_s3_put_object_multipart_mrap)
 endif()
 
-add_net_test_case(test_s3_round_trip)
-add_net_test_case(test_s3_round_trip_default_get)
-add_net_test_case(test_s3_round_trip_multipart_get_fc)
-add_net_test_case(test_s3_round_trip_default_get_fc)
-add_net_test_case(test_s3_round_trip_mpu_multipart_get_fc)
-add_net_test_case(test_s3_round_trip_mpu_multipart_get_with_list_algorithm_fc)
-add_net_test_case(test_s3_round_trip_mpu_default_get_fc)
-add_net_test_case(test_s3_round_trip_with_filepath)
-add_net_test_case(test_s3_round_trip_mpu_with_filepath)
-add_net_test_case(test_s3_round_trip_with_filepath_no_content_length)
-add_net_test_case(test_s3_round_trip_mpu_with_filepath_no_content_length)
-add_net_test_case(test_s3_chunked_then_unchunked)
-
-add_net_test_case(test_s3_cancel_mpu_one_part_completed_fc)
-add_net_test_case(test_s3_cancel_mpd_one_part_completed_fc)
-
-add_net_test_case(test_s3_meta_request_default)
-add_net_test_case(test_s3_put_object_fail_headers_callback)
-add_net_test_case(test_s3_put_object_fail_body_callback)
-add_net_test_case(test_s3_get_object_fail_headers_callback)
-add_net_test_case(test_s3_get_object_fail_body_callback)
-add_net_test_case(test_s3_default_fail_headers_callback)
-add_net_test_case(test_s3_default_invoke_headers_callback_on_error)
-add_net_test_case(test_s3_default_invoke_headers_callback_cancels_on_error)
-add_net_test_case(test_s3_get_object_invoke_headers_callback_on_error)
-add_net_test_case(test_s3_put_object_invoke_headers_callback_on_error)
-add_net_test_case(test_s3_put_object_invoke_headers_callback_on_error_with_user_cancellation)
-add_net_test_case(test_s3_default_fail_body_callback)
-add_net_test_case(test_s3_default_fail_operation_name)
-add_net_test_case(test_s3_error_missing_file)
-add_net_test_case(test_s3_existing_host_entry)
-add_net_test_case(test_s3_put_fail_object_invalid_request)
 add_net_test_case(test_s3_put_fail_object_invalid_send_filepath)
-add_net_test_case(test_s3_put_fail_object_bad_parallel_read_stream)
-add_net_test_case(test_s3_put_fail_object_inputstream_fail_reading)
-add_net_test_case(test_s3_put_fail_object_inputstream_mismatch_content_length)
 add_net_test_case(test_s3_put_single_part_fail_object_inputstream_fail_reading)
 add_net_test_case(test_s3_put_single_part_fail_object_inputstream_mismatch_content_length)
-add_net_test_case(test_s3_put_object_clamp_part_size)
-add_net_test_case(test_s3_auto_ranged_get_sending_user_agent)
-add_net_test_case(test_s3_auto_ranged_put_sending_user_agent)
-add_net_test_case(test_s3_default_sending_meta_request_user_agent)
-add_net_test_case(test_s3_range_requests)
-add_net_test_case(test_s3_not_satisfiable_range)
 add_net_test_case(test_s3_invalid_start_range_greator_than_end_range)
-add_net_test_case(test_s3_invalid_empty_file_with_range)
-
-add_net_test_case(test_s3_bad_endpoint)
-add_net_test_case(test_s3_different_endpoints)
 
 add_test_case(test_s3_request_type_operation_name)
 add_test_case(test_s3_replace_quote_entities)
@@ -271,24 +127,8 @@
 add_net_test_case(verify_checksum_stream)
 add_net_test_case(verify_chunk_stream)
 
-add_net_test_case(test_s3_copy_small_object)
-add_net_test_case(test_s3_copy_small_object_special_char)
-add_net_test_case(test_s3_multipart_copy_large_object_special_char)
-add_net_test_case(test_s3_multipart_copy_large_object)
-add_net_test_case(test_s3_copy_object_invalid_source_key)
-add_net_test_case(test_s3_copy_source_prefixed_by_slash)
-add_net_test_case(test_s3_copy_source_prefixed_by_slash_multipart)
-add_net_test_case(test_s3_put_pause_resume_happy_path)
-add_net_test_case(test_s3_put_pause_resume_all_parts_done)
-add_net_test_case(test_s3_put_pause_resume_invalid_resume_data)
-add_net_test_case(test_s3_put_pause_resume_invalid_content_length)
-add_net_test_case(test_s3_upload_review)
-add_net_test_case(test_s3_upload_review_no_content_length)
-add_net_test_case(test_s3_upload_review_rejection)
-
 add_net_test_case(test_s3_list_bucket_init_mem_safety)
 add_net_test_case(test_s3_list_bucket_init_mem_safety_optional_copies)
-add_net_test_case(test_s3_list_bucket_valid)
 
 # Tests against local mock server
 if(ENABLE_MOCK_SERVER_TESTS)
@@ -325,16 +165,6 @@
     add_net_test_case(request_time_too_skewed_mock_server)
 endif()
 
-add_net_test_case(s3express_provider_long_running_session_refresh)
-
-add_net_test_case(s3express_client_put_object)
-add_net_test_case(s3express_client_put_object_multipart)
-add_net_test_case(s3express_client_put_object_multipart_multiple)
-add_net_test_case(s3express_client_put_object_long_running_session_refresh)
-add_net_test_case(s3express_client_get_object)
-add_net_test_case(s3express_client_get_object_multiple)
-add_net_test_case(s3express_client_get_object_create_session_error)
-
 add_net_test_case(meta_request_auto_ranged_get_new_error_handling)
 add_net_test_case(meta_request_auto_ranged_put_new_error_handling)
 add_net_test_case(bad_request_error_handling)
@@ -355,7 +185,6 @@
 add_test_case(test_s3_buffer_pool_trim)
 add_test_case(test_s3_buffer_pool_reservation_hold)
 add_test_case(test_s3_buffer_pool_too_small)
-add_net_test_case(test_s3_put_object_buffer_pool_trim)
 
 add_net_test_case(client_update_upload_part_timeout)
 add_net_test_case(client_meta_request_override_part_size)

M aws-c-s3.spec => aws-c-s3.spec +1 -0
@@ 7,6 7,7 @@ License:        Apache-2.0
URL:            https://github.com/awslabs/%{name}
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0:         aws-c-s3-cmake.patch
Patch1:         0001-disable-tests-that-require-internet-connectivity.patch

BuildRequires:  gcc
BuildRequires:  cmake