-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gitar
committed
Sep 20, 2024
1 parent
bb32336
commit 0e6d062
Showing
9 changed files
with
38 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ let segmentService: ISegmentService; | |
let eventService: EventService; | ||
let environmentService: EnvironmentService; | ||
let unleashConfig: IUnleashConfig; | ||
const TEST_USER_ID = -9999; | ||
const mockConstraints = (): IConstraint[] => { | ||
return Array.from({ length: 5 }).map(() => ({ | ||
values: ['x', 'y', 'z'], | ||
|
@@ -51,7 +50,7 @@ const irrelevantDate = new Date(); | |
|
||
beforeAll(async () => { | ||
const config = createTestConfig({ | ||
experimental: { flags: { archiveProjects: true } }, | ||
experimental: { flags: {} }, | ||
}); | ||
db = await dbInit( | ||
'feature_toggle_service_v2_service_serial', | ||
|
@@ -77,7 +76,6 @@ beforeEach(async () => { | |
}); | ||
test('Should create feature flag strategy configuration', async () => { | ||
const projectId = 'default'; | ||
const username = 'feature-flag'; | ||
const config: Omit<FeatureStrategySchema, 'id'> = { | ||
name: 'default', | ||
constraints: [], | ||
|
@@ -104,7 +102,6 @@ test('Should create feature flag strategy configuration', async () => { | |
|
||
test('Should be able to update existing strategy configuration', async () => { | ||
const projectId = 'default'; | ||
const username = 'existing-strategy'; | ||
const featureName = 'update-existing-strategy'; | ||
const config: Omit<FeatureStrategySchema, 'id'> = { | ||
name: 'default', | ||
|
@@ -139,8 +136,6 @@ test('Should be able to update existing strategy configuration', async () => { | |
test('Should be able to get strategy by id', async () => { | ||
const featureName = 'get-strategy-by-id'; | ||
const projectId = 'default'; | ||
|
||
const userName = 'strategy'; | ||
const config: Omit<FeatureStrategySchema, 'id'> = { | ||
name: 'default', | ||
constraints: [], | ||
|
@@ -168,8 +163,6 @@ test('Should be able to get strategy by id', async () => { | |
test('should ignore name in the body when updating feature flag', async () => { | ||
const featureName = 'body-name-update'; | ||
const projectId = 'default'; | ||
|
||
const userName = 'strategy'; | ||
const secondFeatureName = 'body-name-update2'; | ||
|
||
await service.createFeatureToggle( | ||
|
@@ -213,8 +206,6 @@ test('should ignore name in the body when updating feature flag', async () => { | |
test('should not get empty rows as features', async () => { | ||
const projectId = 'default'; | ||
|
||
const userName = 'strategy'; | ||
|
||
await service.createFeatureToggle( | ||
projectId, | ||
{ | ||
|
@@ -505,7 +496,6 @@ test('If change requests are enabled, cannot change variants without going via C | |
}); | ||
|
||
test('If CRs are protected for any environment in the project stops bulk update of variants', async () => { | ||
const user = { email: '[email protected]', username: 'test-user' } as User; | ||
const project = await stores.projectStore.create({ | ||
id: 'crOnVariantsProject', | ||
name: 'crOnVariantsProject', | ||
|
@@ -599,7 +589,6 @@ test('getPlaygroundFeatures should return ids and titles (if they exist) on clie | |
const projectId = 'default'; | ||
|
||
const title = 'custom strategy title'; | ||
const userName = 'strategy'; | ||
const config: Omit<FeatureStrategySchema, 'id'> = { | ||
name: 'default', | ||
constraints: [], | ||
|
@@ -819,7 +808,6 @@ test('Should enable disabled strategies on feature environment enabled', async ( | |
const flagName = 'enableThisFlag'; | ||
const project = 'default'; | ||
const environment = 'default'; | ||
const shouldActivateDisabledStrategies = true; | ||
await service.createFeatureToggle( | ||
project, | ||
{ | ||
|
@@ -856,7 +844,7 @@ test('Should enable disabled strategies on feature environment enabled', async ( | |
true, | ||
TEST_AUDIT_USER, | ||
{ email: '[email protected]' } as User, | ||
shouldActivateDisabledStrategies, | ||
true, | ||
); | ||
|
||
const strategy = await service.getStrategy(createdConfig.id); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters