[
https://issues.apache.org/jira/browse/MINIFI-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15993171#comment-15993171
]
ASF GitHub Bot commented on MINIFI-275:
---------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/85#discussion_r114137733
--- Diff: libminifi/test/unit/YamlCongifurationTests.cpp ---
@@ -0,0 +1,182 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <memory>
+#include <string>
+#include <core/RepositoryFactory.h>
+#include "core/yaml/YamlConfiguration.h"
+#include "../TestBase.h"
+
+static const std::shared_ptr<core::Repository> TEST_PROV_REPO =
core::createRepository("provenancerepository", true);
+static const std::shared_ptr<core::Repository> TEST_FF_REPO =
core::createRepository("flowfilerepository", true);
+
+TEST_CASE("Test YAML Config 1", "[testyamlconfig1]") {
+
+ static const std::string TEST_YAML_WITHOUT_IDS = "MiNiFi Config Version:
1\n"
--- End diff --
You can add this into the resource directory -- I'm renaming this to
resources in a subsequent PR, but there's no need to maintain this text here.
> Configuration without IDs for components causes exceptions
> ----------------------------------------------------------
>
> Key: MINIFI-275
> URL: https://issues.apache.org/jira/browse/MINIFI-275
> Project: Apache NiFi MiNiFi
> Issue Type: Bug
> Components: C++, Processing Configuration
> Reporter: Aldrin Piri
> Assignee: Kevin Doran
> Priority: Blocker
> Fix For: cpp-0.2.0
>
> Attachments: config.TEST.yml
>
>
> One of the changes to how components are handled in C++ introduced a defect
> into the original construct over the version 1 schema of the YAML.
> The absence of this ID causes a YAML exception.
> We should provide handling to support configurations how they were created
> originally, possibly providing a default/generated ID where one isn't
> specified, and start laying the foundation for versioned schemas as provided
> in our Java implementation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)