mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
chore: enable require-error rule from errorlint linter on controller folder (#18690)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: pasha-codefresh <pavel@codefresh.io> Co-authored-by: pasha-codefresh <pavel@codefresh.io>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/sirupsen/logrus/hooks/test"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/dynamic/fake"
|
||||
@@ -133,7 +134,7 @@ func TestInit(t *testing.T) {
|
||||
|
||||
err = nc.Init(ctx)
|
||||
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ func TestInitTimeout(t *testing.T) {
|
||||
err = nc.Init(ctx)
|
||||
|
||||
// Expect an error & add assertion for the error message
|
||||
assert.Error(t, err)
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, "Timed out waiting for caches to sync", err.Error())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user