Skip to content

Commit

Permalink
fix(rbac): fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
PatAKnight committed Feb 5, 2024
1 parent 193c21f commit cd9a6a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/rbac-backend/src/service/policies-rest-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
Source,
} from '@janus-idp/backstage-plugin-rbac-common';

import { PolicyMetadataStorage } from '../database/policy-metadata-storage';
import { RoleMetadataStorage } from '../database/role-metadata';
import { EnforcerDelegate } from './enforcer-delegate';
import { RBACPermissionPolicy } from './permission-policy';
Expand Down Expand Up @@ -141,6 +142,13 @@ const roleMetadataStorageMock: RoleMetadataStorage = {
removeRoleMetadata: jest.fn().mockImplementation(),
};

const policyMetadataStorageMock: PolicyMetadataStorage = {
findPolicyMetadataBySource: jest.fn().mockImplementation(),
findPolicyMetadata: jest.fn().mockImplementation(),
createPolicyMetadata: jest.fn().mockImplementation(),
removePolicyMetadata: jest.fn().mockImplementation(),
};

const conditionalStorage = {
getConditions: jest.fn().mockImplementation(),
createCondition: jest.fn().mockImplementation(),
Expand Down Expand Up @@ -231,6 +239,7 @@ describe('REST policies api', () => {
conditionalStorage,
mockEnforcer as EnforcerDelegate,
roleMetadataStorageMock,
policyMetadataStorageMock,
knex,
),
};
Expand Down

0 comments on commit cd9a6a5

Please sign in to comment.