diff options
author | Etienne Petrel <etienne.petrel@mongodb.com> | 2023-02-13 21:33:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-14 03:28:52 +0000 |
commit | 1b8e51fc5690168299653501a0d2fa8f9fc555e7 (patch) | |
tree | d1385c6e6e1bb551a66b2e57d7d37261820418be | |
parent | eed4b7b0723024d11e0bf1323c01da793a0d82d9 (diff) | |
download | mongo-1b8e51fc5690168299653501a0d2fa8f9fc555e7.tar.gz |
Import wiredtiger: 74252cffc5c86a4e65ecc1901e0448c3b1163476 from branch mongodb-master
ref: de4e9ae0b5..74252cffc5
for: 7.0.0-rc0
WT-10600 Update list objects in gcp unit test
-rw-r--r-- | src/third_party/wiredtiger/ext/storage_sources/gcp_store/test/test_gcp_connection.cpp | 18 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/third_party/wiredtiger/ext/storage_sources/gcp_store/test/test_gcp_connection.cpp b/src/third_party/wiredtiger/ext/storage_sources/gcp_store/test/test_gcp_connection.cpp index 0fef6e7e730..29025ad66ed 100644 --- a/src/third_party/wiredtiger/ext/storage_sources/gcp_store/test/test_gcp_connection.cpp +++ b/src/third_party/wiredtiger/ext/storage_sources/gcp_store/test/test_gcp_connection.cpp @@ -104,7 +104,6 @@ TEST_CASE("Testing class gcpConnection", "gcp-connection") const std::string file_name = object_name + ".txt"; const std::string non_existant_object_name = "test_non_exist"; const std::string non_existant_file_name = non_existant_object_name + ".txt"; - const bool list_single = true; std::vector<std::string> objects; gcs::Client client = gcs::Client(); @@ -114,12 +113,15 @@ TEST_CASE("Testing class gcpConnection", "gcp-connection") SECTION("Simple list test", "[gcp-connection]") { + // Search prefix is not used in this unit test, empty string is provided. + const std::string search_prefix = ""; + // No matching objects. Objects list should be empty. - REQUIRE(conn.list_objects(objects, false) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, false) == 0); REQUIRE(objects.empty()); // No matching objects with list_single. Objects list should be empty. - REQUIRE(conn.list_objects(objects, list_single) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, true) == 0); REQUIRE(objects.empty()); // Upload 1 file to the bucket and test list_objects function. @@ -127,14 +129,14 @@ TEST_CASE("Testing class gcpConnection", "gcp-connection") REQUIRE( upload_file(client, test_bucket_name, test_bucket_prefix, file_name, object_name).ok()); REQUIRE(file_exists_in_bucket(client, test_bucket_name, test_bucket_prefix, object_name)); - REQUIRE(conn.list_objects(objects, false) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, false) == 0); REQUIRE(objects.size() == 1); objects.clear(); // Delete the object we uploaded and test list_objects function. // List_objects should return an empty objects list. client.DeleteObject(test_bucket_name, test_bucket_prefix + object_name); - REQUIRE(conn.list_objects(objects, false) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, false) == 0); REQUIRE(objects.empty()); objects.clear(); @@ -148,12 +150,12 @@ TEST_CASE("Testing class gcpConnection", "gcp-connection") } // List objects should return a list with size total_objects. - REQUIRE(conn.list_objects(objects, false) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, false) == 0); REQUIRE(objects.size() == total_objects); objects.clear(); // Test if list single correctly returns one object. - REQUIRE(conn.list_objects(objects, list_single) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, true) == 0); REQUIRE(objects.size() == 1); objects.clear(); @@ -164,7 +166,7 @@ TEST_CASE("Testing class gcpConnection", "gcp-connection") } // Bucket should be cleared. - REQUIRE(conn.list_objects(objects, false) == 0); + REQUIRE(conn.list_objects(search_prefix, objects, false) == 0); REQUIRE(objects.empty()); } diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 25bf2f94e2b..62b2a1111ed 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "de4e9ae0b5c52c680ba9a86cb62b621f8f92e7c2" + "commit": "74252cffc5c86a4e65ecc1901e0448c3b1163476" } |