From ce2079025c7c225c38a0443d7efc8a0b6c160f4c Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Fri, 21 Jun 2024 10:15:18 -0400 Subject: [PATCH] Update tests to use absolute and relative URIs. --- test/src/unit-capi-consolidation.cc | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/test/src/unit-capi-consolidation.cc b/test/src/unit-capi-consolidation.cc index 3cb1459e5cfb..2bf47e106971 100644 --- a/test/src/unit-capi-consolidation.cc +++ b/test/src/unit-capi-consolidation.cc @@ -7197,9 +7197,17 @@ TEST_CASE_METHOD( REQUIRE(err == nullptr); // Consolidate - const char* uris[2] = {strrchr(uri, '/') + 1, strrchr(uri2, '/') + 1}; - rc = tiledb_array_consolidate_fragments( - ctx_, dense_array_uri_.c_str(), uris, 2, cfg); + SECTION("Relative URIs") { + const char* uris[2] = {strrchr(uri, '/') + 1, strrchr(uri2, '/') + 1}; + rc = tiledb_array_consolidate_fragments( + ctx_, dense_array_uri_.c_str(), uris, 2, cfg); + } + + SECTION("Absolute URIs") { + const char* uris[2] = {uri, uri2}; + rc = tiledb_array_consolidate_fragments( + ctx_, dense_array_uri_.c_str(), uris, 2, cfg); + } CHECK(rc == TILEDB_OK); tiledb_config_free(&cfg); @@ -7273,9 +7281,17 @@ TEST_CASE_METHOD( REQUIRE(err == nullptr); // Consolidate - const char* uris[2] = {strrchr(uri, '/') + 1, strrchr(uri2, '/') + 1}; - rc = tiledb_array_consolidate_fragments( - ctx_, sparse_array_uri_.c_str(), uris, 2, cfg); + SECTION("Relative URIs") { + const char* uris[2] = {strrchr(uri, '/') + 1, strrchr(uri2, '/') + 1}; + rc = tiledb_array_consolidate_fragments( + ctx_, sparse_array_uri_.c_str(), uris, 2, cfg); + } + + SECTION("Absolute URIs") { + const char* uris[2] = {uri, uri2}; + rc = tiledb_array_consolidate_fragments( + ctx_, sparse_array_uri_.c_str(), uris, 2, cfg); + } CHECK(rc == TILEDB_OK); tiledb_config_free(&cfg);