From b3f48f736f0d7e22f57253c333ec0381a3aa27ee Mon Sep 17 00:00:00 2001 From: shiywang Date: Tue, 11 Apr 2017 01:24:44 +0800 Subject: [PATCH] make deployment unit tests need to respect subresources --- pkg/controller/deployment/deployment_controller_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index 686030ceabd..7e2806f3d7f 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -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 }