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:
Matthieu MOREL
2024-06-17 15:05:27 +02:00
committed by GitHub
parent 4494fe5d3d
commit d7fc1bf2d7
10 changed files with 124 additions and 117 deletions

View File

@@ -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())
}