File tree Expand file tree Collapse file tree 2 files changed +23
-17
lines changed
pkg/handlers/generic/mutation/imageregistries/credentials/tests Expand file tree Collapse file tree 2 files changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,6 @@ linters-settings:
74
74
75
75
issues :
76
76
exclude-rules :
77
- # ignore errcheck for code under a /test folder
78
- - path : " test/*"
79
- linters :
80
- - errcheck
81
77
# ignore errcheck for flags.Parse (it is expected that we flag.ExitOnError)
82
78
# ignore response.WriteError as it always returns the err it was passed
83
79
- source : " flags.Parse|response.WriteError"
Original file line number Diff line number Diff line change 8
8
"testing"
9
9
10
10
"github.com/onsi/gomega"
11
+ "github.com/stretchr/testify/require"
11
12
corev1 "k8s.io/api/core/v1"
12
13
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13
14
"k8s.io/apiserver/pkg/storage/names"
@@ -35,22 +36,31 @@ func TestGeneratePatches(
35
36
36
37
// Server side apply does not work with the fake client, hack around it by pre-creating empty Secrets
37
38
// https://github.com/kubernetes-sigs/controller-runtime/issues/2341
38
- fakeClient .Create (
39
- context .Background (),
40
- newTestSecret (validSecretName , request .Namespace ),
39
+ require .NoError (
40
+ t ,
41
+ fakeClient .Create (
42
+ context .Background (),
43
+ newTestSecret (validSecretName , request .Namespace ),
44
+ ),
41
45
)
42
- fakeClient .Create (
43
- context .Background (),
44
- newEmptySecret (
45
- request .KubeadmControlPlaneTemplateRequestObjectName + "-registry-config" ,
46
- request .Namespace ,
46
+ require .NoError (
47
+ t ,
48
+ fakeClient .Create (
49
+ context .Background (),
50
+ newEmptySecret (
51
+ request .KubeadmControlPlaneTemplateRequestObjectName + "-registry-config" ,
52
+ request .Namespace ,
53
+ ),
47
54
),
48
55
)
49
- fakeClient .Create (
50
- context .Background (),
51
- newEmptySecret (
52
- request .KubeadmConfigTemplateRequestObjectName + "-registry-config" ,
53
- request .Namespace ,
56
+ require .NoError (
57
+ t ,
58
+ fakeClient .Create (
59
+ context .Background (),
60
+ newEmptySecret (
61
+ request .KubeadmConfigTemplateRequestObjectName + "-registry-config" ,
62
+ request .Namespace ,
63
+ ),
54
64
),
55
65
)
56
66
You can’t perform that action at this time.
0 commit comments