From f2d18880e2819dfc0cafb49795bcde0f956814b9 Mon Sep 17 00:00:00 2001 From: DenverM80 Date: Fri, 7 Jul 2017 16:19:13 -0600 Subject: [PATCH 1/2] Fix test case for create folder --- test/bucket_tests.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/bucket_tests.cpp b/test/bucket_tests.cpp index 2ea7b8a6..be2703a5 100644 --- a/test/bucket_tests.cpp +++ b/test/bucket_tests.cpp @@ -46,6 +46,11 @@ BOOST_AUTO_TEST_CASE( bulk_put ) { free_client(client); } +/* + * The correct use case to PUT a single folder: + * 1. Create a put bulk job with the folder + * 2. Put the folder (with trailing slash), optionally with metadata + */ BOOST_AUTO_TEST_CASE( empty_folder ) { printf("-----Testing put empty folder-------\n"); @@ -55,7 +60,16 @@ BOOST_AUTO_TEST_CASE( empty_folder ) { ds3_error* error = create_bucket_with_data_policy(client, bucket_name, ids.data_policy_id->value); handle_error(error); - ds3_request* request = ds3_init_put_object_request(bucket_name, "empty-folder/", 0); + const char* objects[1] = {"empty-folder/"}; + ds3_bulk_object_list_response* object_list = ds3_convert_object_list_from_strings(objects, 1); + ds3_request* request = ds3_init_put_bulk_job_spectra_s3_request(bucket_name, object_list); + ds3_master_object_list_response* bulk_response = NULL; + error = ds3_put_bulk_job_spectra_s3_request(client, request, &bulk_response); + handle_error(error); + ds3_master_object_list_response_free(bulk_response); + + request = ds3_init_put_object_request(bucket_name, objects[0], 0); + ds3_request_set_job(request, bulk_response->job_id->value); error = ds3_put_object_request(client, request, NULL, NULL); ds3_request_free(request); handle_error(error); From 99a79d295a5b73e934a31cb17d128b16b4c4526a Mon Sep 17 00:00:00 2001 From: DenverM80 Date: Mon, 10 Jul 2017 15:46:47 -0600 Subject: [PATCH 2/2] rev the SDK version in CMake --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3084414..81016df4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ project(libds3) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/") -set (DS3SDK_VERSION_MAJOR 3) -set (DS3SDK_VERSION_MINOR 2) -set (DS3SDK_VERSION_PATCH 0) +set (DS3SDK_VERSION_MAJOR 4) +set (DS3SDK_VERSION_MINOR 0) +set (DS3SDK_VERSION_PATCH 1) add_subdirectory(src)