Skip to content

Commit

Permalink
fix(tests): e2e test for daemon retry
Browse files Browse the repository at this point in the history
Signed-off-by: MenD32 <[email protected]>
  • Loading branch information
MenD32 committed Oct 19, 2024
1 parent 02171da commit 8e30a71
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/e2e/daemon_pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ spec:
container:
image: argoproj/argosay:v2
command: ["bash"]
args: ["-c", "sleep 5 && exit 1"]
args: ["-c", "sleep 10 && exit 1"]
- name: whale-tmpl
container:
image: argoproj/argosay:v2
Expand All @@ -214,9 +214,12 @@ spec:
WaitForWorkflow(fixtures.ToBeSucceeded).
Then().
ExpectWorkflow(func(t *testing.T, md *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
node := status.Nodes.FindByDisplayName("daemoned(1)")
require.NotNil(t, node)
assert.Equal(t, wfv1.NodeSucceeded, node.Phase)
failedNode := status.Nodes.FindByDisplayName("daemoned(0)")
succeededNode := status.Nodes.FindByDisplayName("daemoned(1)")
require.NotNil(t, failedNode)
require.NotNil(t, succeededNode)
assert.Equal(t, wfv1.NodeFailed, failedNode.Phase)
assert.Equal(t, wfv1.NodeSucceeded, succeededNode.Phase)
assert.Equal(t, status.Phase, wfv1.WorkflowSucceeded)

Check failure on line 223 in test/e2e/daemon_pod_test.go

View workflow job for this annotation

GitHub Actions / Lint

expected-actual: need to reverse actual and expected values (testifylint)
})
}
Expand Down

0 comments on commit 8e30a71

Please sign in to comment.