Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
Signed-off-by: shuangkun <[email protected]>
  • Loading branch information
shuangkun committed Jan 5, 2025
1 parent 51bc0d9 commit ae8a11f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflow/controller/operator_workflow_template_ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,8 @@ spec:
- name: message
value: Hello Bug`

func TestWorkflowTemplateWithPodMetedata(t *testing.T) {
cancel, controller := newController(wfv1.MustUnmarshalWorkflow(wfWithTemplateRef), wfv1.MustUnmarshalWorkflowTemplate(wfTemplateWithPodMetadata))
func TestWorkflowTemplateWithPodMetadata(t *testing.T) {
cancel, controller := newController(wfv1.MustUnmarshalWorkflow(wfWithTemplateRef), wfv1.MustUnmarshalClusterWorkflowTemplate(wfTemplateWithPodMetadata))
defer cancel()

ctx := context.Background()
Expand All @@ -695,7 +695,7 @@ func TestWorkflowTemplateWithPodMetedata(t *testing.T) {
assert.Equal(t, wfv1.WorkflowRunning, woc.wf.Status.Phase)
pods, err := listPods(woc)
assert.NoError(t, err)

Check failure on line 697 in workflow/controller/operator_workflow_template_ref_test.go

View workflow job for this annotation

GitHub Actions / Lint

require-error: for error assertions use require (testifylint)
assert.True(t, len(pods.Items) > 0, "pod was not created successfully")
assert.NotEmpty(t, len(pods.Items) > 0, "pod was not created successfully")
pod := pods.Items[0]
assert.Contains(t, pod.Labels, "caller-label")
assert.Contains(t, pod.Labels, "workflow-template-label")
Expand Down

0 comments on commit ae8a11f

Please sign in to comment.