Skip to content

Commit

Permalink
Merge pull request #204 from DenverM80/rev_4_0
Browse files Browse the repository at this point in the history
Rev 4 0
  • Loading branch information
RachelTucker authored Jul 10, 2017
2 parents b8e21d1 + 99a79d2 commit 083ef2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
16 changes: 15 additions & 1 deletion test/bucket_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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);
Expand Down

0 comments on commit 083ef2c

Please sign in to comment.