chore: change error_matcher.go to use test interface instead of importing testing pkg

Kubernetes-commit: cd9df2f115a95835e07cddf740861dbd8f6f3988
This commit is contained in:
Aaron Prindle 2025-03-11 05:24:07 +00:00 committed by Kubernetes Publisher
parent 3832c300e8
commit 97b6cb1aeb
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field"
fieldtesting "k8s.io/apimachinery/pkg/util/validation/field/testing"
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
)
@ -154,7 +153,7 @@ func TestValidateDeclaratively(t *testing.T) {
} else {
results = ValidateUpdateDeclaratively(ctx, tc.options, scheme, tc.object, tc.oldObject)
}
matcher := fieldtesting.ErrorMatcher{}.ByType().ByField().ByOrigin()
matcher := field.ErrorMatcher{}.ByType().ByField().ByOrigin()
matcher.Test(t, tc.expected, results)
})
}