fix: enable formatter rule from testifylint in module k8s.io/kubernetes

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-07-14 07:58:03 +00:00
parent 9770283c13
commit b7248077a9
7 changed files with 18 additions and 20 deletions

View File

@@ -2704,8 +2704,7 @@ func TestValidateNodeIPParam(t *testing.T) {
}
addrs, err := net.InterfaceAddrs()
if err != nil {
assert.Error(t, err, fmt.Sprintf(
"Unable to obtain a list of the node's unicast interface addresses."))
assert.Errorf(t, err, "Unable to obtain a list of the node's unicast interface addresses.")
}
for _, addr := range addrs {
var ip net.IP
@@ -2728,9 +2727,9 @@ func TestValidateNodeIPParam(t *testing.T) {
for _, test := range tests {
err := validateNodeIP(netutils.ParseIPSloppy(test.nodeIP))
if test.success {
assert.NoError(t, err, "test %s", test.testName)
assert.NoErrorf(t, err, "test %s", test.testName)
} else {
assert.Error(t, err, fmt.Sprintf("test %s", test.testName))
assert.Errorf(t, err, "test %s", test.testName)
}
}
}