Skip to content

Commit

Permalink
review change
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzink committed Nov 28, 2024
1 parent 8ba5254 commit a8b7f94
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions extensions/kafka/tests/PublishKafkaMigratorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,11 @@ Controller Services: []
Remote Processing Groups: []
)";
ConfigurationTestController test_controller;
std::string serialized_flow_definition;
SECTION("YamlConfiguration") {
core::YamlConfiguration yaml_config(test_controller.getContext());
auto root_flow_definition = yaml_config.getRootFromPayload(std::string{ORIGINAL_YAML});
REQUIRE(root_flow_definition);
serialized_flow_definition = yaml_config.serialize(*root_flow_definition);
}
SECTION("Adaptive Yaml Configuration") {
core::flow::AdaptiveConfiguration adaptive_configuration(test_controller.getContext());
auto root_flow_definition = adaptive_configuration.getRootFromPayload(std::string{ORIGINAL_YAML});
REQUIRE(root_flow_definition);
serialized_flow_definition = adaptive_configuration.serialize(*root_flow_definition);
}
core::YamlConfiguration yaml_config(test_controller.getContext());
auto root_flow_definition = yaml_config.getRootFromPayload(std::string{ORIGINAL_YAML});
REQUIRE(root_flow_definition);
std::string serialized_flow_definition = yaml_config.serialize(*root_flow_definition);

YAML::Node migrated_flow = YAML::Load(std::string{serialized_flow_definition});
CHECK(migrated_flow["Controller Services"].IsSequence());
CHECK(migrated_flow["Controller Services"].size() == 1);
Expand Down

0 comments on commit a8b7f94

Please sign in to comment.