arpadboda commented on a change in pull request #1132:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1132#discussion_r681221694
##########
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")
+def step_impl(context, funnel_name):
+ funnel = Funnel()
+ funnel.set_name(funnel_name)
Review comment:
You wrote the ctor that takes the name as an optional argument :)
##########
File path:
docker/test/integration/minifi/flow_serialization/Minifi_flow_yaml_serializer.py
##########
@@ -92,21 +108,22 @@ def serialize(self, connectable, root=None, visited=None):
res['Connections'].append({
'name': str(uuid.uuid4()),
'source id': str(connectable.uuid),
- 'source relationship name': conn_name,
'destination id': str(proc.uuid),
'drop empty': ("true" if proc.drop_empty_flowfiles
else "false")
})
+ if (str(connectable.uuid) not in [x['id'] for x in
res['Funnels']]):
+ res['Connections'][-1]['source relationship name'] =
conn_name
if proc not in visited:
- self.serialize(proc, res, visited)
+ self.serialize_node(proc, res, visited)
else:
res['Connections'].append({
'name': str(uuid.uuid4()),
'source id': str(connectable.uuid),
- 'source relationship name': conn_name,
'destination id': str(conn_procs.uuid)
})
+ if (str(connectable.uuid) not in [x['id'] for x in
res['Funnels']]):
Review comment:
Nitpicking (as it seems to be a "how to write it shorter" challenge 😄 ):
if (any(str(connectable.uuid) == x['id'] for x in res['Funnels']))
##########
File path:
docker/test/integration/minifi/flow_serialization/Minifi_flow_yaml_serializer.py
##########
@@ -92,21 +108,22 @@ def serialize(self, connectable, root=None, visited=None):
res['Connections'].append({
'name': str(uuid.uuid4()),
'source id': str(connectable.uuid),
- 'source relationship name': conn_name,
'destination id': str(proc.uuid),
'drop empty': ("true" if proc.drop_empty_flowfiles
else "false")
})
+ if (str(connectable.uuid) not in [x['id'] for x in
res['Funnels']]):
+ res['Connections'][-1]['source relationship name'] =
conn_name
if proc not in visited:
- self.serialize(proc, res, visited)
+ self.serialize_node(proc, res, visited)
else:
res['Connections'].append({
'name': str(uuid.uuid4()),
'source id': str(connectable.uuid),
- 'source relationship name': conn_name,
'destination id': str(conn_procs.uuid)
})
+ if (str(connectable.uuid) not in [x['id'] for x in
res['Funnels']]):
Review comment:
Nitpicking (as it seems to be a "how to write it shorter" challenge 😄 ):
```
if (any(str(connectable.uuid) == x['id'] for x in res['Funnels']))
```
--
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]