1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

fix: broken feature.e2e test + make error message clearer (#3623)

This PR fixes a broken e2e test by relaxing what it checks for. It must
have been developed in parallel so that the test wasn't included before
merging into main.
This commit is contained in:
Thomas Heartman 2023-04-26 08:38:53 +02:00 committed by GitHub
parent b2bb5502b4
commit 0a613de308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -301,7 +301,7 @@ export const fromOpenApiValidationErrors = (
return new UnleashError({
name: 'ValidationError',
message:
"The request payload you provided doesn't conform to the schema. Check the `details` property for a list of errors that we found.",
"Request validation failed: the payload you provided doesn't conform to the schema. Check the `details` property for a list of errors that we found.",
// @ts-expect-error We know that the list is non-empty
details,
});

View File

@ -916,6 +916,7 @@ test('Should throw error when updating a flexibleRollout strategy with "" for st
.expect((res) => {
const result = res.body;
expect(res.status).toBe(400);
expect(result.error).toBe('Request validation failed');
expect(result.message.includes('validation'));
expect(result.message.includes('failed'));
});
});