Commit e8bec730 by Samuel Padgett

Bug 1551904 - Deduplicate NetworkPolicy from availableKinds

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551904
parent 289b96e8
...@@ -8,3 +8,4 @@ phantomjsdriver.log ...@@ -8,3 +8,4 @@ phantomjsdriver.log
.DS_Store .DS_Store
test/test-results.xml test/test-results.xml
npm-debug.log npm-debug.log
Chrome_*
...@@ -3904,8 +3904,9 @@ angular.module('openshiftCommonServices') ...@@ -3904,8 +3904,9 @@ angular.module('openshiftCommonServices')
// group/kind. This is unusual, so we are special casing these. // group/kind. This is unusual, so we are special casing these.
groups: [{group: 'authorization.openshift.io'}], groups: [{group: 'authorization.openshift.io'}],
kinds: [ kinds: [
{group: 'extensions', kind: 'DaemonSet'},
{group: 'extensions', kind: 'HorizontalPodAutoscaler'}, {group: 'extensions', kind: 'HorizontalPodAutoscaler'},
{group: 'extensions', kind: 'DaemonSet'} {group: 'extensions', kind: 'NetworkPolicy'}
] ]
}); });
;'use strict'; ;'use strict';
......
...@@ -1425,8 +1425,9 @@ angular.module('openshiftCommonServices') ...@@ -1425,8 +1425,9 @@ angular.module('openshiftCommonServices')
// group/kind. This is unusual, so we are special casing these. // group/kind. This is unusual, so we are special casing these.
groups: [{group: 'authorization.openshift.io'}], groups: [{group: 'authorization.openshift.io'}],
kinds: [ kinds: [
{group: 'extensions', kind: 'DaemonSet'},
{group: 'extensions', kind: 'HorizontalPodAutoscaler'}, {group: 'extensions', kind: 'HorizontalPodAutoscaler'},
{group: 'extensions', kind: 'DaemonSet'} {group: 'extensions', kind: 'NetworkPolicy'}
] ]
}); });
;'use strict'; ;'use strict';
......
...@@ -469,10 +469,13 @@ group: "authorization.openshift.io" ...@@ -469,10 +469,13 @@ group: "authorization.openshift.io"
} ], } ],
kinds: [ { kinds: [ {
group: "extensions", group: "extensions",
kind: "DaemonSet"
}, {
group: "extensions",
kind: "HorizontalPodAutoscaler" kind: "HorizontalPodAutoscaler"
}, { }, {
group: "extensions", group: "extensions",
kind: "DaemonSet" kind: "NetworkPolicy"
} ] } ]
}), angular.module("openshiftCommonServices").constant("API_PREFERRED_VERSIONS", { }), angular.module("openshiftCommonServices").constant("API_PREFERRED_VERSIONS", {
appliedclusterresourcequotas: { appliedclusterresourcequotas: {
......
...@@ -6,7 +6,8 @@ angular.module('openshiftCommonServices') ...@@ -6,7 +6,8 @@ angular.module('openshiftCommonServices')
// group/kind. This is unusual, so we are special casing these. // group/kind. This is unusual, so we are special casing these.
groups: [{group: 'authorization.openshift.io'}], groups: [{group: 'authorization.openshift.io'}],
kinds: [ kinds: [
{group: 'extensions', kind: 'DaemonSet'},
{group: 'extensions', kind: 'HorizontalPodAutoscaler'}, {group: 'extensions', kind: 'HorizontalPodAutoscaler'},
{group: 'extensions', kind: 'DaemonSet'} {group: 'extensions', kind: 'NetworkPolicy'}
] ]
}); });
...@@ -57,7 +57,7 @@ module.exports = function(config) { ...@@ -57,7 +57,7 @@ module.exports = function(config) {
}, },
// web server port // web server port
port: 8443, port: 9443,
colors: true, colors: true,
......
...@@ -461,6 +461,13 @@ describe("APIService", function() { ...@@ -461,6 +461,13 @@ describe("APIService", function() {
expect(_.find(allKinds, toExclude)).toEqual(undefined); expect(_.find(allKinds, toExclude)).toEqual(undefined);
}); });
it('should NOT return kind: NetworkPolicy with group: extensions', function() {
var allKinds = APIService.availableKinds(true);
var toExclude = { group: 'extensions', kind: 'NetworkPolicy' };
expect(_.find(allKinds, toExclude)).toEqual(undefined);
});
it('should NOT return any resource with group: authorization.openshift.io', function() { it('should NOT return any resource with group: authorization.openshift.io', function() {
var allKinds = APIService.availableKinds(true); var allKinds = APIService.availableKinds(true);
var toExclude = { group: 'authorization.openshift.io' }; var toExclude = { group: 'authorization.openshift.io' };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment