Skip to content

Commit

Permalink
fix: Add dispatcher tests for paths
Browse files Browse the repository at this point in the history
Bug: N/A
Change-Id: I33d2ae799198e23209697da6efbb877bd0853a2f
GitOrigin-RevId: c53d5f44c05cd03ff2b7dffce9ba2bd58ad44c40
  • Loading branch information
Privacy Sandbox Team authored and copybara-github committed Oct 4, 2024
1 parent 821adb5 commit df42331
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/roma/byob/dispatcher/dispatcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@ TEST(DispatcherTest, ShutdownDispatcherThenWorker) {
worker.join();
}

TEST(DispatcherTest, LoadErrorsForEmptyBinaryPath) {
Dispatcher dispatcher;
EXPECT_FALSE(dispatcher.LoadBinary("", /*n_workers=*/1).ok());
}

// TODO: b/371538589 - Ensure non-file paths are handled appropriately.
TEST(DispatcherTest, DISABLED_LoadErrorsForRootPath) {
Dispatcher dispatcher;
EXPECT_FALSE(dispatcher.LoadBinary("/", /*n_workers=*/1).ok());
}

TEST(DispatcherTest, LoadErrorsForUnknownBinaryPath) {
Dispatcher dispatcher;
EXPECT_FALSE(dispatcher.LoadBinary("/asdflkj/ytrewq", /*n_workers=*/1).ok());
}

TEST(DispatcherTest, LoadErrorsWhenNWorkersNonPositive) {
Dispatcher dispatcher;
EXPECT_FALSE(
Expand Down

0 comments on commit df42331

Please sign in to comment.