mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
test: Reset numeric features as well between e2e tests (#12542)
This commit is contained in:
parent
8a42d55d91
commit
95f055d23a
|
@ -103,7 +103,7 @@ export class E2EController {
|
|||
[LICENSE_FEATURES.AI_CREDITS]: false,
|
||||
};
|
||||
|
||||
private numericFeatures: Record<NumericLicenseFeature, number> = {
|
||||
private static readonly numericFeaturesDefaults: Record<NumericLicenseFeature, number> = {
|
||||
[LICENSE_QUOTAS.TRIGGER_LIMIT]: -1,
|
||||
[LICENSE_QUOTAS.VARIABLES_LIMIT]: -1,
|
||||
[LICENSE_QUOTAS.USERS_LIMIT]: -1,
|
||||
|
@ -112,6 +112,19 @@ export class E2EController {
|
|||
[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(
|
||||
license: License,
|
||||
private readonly settingsRepo: SettingsRepository,
|
||||
|
@ -181,6 +194,11 @@ export class E2EController {
|
|||
for (const feature of Object.keys(this.enabledFeatures)) {
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue