fix: enable and fixes rules from testifylint on test package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/utils/pointer"
|
||||
@@ -65,7 +66,7 @@ func TestMixinRestrictedPodSecurity(t *testing.T) {
|
||||
for _, pod := range restrictablePods {
|
||||
t.Run(pod.Name, func(t *testing.T) {
|
||||
p := pod // closure
|
||||
assert.NoError(t, MixinRestrictedPodSecurity(&p))
|
||||
require.NoError(t, MixinRestrictedPodSecurity(&p))
|
||||
assert.Equal(t, GetRestrictedPodSecurityContext(), p.Spec.SecurityContext,
|
||||
"Mixed in PodSecurityContext should equal the from-scratch PodSecurityContext")
|
||||
assert.Equal(t, GetRestrictedContainerSecurityContext(), p.Spec.Containers[0].SecurityContext,
|
||||
|
||||
Reference in New Issue
Block a user