diff --git a/src/resources/PlatformResources.ts b/src/resources/PlatformResources.ts index aab87d2e9..521b9b799 100644 --- a/src/resources/PlatformResources.ts +++ b/src/resources/PlatformResources.ts @@ -27,6 +27,7 @@ class PlatformResources { group: Group; organization: Organization; apiKey: ApiKey; + securityCache: SecurityCache; registerAll() { resourcesMap.forEach(({key, resource}) => { diff --git a/src/resources/tests/PlatformResources.spec.ts b/src/resources/tests/PlatformResources.spec.ts index 1a4d0610a..d2782cce8 100644 --- a/src/resources/tests/PlatformResources.spec.ts +++ b/src/resources/tests/PlatformResources.spec.ts @@ -1,9 +1,11 @@ +import ApiKey from '../ApiKeys/ApiKeys'; import AWS from '../AWS/AWS'; import Catalog from '../Catalogs/Catalog'; import Cluster from '../Clusters/Cluster'; import Group from '../Groups/Groups'; import Organization from '../Organizations/Organization'; import PlatformResources from '../PlatformResources'; +import SecurityCache from '../SecurityCache/SecurityCache'; describe('PlatformResources', () => { describe('registerAll', () => { @@ -46,5 +48,21 @@ describe('PlatformResources', () => { expect(platformResources.organization).toBeDefined(); expect(platformResources.organization).toBeInstanceOf(Organization); }); + + it('should register the securityCache resource on the platform instance', () => { + const platformResources = new PlatformResources(); + platformResources.registerAll(); + + expect(platformResources.securityCache).toBeDefined(); + expect(platformResources.securityCache).toBeInstanceOf(SecurityCache); + }); + + it('should register the api keys ressource on the platform instance', () => { + const platformResources = new PlatformResources(); + platformResources.registerAll(); + + expect(platformResources.apiKey).toBeDefined(); + expect(platformResources.apiKey).toBeInstanceOf(ApiKey); + }); }); });