Skip to content

Commit 26d7bfb

Browse files
authored
Merge pull request #312 from openshift-cherrypick-robot/cherry-pick-311-to-enterprise-3.9
[enterprise-3.9] Bug 1551904 - Deduplicate NetworkPolicy from availableKinds
2 parents 289b96e + 35bd9fb commit 26d7bfb

File tree

7 files changed

+19
-5
lines changed

7 files changed

+19
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ phantomjsdriver.log
88
.DS_Store
99
test/test-results.xml
1010
npm-debug.log
11+
Chrome_*

dist/origin-web-common-services.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3904,8 +3904,9 @@ angular.module('openshiftCommonServices')
39043904
// group/kind. This is unusual, so we are special casing these.
39053905
groups: [{group: 'authorization.openshift.io'}],
39063906
kinds: [
3907+
{group: 'extensions', kind: 'DaemonSet'},
39073908
{group: 'extensions', kind: 'HorizontalPodAutoscaler'},
3908-
{group: 'extensions', kind: 'DaemonSet'}
3909+
{group: 'extensions', kind: 'NetworkPolicy'}
39093910
]
39103911
});
39113912
;'use strict';

dist/origin-web-common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,8 +1425,9 @@ angular.module('openshiftCommonServices')
14251425
// group/kind. This is unusual, so we are special casing these.
14261426
groups: [{group: 'authorization.openshift.io'}],
14271427
kinds: [
1428+
{group: 'extensions', kind: 'DaemonSet'},
14281429
{group: 'extensions', kind: 'HorizontalPodAutoscaler'},
1429-
{group: 'extensions', kind: 'DaemonSet'}
1430+
{group: 'extensions', kind: 'NetworkPolicy'}
14301431
]
14311432
});
14321433
;'use strict';

dist/origin-web-common.min.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,13 @@ group: "authorization.openshift.io"
469469
} ],
470470
kinds: [ {
471471
group: "extensions",
472+
kind: "DaemonSet"
473+
}, {
474+
group: "extensions",
472475
kind: "HorizontalPodAutoscaler"
473476
}, {
474477
group: "extensions",
475-
kind: "DaemonSet"
478+
kind: "NetworkPolicy"
476479
} ]
477480
}), angular.module("openshiftCommonServices").constant("API_PREFERRED_VERSIONS", {
478481
appliedclusterresourcequotas: {

src/constants/apiDedupe.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ angular.module('openshiftCommonServices')
66
// group/kind. This is unusual, so we are special casing these.
77
groups: [{group: 'authorization.openshift.io'}],
88
kinds: [
9+
{group: 'extensions', kind: 'DaemonSet'},
910
{group: 'extensions', kind: 'HorizontalPodAutoscaler'},
10-
{group: 'extensions', kind: 'DaemonSet'}
11+
{group: 'extensions', kind: 'NetworkPolicy'}
1112
]
1213
});

test/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function(config) {
5757
},
5858

5959
// web server port
60-
port: 8443,
60+
port: 9443,
6161

6262
colors: true,
6363

test/spec/services/apiServiceSpec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,13 @@ describe("APIService", function() {
461461
expect(_.find(allKinds, toExclude)).toEqual(undefined);
462462
});
463463

464+
it('should NOT return kind: NetworkPolicy with group: extensions', function() {
465+
var allKinds = APIService.availableKinds(true);
466+
var toExclude = { group: 'extensions', kind: 'NetworkPolicy' };
467+
468+
expect(_.find(allKinds, toExclude)).toEqual(undefined);
469+
});
470+
464471
it('should NOT return any resource with group: authorization.openshift.io', function() {
465472
var allKinds = APIService.availableKinds(true);
466473
var toExclude = { group: 'authorization.openshift.io' };

0 commit comments

Comments
 (0)