Skip to content

Commit 89f2ed1

Browse files
authored
chore(lint): enable testifylint (#13467)
Signed-off-by: Alan Clucas <alan@clucas.org>
1 parent 3f161cb commit 89f2ed1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ linters:
3333
- rowserrcheck
3434
- sqlclosecheck
3535
- staticcheck
36+
- testifylint
3637
- typecheck
3738
- unparam
3839
- unused

server/artifacts/artifact_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ func TestArtifactServer_GetArtifactFile(t *testing.T) {
475475
if tt.isDirectory {
476476
fmt.Printf("got directory listing:\n%s\n", all)
477477
// verify that the files are contained in the listing we got back
478-
assert.Equal(t, len(tt.directoryFiles), strings.Count(string(all), "<li>"))
478+
assert.Len(t, tt.directoryFiles, strings.Count(string(all), "<li>"))
479479
for _, file := range tt.directoryFiles {
480480
assert.True(t, strings.Contains(string(all), file))
481481
}

test/e2e/hooks_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,12 +813,12 @@ spec:
813813
})).
814814
Then().
815815
ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) {
816-
assert.Equal(t, status.Phase, v1alpha1.WorkflowFailed)
816+
assert.Equal(t, v1alpha1.WorkflowFailed, status.Phase)
817817
}).
818818
ExpectWorkflowNode(func(status v1alpha1.NodeStatus) bool {
819819
return status.DisplayName == onExitNodeName
820820
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) {
821-
assert.Equal(t, true, status.NodeFlag.Hooked)
821+
assert.True(t, status.NodeFlag.Hooked)
822822
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase)
823823
}))
824824
}
@@ -862,12 +862,12 @@ spec:
862862
})).
863863
Then().
864864
ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) {
865-
assert.Equal(t, status.Phase, v1alpha1.WorkflowFailed)
865+
assert.Equal(t, v1alpha1.WorkflowFailed, status.Phase)
866866
}).
867867
ExpectWorkflowNode(func(status v1alpha1.NodeStatus) bool {
868868
return status.DisplayName == onExitNodeName
869869
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) {
870-
assert.Equal(t, true, status.NodeFlag.Hooked)
870+
assert.True(t, status.NodeFlag.Hooked)
871871
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase)
872872
}))
873873
}

0 commit comments

Comments
 (0)