From 1e547525e4e9da51fed93d3ca1e1f2f7b6ca5a12 Mon Sep 17 00:00:00 2001 From: Graham Brereton Date: Fri, 5 Jan 2024 13:08:14 -0500 Subject: [PATCH] test: add assertion for workflow annotation Signed-off-by: Graham Brereton --- pkg/workflow/controllers/serial_node_reconciler_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/workflow/controllers/serial_node_reconciler_test.go b/pkg/workflow/controllers/serial_node_reconciler_test.go index c847ebd1e8..88742561c0 100644 --- a/pkg/workflow/controllers/serial_node_reconciler_test.go +++ b/pkg/workflow/controllers/serial_node_reconciler_test.go @@ -402,6 +402,10 @@ var _ = Describe("Workflow", func() { g.Expect(ConditionEqualsTo(entryNode.Status, v1alpha1.ConditionAborted, corev1.ConditionTrue)). To(BeTrue(), "entry node should be aborted") + + workflow := v1alpha1.Workflow{} + g.Expect(kubeClient.Get(ctx, types.NamespacedName{Namespace: ns, Name: "statuscheck-abort"}, &workflow)).To(Succeed()) + g.Expect(WorkflowAborted(workflow)).To(BeTrue(), "workflow should be aborted") }, 10*time.Second, time.Second).Should(Succeed()) }) })