Browse Source

Fix unit tests failed

if flow is None for add_tasks when running unit tests,
the method 'add' for flow  will be failed. this patch
will fix it.

Change-Id: I1bd70cea69cc54bea34de4b655f6d7caecfdf0e2
changes/61/681661/1
wangyu 2 years ago
parent
commit
a3fcd6d6be
  1. 1
      karbor/tests/unit/protection/fakes.py

1
karbor/tests/unit/protection/fakes.py

@ -323,6 +323,7 @@ class FakeFlowEngine(object):
def add_tasks(self, flow, *nodes, **kwargs):
if flow is None:
LOG.error("The flow is None, get it first")
return
flow.add(*nodes, **kwargs)
def link_task(self, flow, u, v):

Loading…
Cancel
Save