Skip to content

Commit

Permalink
regression: validateLicenseLimits not using the expected limit (#30693)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Oct 20, 2023
1 parent 53cf1f5 commit a3b3dea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ee/packages/license/src/license.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ it('should prevent if the counter is equal or over the limit', async () => {
await expect(licenseManager.shouldPreventAction('activeUsers')).resolves.toBe(true);
});

it.skip('should not prevent an action if another limit is over the limit', async () => {
it('should not prevent an action if another limit is over the limit', async () => {
const licenseManager = await getReadyLicenseManager();

const license = await new MockedLicenseBuilder()
Expand All @@ -63,6 +63,7 @@ it.skip('should not prevent an action if another limit is over the limit', async
licenseManager.setLicenseLimitCounter('activeUsers', () => 11);
licenseManager.setLicenseLimitCounter('monthlyActiveContacts', () => 2);
await expect(licenseManager.shouldPreventAction('monthlyActiveContacts')).resolves.toBe(false);
await expect(licenseManager.shouldPreventAction('activeUsers')).resolves.toBe(true);
});

describe('Validate License Limits', () => {
Expand Down
1 change: 1 addition & 0 deletions ee/packages/license/src/license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export class LicenseManager extends Emitter<LicenseEvents> {
...(extraCount && { behaviors: ['prevent_action'] }),
isNewLicense: false,
suppressLog: !!suppressLog,
limits: [action],
context: {
[action]: {
extraCount,
Expand Down

0 comments on commit a3b3dea

Please sign in to comment.