Skip to content

Commit ae5b4fe

Browse files
author
DenverM80
committed
add integration test for get_objects_with_full_details_spectra_s3_request()
1 parent 3690178 commit ae5b4fe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/search_tests.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ BOOST_AUTO_TEST_CASE( get_all_objects ) {
2727
free_client(client);
2828
}
2929

30+
BOOST_AUTO_TEST_CASE( get_objects_with_full_details ) {
31+
printf("-----Testing get_objects_with_full_details-------\n");
32+
33+
uint64_t num_objs;
34+
ds3_client* client = get_client();
35+
ds3_detailed_s3_object_list_response* response;
36+
const char* bucket_name = "get_objects_with_full_details";
37+
populate_with_objects(client, bucket_name);
38+
39+
ds3_request* request = ds3_init_get_objects_with_full_details_spectra_s3_request();
40+
ds3_request_set_bucket_id(request, bucket_name);
41+
ds3_request_set_name(request, "%txt%");
42+
ds3_error* error = ds3_get_objects_with_full_details_spectra_s3_request(client, request, &response);
43+
44+
handle_error(error);
45+
num_objs = response->num_detailed_s3_objects;
46+
BOOST_CHECK_EQUAL(num_objs, 5);
47+
48+
ds3_request_free(request);
49+
ds3_detailed_s3_object_list_response_free(response);
50+
51+
clear_bucket(client, bucket_name);
52+
free_client(client);
53+
}
54+
3055
BOOST_AUTO_TEST_CASE( get_no_objects ) {
3156
uint64_t num_objs;
3257
ds3_client* client = get_client();

0 commit comments

Comments
 (0)