Skip to content

Commit

Permalink
Update tests to use absolute and relative URIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunrd0 committed Jul 1, 2024
1 parent 6957660 commit ce20790
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions test/src/unit-capi-consolidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

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

Expand Down

0 comments on commit ce20790

Please # to comment.