@@ -50,6 +50,31 @@ static int s_test_s3_client_create_destroy(struct aws_allocator *allocator, void
5050 return 0 ;
5151}
5252
53+ AWS_TEST_CASE (test_s3_client_create_error , s_test_s3_client_create_error )
54+ static int s_test_s3_client_create_error (struct aws_allocator * allocator , void * ctx ) {
55+ (void )ctx ;
56+
57+ struct aws_s3_tester tester ;
58+ AWS_ZERO_STRUCT (tester );
59+ ASSERT_SUCCESS (aws_s3_tester_init (allocator , & tester ));
60+
61+ struct aws_s3_client_config client_config ;
62+ AWS_ZERO_STRUCT (client_config );
63+ struct aws_http_proxy_options proxy_options = {
64+ .connection_type = AWS_HPCT_HTTP_LEGACY ,
65+ .host = aws_byte_cursor_from_c_str ("localhost" ),
66+ .port = 8899 ,
67+ };
68+ client_config .proxy_options = & proxy_options ;
69+ struct aws_s3_client * client = aws_s3_client_new (allocator , & client_config );
70+
71+ ASSERT_TRUE (client == NULL );
72+
73+ aws_s3_tester_clean_up (& tester );
74+
75+ return 0 ;
76+ }
77+
5378AWS_TEST_CASE (test_s3_client_monitoring_options_override , s_test_s3_client_monitoring_options_override )
5479static int s_test_s3_client_monitoring_options_override (struct aws_allocator * allocator , void * ctx ) {
5580 (void )ctx ;
@@ -1713,13 +1738,9 @@ static int s_test_s3_put_object_multiple(struct aws_allocator *allocator, void *
17131738 struct aws_byte_cursor test_body_cursor = aws_byte_cursor_from_buf (& input_stream_buffers [i ]);
17141739 input_streams [i ] = aws_input_stream_new_from_cursor (allocator , & test_body_cursor );
17151740 struct aws_byte_cursor test_object_path = aws_byte_cursor_from_c_str (object_path_buffer );
1741+ struct aws_byte_cursor host_cur = aws_byte_cursor_from_string (host_name );
17161742 messages [i ] = aws_s3_test_put_object_request_new (
1717- allocator ,
1718- aws_byte_cursor_from_string (host_name ),
1719- test_object_path ,
1720- g_test_body_content_type ,
1721- input_streams [i ],
1722- 0 );
1743+ allocator , & host_cur , test_object_path , g_test_body_content_type , input_streams [i ], 0 );
17231744 struct aws_s3_meta_request_options options ;
17241745 AWS_ZERO_STRUCT (options );
17251746 options .type = AWS_S3_META_REQUEST_TYPE_PUT_OBJECT ;
@@ -2293,7 +2314,7 @@ static int s_test_s3_upload_part_message_helper(struct aws_allocator *allocator,
22932314
22942315 /* Put together a simple S3 Put Object request. */
22952316 struct aws_http_message * base_message = aws_s3_test_put_object_request_new (
2296- allocator , host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
2317+ allocator , & host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
22972318
22982319 uint32_t part_number = 1 ;
22992320 struct aws_string * upload_id = aws_string_new_from_c_str (allocator , "dummy_upload_id" );
@@ -2366,7 +2387,7 @@ static int s_test_s3_create_multipart_upload_message_with_content_md5(struct aws
23662387
23672388 /* Put together a simple S3 Put Object request. */
23682389 struct aws_http_message * base_message = aws_s3_test_put_object_request_new (
2369- allocator , host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
2390+ allocator , & host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
23702391
23712392 struct aws_http_header content_md5_header = {
23722393 .name = g_content_md5_header_name ,
@@ -2415,7 +2436,7 @@ static int s_test_s3_complete_multipart_message_with_content_md5(struct aws_allo
24152436
24162437 /* Put together a simple S3 Put Object request. */
24172438 struct aws_http_message * base_message = aws_s3_test_put_object_request_new (
2418- allocator , host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
2439+ allocator , & host_name , test_object_path , g_test_body_content_type , input_stream , AWS_S3_TESTER_SSE_NONE );
24192440
24202441 struct aws_http_header content_md5_header = {
24212442 .name = g_content_md5_header_name ,
0 commit comments