File tree Expand file tree Collapse file tree
.devcontainer/chefs_local Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
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" ,
Original file line number Diff line number Diff line change 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" ,
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" ,
Original file line number Diff line number Diff line change 11const request = require ( 'supertest' ) ;
2+ const config = require ( 'config' ) ;
23
34const { expressHelper } = require ( '../../../common/helper' ) ;
45
@@ -58,6 +59,13 @@ const basePath = '/rbac';
5859const app = expressHelper ( basePath , router ) ;
5960const 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+
6169afterEach ( ( ) => {
6270 jest . clearAllMocks ( ) ;
6371} ) ;
Original file line number Diff line number Diff line change 11const request = require ( 'supertest' ) ;
22const Problem = require ( 'api-problem' ) ;
3+ const config = require ( 'config' ) ;
34
45const { expressHelper } = require ( '../../../common/helper' ) ;
56
@@ -62,6 +63,13 @@ const basePath = '/rbac';
6263const app = expressHelper ( basePath , router ) ;
6364const 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+
6573afterEach ( ( ) => {
6674 jest . clearAllMocks ( ) ;
6775} ) ;
You can’t perform that action at this time.
0 commit comments