Skip to content

Commit

Permalink
feat: Fix AWS tests
Browse files Browse the repository at this point in the history
Bug: b/382049938
Change-Id: I98555c97db97a77d9b043025fe1c61515fe6522d
GitOrigin-RevId: d3c540f4d2b1e34a502395775a2c0547d96387d2
  • Loading branch information
Privacy Sandbox Team authored and copybara-github committed Dec 9, 2024
1 parent 77a2f69 commit 260c792
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
14 changes: 6 additions & 8 deletions src/roma/byob/container/run_workers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,13 @@ int main(int argc, char** argv) {
absl::ParseCommandLine(argc, argv);
absl::InitializeLog();
LOG(INFO) << "Starting up.";
const std::filesystem::path progdir =
std::filesystem::temp_directory_path() /
ToString(google::scp::core::common::Uuid::GenerateUuid());
if (std::error_code ec; !std::filesystem::create_directories(progdir, ec)) {
LOG(ERROR) << "Failed to create " << progdir << ": " << ec;
const std::filesystem::path prog_dir = "/prog_dir";
if (std::error_code ec; !std::filesystem::create_directories(prog_dir, ec)) {
LOG(ERROR) << "Failed to create " << prog_dir << ": " << ec;
return -1;
}
absl::Cleanup progdir_cleanup = [&progdir] {
if (absl::Status status = RemoveDirectories(progdir); !status.ok()) {
absl::Cleanup progdir_cleanup = [&prog_dir] {
if (absl::Status status = RemoveDirectories(prog_dir); !status.ok()) {
LOG(ERROR) << status;
}
};
Expand All @@ -596,7 +594,7 @@ int main(int argc, char** argv) {
}
WorkerRunner runner(absl::GetFlag(FLAGS_udf_socket_name),
absl::GetFlag(FLAGS_mounts), absl::GetFlag(FLAGS_log_dir),
dev_null_fd, progdir);
dev_null_fd, prog_dir);
grpc::EnableDefaultHealthCheckService(true);
std::unique_ptr<grpc::Server> server =
grpc::ServerBuilder()
Expand Down
9 changes: 3 additions & 6 deletions src/roma/byob/test/roma_byob_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ TEST(RomaByobTest, LoadBinaryInSandboxMode) {

TEST(RomaByobTest, LoadBinaryInNonSandboxMode) {
Mode mode = Mode::kModeNoSandbox;
// TODO: b/382049938 - Fix non-sandbox mode tests for AWS
if (!HasClonePermissionsByobWorker(mode) || true) {
if (!HasClonePermissionsByobWorker(mode)) {
GTEST_SKIP() << "HasClonePermissionsByobWorker check returned false";
}
ByobSampleService<> roma_service = GetRomaService(mode);
Expand Down Expand Up @@ -205,8 +204,7 @@ TEST(RomaByobTest, ProcessRequestMultipleCppBinariesInSandboxMode) {

TEST(RomaByobTest, ProcessRequestMultipleCppBinariesInNonSandboxMode) {
Mode mode = Mode::kModeNoSandbox;
// TODO: b/382049938 - Fix non-sandbox mode tests for AWS
if (!HasClonePermissionsByobWorker(mode) || true) {
if (!HasClonePermissionsByobWorker(mode)) {
GTEST_SKIP() << "HasClonePermissionsByobWorker check returned false";
}
ByobSampleService<> roma_service = GetRomaService(mode);
Expand All @@ -226,8 +224,7 @@ TEST(RomaByobTest, ProcessRequestMultipleCppBinariesInNonSandboxMode) {

TEST(RomaByobTest, LoadBinaryUsingUdfBlob) {
Mode mode = Mode::kModeNoSandbox;
// TODO: b/382049938 - Fix non-sandbox mode tests for AWS
if (!HasClonePermissionsByobWorker(mode) || true) {
if (!HasClonePermissionsByobWorker(mode)) {
GTEST_SKIP() << "HasClonePermissionsByobWorker check returned false";
}
ByobSampleService<> roma_service = GetRomaService(mode);
Expand Down

0 comments on commit 260c792

Please sign in to comment.