@@ -21,8 +21,8 @@ import (
21
21
22
22
oapi "github.com/openshift/origin/pkg/api"
23
23
osgraph "github.com/openshift/origin/pkg/api/graph"
24
+ appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
24
25
appsfakeclient "github.com/openshift/origin/pkg/apps/generated/internalclientset/fake"
25
- appsclientscheme "github.com/openshift/origin/pkg/apps/generated/internalclientset/scheme"
26
26
buildfakeclient "github.com/openshift/origin/pkg/build/generated/internalclientset/fake"
27
27
buildclientscheme "github.com/openshift/origin/pkg/build/generated/internalclientset/scheme"
28
28
imagefakeclient "github.com/openshift/origin/pkg/image/generated/internalclientset/fake"
@@ -438,11 +438,17 @@ func TestProjectStatus(t *testing.T) {
438
438
objs = append (objs , o )
439
439
}
440
440
441
+ // We need an empty scheme for apps to only filter objects included in
442
+ // apps.openshift.io scheme. The appsclientscheme has kube types registered
443
+ // which will break the filterByScheme.
444
+ appsScheme := runtime .NewScheme ()
445
+ appsapi .AddToScheme (appsScheme )
446
+
441
447
kc := kubefakeclient .NewSimpleClientset (filterByScheme (kubeclientscheme .Scheme , objs ... )... )
442
448
projectClient := projectfakeclient .NewSimpleClientset (filterByScheme (projectclientscheme .Scheme , objs ... )... )
443
449
buildClient := buildfakeclient .NewSimpleClientset (filterByScheme (buildclientscheme .Scheme , objs ... )... )
444
450
imageClient := imagefakeclient .NewSimpleClientset (filterByScheme (imageclientscheme .Scheme , objs ... )... )
445
- appsClient := appsfakeclient .NewSimpleClientset (filterByScheme (appsclientscheme . Scheme , objs ... )... )
451
+ appsClient := appsfakeclient .NewSimpleClientset (filterByScheme (appsScheme , objs ... )... )
446
452
routeClient := routefakeclient .NewSimpleClientset (filterByScheme (routeclientscheme .Scheme , objs ... )... )
447
453
448
454
d := ProjectStatusDescriber {
0 commit comments