fix: enable empty and len rules from testifylint on pkg package

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>

Kubernetes-commit: f014b754fb5925dfbca6e27a44d0c3968b157e14
This commit is contained in:
Matthieu MOREL
2024-06-28 21:20:13 +02:00
committed by Kubernetes Publisher
parent 7f36d816ee
commit acc5917341
4 changed files with 6 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ func TestOpenAPIDiskCache(t *testing.T) {
require.NoError(t, err)
defer fakeServer.HttpServer.Close()
require.Greater(t, len(fakeServer.ServedDocuments), 0)
require.NotEmpty(t, fakeServer.ServedDocuments)
client, err := NewCachedDiscoveryClientForConfig(
&restclient.Config{Host: fakeServer.HttpServer.URL},
@@ -175,7 +175,7 @@ func TestOpenAPIDiskCache(t *testing.T) {
paths, err := openapiClient.Paths()
require.NoError(t, err)
assert.Equal(t, 1, fakeServer.RequestCounters["/openapi/v3"])
require.Greater(t, len(paths), 0)
require.NotEmpty(t, paths)
contentTypes := []string{
runtime.ContentTypeJSON, openapi.ContentTypeOpenAPIV3PB,