lordgamez commented on a change in pull request #1132:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1132#discussion_r672904741



##########
File path: extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp
##########
@@ -747,3 +747,93 @@ TEST_CASE("Test Regex Property 2", 
"[YamlConfigurationRegexProperty2]") {
 }
 
 #endif  // YAML_CONFIGURATION_USE_REGEX
+
+TEST_CASE("Test YAML Config With Funnel", "[YamlConfiguration]") {
+  TestController test_controller;
+
+  std::shared_ptr<core::Repository> testProvRepo = 
core::createRepository("provenancerepository", true);
+  std::shared_ptr<core::Repository> testFlowFileRepo = 
core::createRepository("flowfilerepository", true);
+  std::shared_ptr<minifi::Configure> configuration = 
std::make_shared<minifi::Configure>();
+  std::shared_ptr<minifi::io::StreamFactory> streamFactory = 
minifi::io::StreamFactory::getInstance(configuration);
+  std::shared_ptr<core::ContentRepository> content_repo = 
std::make_shared<core::repository::VolatileContentRepository>();
+  core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, 
content_repo, streamFactory, configuration);
+
+  static const std::string CONFIG_YAML_WITH_FUNNEL = ""
+      "MiNiFi Config Version: 3\n"
+      "Flow Controller:\n"
+      "  name: root\n"
+      "  comment: ''\n"
+      "Processors:\n"
+      "- id: 0eac51eb-d76c-4ba6-9f0c-351795b2d243\n"
+      "  name: GenerateFlowFile1\n"

Review comment:
       Updated in eb396ae43b5dae3ec5c23f19725f5ac6d380bf78

##########
File path: docker/test/integration/steps/steps.py
##########
@@ -248,6 +262,27 @@ def step_impl(context, file_name, content, path):
     context.test.add_test_data(path, content, file_name)
 
 
+@given("a Funnel with the name \"{funnel_name}\" is set up in the flow")
+def step_impl(context, funnel_name):
+    funnel = Funnel()
+    funnel.set_name(funnel_name)
+    context.test.add_node(funnel)
+
+
+@given("in the flow the Funnel with the name \"{source_name}\" is connected to 
the {destination_name}")

Review comment:
       Updated in eb396ae43b5dae3ec5c23f19725f5ac6d380bf78

##########
File path: libminifi/src/core/yaml/YamlConfiguration.cpp
##########
@@ -805,6 +807,37 @@ void YamlConfiguration::parsePropertiesNodeYaml(const 
YAML::Node& propertiesNode
   validateComponentProperties(processor, component_name, yaml_section);
 }
 
+void YamlConfiguration::parseFunnelsYaml(const YAML::Node& node, 
core::ProcessGroup* parent) {
+  if (!parent) {
+    logger_->log_error("parseFunnelsYaml: no parent group was provided");
+    return;
+  }
+  if (!node || !node.IsSequence()) {
+    return;
+  }
+
+  for (YAML::const_iterator iter = node.begin(); iter != node.end(); ++iter) {

Review comment:
       Updated in eb396ae43b5dae3ec5c23f19725f5ac6d380bf78




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to