mirror of https://github.com/k3s-io/k3s
Merge pull request #44324 from shiywang/fix-subresource
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324) make deployment unit tests need to respect subresources Fixes #42569 I check all the unit test code related to `Matches` method, seems there's only one line we could change to not break previous testing logic @kargakis ptal, thanks /assign @kargakispull/6/head
commit
44131a3658
|
@ -226,7 +226,7 @@ func (f *fixture) run_(deploymentName string, startInformers bool, expectError b
|
|||
}
|
||||
|
||||
expectedAction := f.actions[i]
|
||||
if !expectedAction.Matches(action.GetVerb(), action.GetResource().Resource) {
|
||||
if !(expectedAction.Matches(action.GetVerb(), action.GetResource().Resource) && action.GetSubresource() == expectedAction.GetSubresource()) {
|
||||
f.t.Errorf("Expected\n\t%#v\ngot\n\t%#v", expectedAction, action)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue