mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Fix incorrect reference to name in v1beta3 API.
This commit is contained in:
@@ -53,7 +53,7 @@ func (s *SelectionPredicate) Matches(obj runtime.Object) (bool, error) {
|
||||
// name.
|
||||
func (s *SelectionPredicate) MatchesSingle() (string, bool) {
|
||||
// TODO: should be namespace.name
|
||||
if name, ok := s.Field.RequiresExactMatch("name"); ok {
|
||||
if name, ok := s.Field.RequiresExactMatch("metadata.name"); ok {
|
||||
return name, true
|
||||
}
|
||||
return "", false
|
||||
|
@@ -68,9 +68,9 @@ func TestSelectionPredicate(t *testing.T) {
|
||||
shouldMatch: false,
|
||||
},
|
||||
"D": {
|
||||
fieldSelector: "name=12345",
|
||||
fieldSelector: "metadata.name=12345",
|
||||
labels: labels.Set{},
|
||||
fields: fields.Set{"name": "12345"},
|
||||
fields: fields.Set{"metadata.name": "12345"},
|
||||
shouldMatch: true,
|
||||
matchSingleKey: "12345",
|
||||
},
|
||||
|
Reference in New Issue
Block a user