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

Integration test framework requires sorted data #1097

Open
1 of 2 tasks
Licenser opened this issue Jun 30, 2021 · 1 comment
Open
1 of 2 tasks

Integration test framework requires sorted data #1097

Licenser opened this issue Jun 30, 2021 · 1 comment
Labels
_complexity:medium A task with a medium complexity that should be challanging enhancement New feature or request _size:medium A medium sized task that will take some time to complete

Comments

@Licenser
Copy link
Member

Licenser commented Jun 30, 2021

Problem

As part of the integration tets we only support textual comparisons, without understanding of the structure:

contains checks if a given string exists somewhere in the file

equals_file checks if the two files are identical

The problem arises that we produce structured data where equality isn't defined by textual comparison. For example the two JSON objects {"a":1,"b":2} and {"b":2,"a":1} are equal but not identical for textual comparison.

This limits us to either dictate the exact output or to only rely on non structured data to compare.

Possible Solution(s)

  • A short term solution is the introduction of a json-sorted codec using our sorted_serialize function.
  • A long term solution would be to introduce some asserts that allow analysis and logical comparison instead of textual one (tremor script for example ;)
@Licenser Licenser added the bug Something isn't working label Jun 30, 2021
@Licenser Licenser self-assigned this Jun 30, 2021
@Licenser Licenser added _complexity:low A task with a low complexity that should be easy to understand _size:medium A medium sized task that will take some time to complete labels Jun 30, 2021
@Licenser Licenser removed their assignment Jun 30, 2021
@Licenser Licenser added _complexity:medium A task with a medium complexity that should be challanging and removed _complexity:low A task with a low complexity that should be easy to understand labels Jun 30, 2021
@Licenser Licenser added enhancement New feature or request and removed bug Something isn't working labels Jul 9, 2021
@Licenser
Copy link
Member Author

Licenser commented Jul 9, 2021

Reclassifying this as a enhancement since the immediate problem is resolved by adding json-sorted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_complexity:medium A task with a medium complexity that should be challanging enhancement New feature or request _size:medium A medium sized task that will take some time to complete
Projects
None yet
Development

No branches or pull requests

1 participant