mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
refactor: add regression test for long parameter values (#1617)
* refactor: add regression test for long parameter values * refactor: format file
This commit is contained in:
parent
312b5d42e8
commit
b53912aef9
@ -20,13 +20,7 @@ export type CreateSchemaType<T> = FromSchema<
|
||||
{
|
||||
definitionsPath: 'components/schemas';
|
||||
deserialize: [
|
||||
{
|
||||
pattern: {
|
||||
type: 'string';
|
||||
format: 'date';
|
||||
};
|
||||
output: Date;
|
||||
},
|
||||
{ pattern: { type: 'string'; format: 'date' }; output: Date },
|
||||
];
|
||||
}
|
||||
>;
|
||||
|
@ -2199,3 +2199,27 @@ test('should add default constraint values for single-valued constraints', async
|
||||
.expect(200)
|
||||
.expect((res) => expectValues(res, constraintValues.values));
|
||||
});
|
||||
|
||||
test('should allow long parameter values', async () => {
|
||||
const project = await db.stores.projectStore.create({
|
||||
id: uuidv4(),
|
||||
name: uuidv4(),
|
||||
description: uuidv4(),
|
||||
});
|
||||
|
||||
const toggle = await db.stores.featureToggleStore.create(project.id, {
|
||||
name: uuidv4(),
|
||||
});
|
||||
|
||||
const strategy = {
|
||||
name: uuidv4(),
|
||||
parameters: { a: 'b'.repeat(500) },
|
||||
};
|
||||
|
||||
await app.request
|
||||
.post(
|
||||
`/api/admin/projects/${project.id}/features/${toggle.name}/environments/default/strategies`,
|
||||
)
|
||||
.send(strategy)
|
||||
.expect(200);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user