mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
test: Reset numeric features as well between e2e tests (#12542)
This commit is contained in:
@@ -103,7 +103,7 @@ export class E2EController {
|
|||||||
[LICENSE_FEATURES.AI_CREDITS]: false,
|
[LICENSE_FEATURES.AI_CREDITS]: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
private numericFeatures: Record<NumericLicenseFeature, number> = {
|
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
||||||
[LICENSE_QUOTAS.TRIGGER_LIMIT]: -1,
|
[LICENSE_QUOTAS.TRIGGER_LIMIT]: -1,
|
||||||
[LICENSE_QUOTAS.VARIABLES_LIMIT]: -1,
|
[LICENSE_QUOTAS.VARIABLES_LIMIT]: -1,
|
||||||
[LICENSE_QUOTAS.USERS_LIMIT]: -1,
|
[LICENSE_QUOTAS.USERS_LIMIT]: -1,
|
||||||
@@ -112,6 +112,19 @@ export class E2EController {
|
|||||||
[LICENSE_QUOTAS.AI_CREDITS]: 0,
|
[LICENSE_QUOTAS.AI_CREDITS]: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private numericFeatures: Record<NumericLicenseFeature, number> = {
|
||||||
|
[LICENSE_QUOTAS.TRIGGER_LIMIT]:
|
||||||
|
E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.TRIGGER_LIMIT],
|
||||||
|
[LICENSE_QUOTAS.VARIABLES_LIMIT]:
|
||||||
|
E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.VARIABLES_LIMIT],
|
||||||
|
[LICENSE_QUOTAS.USERS_LIMIT]: E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.USERS_LIMIT],
|
||||||
|
[LICENSE_QUOTAS.WORKFLOW_HISTORY_PRUNE_LIMIT]:
|
||||||
|
E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.WORKFLOW_HISTORY_PRUNE_LIMIT],
|
||||||
|
[LICENSE_QUOTAS.TEAM_PROJECT_LIMIT]:
|
||||||
|
E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.TEAM_PROJECT_LIMIT],
|
||||||
|
[LICENSE_QUOTAS.AI_CREDITS]: E2EController.numericFeaturesDefaults[LICENSE_QUOTAS.AI_CREDITS],
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
license: License,
|
license: License,
|
||||||
private readonly settingsRepo: SettingsRepository,
|
private readonly settingsRepo: SettingsRepository,
|
||||||
@@ -181,6 +194,11 @@ export class E2EController {
|
|||||||
for (const feature of Object.keys(this.enabledFeatures)) {
|
for (const feature of Object.keys(this.enabledFeatures)) {
|
||||||
this.enabledFeatures[feature as BooleanLicenseFeature] = false;
|
this.enabledFeatures[feature as BooleanLicenseFeature] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const feature of Object.keys(this.numericFeatures)) {
|
||||||
|
this.numericFeatures[feature as NumericLicenseFeature] =
|
||||||
|
E2EController.numericFeaturesDefaults[feature as NumericLicenseFeature];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async removeActiveWorkflows() {
|
private async removeActiveWorkflows() {
|
||||||
|
|||||||
Reference in New Issue
Block a user