From a3fcd6d6be65b88d8b8240eac700192f33262d4e Mon Sep 17 00:00:00 2001 From: wangyu Date: Thu, 12 Sep 2019 15:51:51 +0800 Subject: [PATCH] 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 --- karbor/tests/unit/protection/fakes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/karbor/tests/unit/protection/fakes.py b/karbor/tests/unit/protection/fakes.py index 4099399c..5350b5a4 100644 --- a/karbor/tests/unit/protection/fakes.py +++ b/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):