Skip to content

Commit

Permalink
Modifies Dockerfile for updated config file location
Browse files Browse the repository at this point in the history
Also updates config generation test to reflect previous behavior,
would be good to review if this behavior is still appropriate however.

Signed-off-by: Michael Maurer <[email protected]>
  • Loading branch information
maurermi committed Apr 3, 2023
1 parent 1a52ca9 commit d237524
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ COPY --from=builder /opt/tx-processor/scripts/test-transaction.sh ./scripts/test
COPY --from=builder /opt/tx-processor/build/src/uhs/client/client-cli ./build/src/uhs/client/client-cli

# Copy 2PC config
COPY --from=builder /opt/tx-processor/2pc-compose.cfg ./2pc-compose.cfg
COPY --from=builder /opt/tx-processor/config/general/2pc-compose.cfg ./config/general/2pc-compose.cfg

# Create Atomizer Deployment Image
FROM $IMAGE_VERSION AS atomizer
Expand All @@ -74,4 +74,4 @@ COPY --from=builder /opt/tx-processor/scripts/test-transaction.sh ./scripts/test
COPY --from=builder /opt/tx-processor/build/src/uhs/client/client-cli ./build/src/uhs/client/client-cli

# Copy atomizer config
COPY --from=builder /opt/tx-processor/atomizer-compose.cfg ./atomizer-compose.cfg
COPY --from=builder /opt/tx-processor/config/general/atomizer-compose.cfg ./config/general/atomizer-compose.cfg
6 changes: 4 additions & 2 deletions tests/unit/config_gen_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ TEST_F(config_generation_validation_test,
cbdc::generate_config::config_generator new_config_gen(
template_file_atomizer,
port_num);
testing::internal::CaptureStderr();
auto cfg_or_err = new_config_gen.generate_configuration_file();
ASSERT_EQ(cfg_or_err, "SUCCESS");
ASSERT_NE(testing::internal::GetCapturedStderr().find("SUCCESS"), -1);
// TODO
// Reload generate file and check values
// Delete generated file
Expand All @@ -49,8 +50,9 @@ TEST_F(config_generation_validation_test,
// necessarily know which one
cbdc::generate_config::config_generator new_config_gen(template_file_2pc,
port_num);
testing::internal::CaptureStderr();
auto cfg_or_err = new_config_gen.generate_configuration_file();
ASSERT_EQ(cfg_or_err, "SUCCESS");
ASSERT_NE(testing::internal::GetCapturedStderr().find("SUCCESS"), -1);
// TODO
// Reload generate file and check values
// Delete generated file
Expand Down
2 changes: 1 addition & 1 deletion tools/config_generator/config_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ namespace cbdc::generate_config {
std::pair<std::string, std::string> key_pair = create_key_pair();
set_param_to_config_file(seed_privkey, key_pair.first);
}
std::cout << "SUCCESS";
std::cerr << "SUCCESS\n";
return m_new_config.str();
}
}
2 changes: 1 addition & 1 deletion tools/config_generator/generate_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ auto main(int argc, char** argv) -> int {
}
cbdc::generate_config::config_generator new_config_gen(args[1], port_num);
auto cfg_or_err = new_config_gen.generate_configuration_file();
std::cerr << cfg_or_err << std::endl;
std::cout << cfg_or_err << std::endl;
std::cout << std::endl;
return 0;
}

0 comments on commit d237524

Please sign in to comment.