Skip to content

Commit

Permalink
chore(lint): enable testifylint (#13467)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Clucas <[email protected]>
  • Loading branch information
Joibel authored Aug 14, 2024
1 parent 3f161cb commit 89f2ed1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ linters:
- rowserrcheck
- sqlclosecheck
- staticcheck
- testifylint
- typecheck
- unparam
- unused
Expand Down
2 changes: 1 addition & 1 deletion server/artifacts/artifact_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ func TestArtifactServer_GetArtifactFile(t *testing.T) {
if tt.isDirectory {
fmt.Printf("got directory listing:\n%s\n", all)
// verify that the files are contained in the listing we got back
assert.Equal(t, len(tt.directoryFiles), strings.Count(string(all), "<li>"))
assert.Len(t, tt.directoryFiles, strings.Count(string(all), "<li>"))
for _, file := range tt.directoryFiles {
assert.True(t, strings.Contains(string(all), file))
}
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,12 +813,12 @@ spec:
})).
Then().
ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) {
assert.Equal(t, status.Phase, v1alpha1.WorkflowFailed)
assert.Equal(t, v1alpha1.WorkflowFailed, status.Phase)
}).
ExpectWorkflowNode(func(status v1alpha1.NodeStatus) bool {
return status.DisplayName == onExitNodeName
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) {
assert.Equal(t, true, status.NodeFlag.Hooked)
assert.True(t, status.NodeFlag.Hooked)
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase)
}))
}
Expand Down Expand Up @@ -862,12 +862,12 @@ spec:
})).
Then().
ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) {
assert.Equal(t, status.Phase, v1alpha1.WorkflowFailed)
assert.Equal(t, v1alpha1.WorkflowFailed, status.Phase)
}).
ExpectWorkflowNode(func(status v1alpha1.NodeStatus) bool {
return status.DisplayName == onExitNodeName
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) {
assert.Equal(t, true, status.NodeFlag.Hooked)
assert.True(t, status.NodeFlag.Hooked)
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase)
}))
}
Expand Down

0 comments on commit 89f2ed1

Please sign in to comment.