From 1f23878330d7586623f8e8288aa5866fc783df91 Mon Sep 17 00:00:00 2001 From: Honnix Date: Mon, 16 Mar 2020 18:29:36 +0100 Subject: [PATCH] fix failing test case (#91) --- .../pkg/controller/nodes/subworkflow/subworkflow_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go b/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go index 0b01e5e683..aaab2c511e 100644 --- a/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go +++ b/flytepropeller/pkg/controller/nodes/subworkflow/subworkflow_test.go @@ -53,7 +53,10 @@ func Test_subworkflowHandler_HandleAbort(t *testing.T) { nCtx.OnNodeID().Return("n1") n := &coreMocks.ExecutableNode{} swf.OnStartNode().Return(n) - nodeExec.OnAbortHandler(ctx, wf, n, "reason").Return(fmt.Errorf("err")) + swf.OnGetID().Return("swf") + nodeExec.OnAbortHandlerMatch(mock.Anything, mock.MatchedBy(func(wf v1alpha1.ExecutableWorkflow) bool { + return wf.GetID() == swf.GetID() + }), n, mock.Anything).Return(fmt.Errorf("err")) assert.Error(t, s.HandleAbort(ctx, nCtx, wf, "x", "reason")) })