Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use coverage instead of equality to test error payload #391

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

nshy
Copy link

@nshy nshy commented Mar 29, 2024

We are going to add missing 'user' payload field for ACCESS_DENIED error which will break current tests. Let fix tests to allow adding new payload fields for errors.

Need for tarantool/tarantool#9108

@nshy nshy force-pushed the nshi/fix-error-payload-tests branch 2 times, most recently from 8dffb1e to 24f3774 Compare March 29, 2024 16:14
In this version (latest currently) require.Subset supports maps
correctly. Also it has the feature documented.
We are going to add missing 'user' payload field for ACCESS_DENIED error
which will break current tests. Let fix tests to allow adding
new payload fields for errors.

Need for tarantool/tarantool#9108
@oleg-jukovec
Copy link
Collaborator

oleg-jukovec commented Mar 29, 2024

Thank you for the patch!

At the first glance it seems like it would be better to check different fields for different versions of Tarantool. But on the other hand, there may be too many ifs in the future. So I don't insist.

@nshy nshy assigned DerekBum and unassigned oleg-jukovec Apr 1, 2024
Copy link

@DerekBum DerekBum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@nshy nshy assigned oleg-jukovec and unassigned DerekBum Apr 1, 2024
@oleg-jukovec oleg-jukovec merged commit 3f44945 into master Apr 1, 2024
26 checks passed
@oleg-jukovec oleg-jukovec deleted the nshi/fix-error-payload-tests branch April 1, 2024 10:11
@nshy
Copy link
Author

nshy commented Apr 1, 2024

Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants