mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: make default for gradual rollout work on the correct strategy name (#7401)
This commit is contained in:
parent
c33901b332
commit
4eaa1525a0
@ -25,7 +25,11 @@ const apiClientResponse = [
|
||||
{
|
||||
name: 'flexibleRollout',
|
||||
constraints: [],
|
||||
parameters: { rollout: '100' },
|
||||
parameters: {
|
||||
rollout: '100',
|
||||
stickiness: 'default',
|
||||
groupId: 'test1',
|
||||
},
|
||||
variants: [],
|
||||
},
|
||||
],
|
||||
@ -169,7 +173,11 @@ test('should return correct data structure from /api/client/features', async ()
|
||||
{
|
||||
name: 'flexibleRollout',
|
||||
constraints: [],
|
||||
parameters: { rollout: '100' },
|
||||
parameters: {
|
||||
rollout: '100',
|
||||
stickiness: 'default',
|
||||
groupId: 'test1',
|
||||
},
|
||||
},
|
||||
DEFAULT_ENV,
|
||||
'test1',
|
||||
|
@ -159,7 +159,7 @@ const defaultParameters = (
|
||||
params: PartialSome<IFeatureStrategy, 'id' | 'createdAt'>,
|
||||
stickiness: string,
|
||||
) => {
|
||||
if (params.strategyName === 'gradualRollout') {
|
||||
if (params.strategyName === 'flexibleRollout') {
|
||||
return {
|
||||
rollout: '100',
|
||||
stickiness,
|
||||
|
@ -164,7 +164,7 @@ describe('strategy parameters default to sane defaults', () => {
|
||||
createdByUserId: 9999,
|
||||
});
|
||||
const strategy = await featureStrategiesStore.createStrategyFeatureEnv({
|
||||
strategyName: 'gradualRollout',
|
||||
strategyName: 'flexibleRollout',
|
||||
projectId: 'default',
|
||||
environment: 'default',
|
||||
featureName: toggle.name,
|
||||
@ -184,7 +184,7 @@ describe('strategy parameters default to sane defaults', () => {
|
||||
createdByUserId: 9999,
|
||||
});
|
||||
const strategy = await featureStrategiesStore.createStrategyFeatureEnv({
|
||||
strategyName: 'gradualRollout',
|
||||
strategyName: 'flexibleRollout',
|
||||
projectId: 'default',
|
||||
environment: 'default',
|
||||
featureName: toggle.name,
|
||||
@ -236,7 +236,7 @@ describe('strategy parameters default to sane defaults', () => {
|
||||
createdByUserId: 9999,
|
||||
});
|
||||
const strategy = await featureStrategiesStore.createStrategyFeatureEnv({
|
||||
strategyName: 'gradualRollout',
|
||||
strategyName: 'flexibleRollout',
|
||||
projectId: project.id,
|
||||
environment: 'default',
|
||||
featureName: toggle.name,
|
||||
|
Loading…
Reference in New Issue
Block a user