Skip to content

Commit b046ea7

Browse files
authored
Feature flag updated to false for tenant feature flag (bcgov#1882)
* Updated feature flag to be false by default * Updated Classic chef About page * Updated for making feature flad for tenant false by default * Enable tenant feature in test configuration * Updated test cases
1 parent d42edb5 commit b046ea7

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

.devcontainer/chefs_local/local.sample.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"apiPath": "api/v1",
3636
"basePath": "/app",
3737
"cstarBaseUrl": "https://cstar-dev.apps.gold.devops.gov.bc.ca",
38-
"tenantFeatureEnabled": true,
38+
"tenantFeatureEnabled": false,
3939
"oidc": {
4040
"clientId": "chefs-frontend-localhost-5300",
4141
"realm": "standard",
@@ -108,7 +108,7 @@
108108
}
109109
},
110110
"cstar": {
111-
"tenantFeatureEnabled": true,
111+
"tenantFeatureEnabled": false,
112112
"endpoint": "https://cstar-dev.apps.gold.devops.gov.bc.ca/api/v1/",
113113
"listUserTenantsPath": "users/{userId}/tenants",
114114
"listGroupsForUserForTenantPath": "tenants/{tenantId}/users/{userId}/groups/shared-service-roles",

app/config/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"apiPath": "api/v1",
3636
"basePath": "/app",
3737
"cstarBaseUrl": "https://cstar-dev.apps.gold.devops.gov.bc.ca",
38-
"tenantFeatureEnabled": true,
38+
"tenantFeatureEnabled": false,
3939
"oidc": {
4040
"clientId": "chefs-frontend-localhost-5300",
4141
"realm": "standard",
@@ -108,7 +108,7 @@
108108
}
109109
},
110110
"cstar": {
111-
"tenantFeatureEnabled": true,
111+
"tenantFeatureEnabled": false,
112112
"endpoint": "https://cstar-dev.apps.gold.devops.gov.bc.ca/api/v1/",
113113
"listUserTenantsPath": "users/{userId}/tenants",
114114
"listGroupsForUserForTenantPath": "tenants/{tenantId}/users/{userId}/groups/shared-service-roles",

app/tests/unit/forms/rbac/routes.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const request = require('supertest');
2+
const config = require('config');
23

34
const { expressHelper } = require('../../../common/helper');
45

@@ -58,6 +59,13 @@ const basePath = '/rbac';
5859
const app = expressHelper(basePath, router);
5960
const appRequest = request(app);
6061

62+
beforeEach(() => {
63+
jest.spyOn(config, 'get').mockImplementation((key) => {
64+
if (key === 'cstar.tenantFeatureEnabled') return true;
65+
return undefined;
66+
});
67+
});
68+
6169
afterEach(() => {
6270
jest.clearAllMocks();
6371
});

app/tests/unit/routes/v1/rbac.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const request = require('supertest');
22
const Problem = require('api-problem');
3+
const config = require('config');
34

45
const { expressHelper } = require('../../../common/helper');
56

@@ -62,6 +63,13 @@ const basePath = '/rbac';
6263
const app = expressHelper(basePath, router);
6364
const appRequest = request(app);
6465

66+
beforeEach(() => {
67+
jest.spyOn(config, 'get').mockImplementation((key) => {
68+
if (key === 'cstar.tenantFeatureEnabled') return true;
69+
return undefined;
70+
});
71+
});
72+
6573
afterEach(() => {
6674
jest.clearAllMocks();
6775
});

0 commit comments

Comments
 (0)