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

TESTING: parse_tests files should be uniformly formatted and sorted #3272

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tlimoncelli
Copy link
Contributor

Problem:

The format of files in pkg/js/parse_tests are inconsistent, which makes refactoring difficult.

A future refactoring will cause these tests to fail because the .Records lists will be in a different (but equivalent) order. Currently the data is in the same order as the records are input. In the future, the ordering will be different. The order of .Records doesn't matter, thus this test data is brittle.

Solutions:

  • All .js files are passed through dnscontrol fmt -i x -o x
  • All .json files are passed through fmtjson
  • The .Records in .json files are now PrettySort'ed, so that the order is predictable.

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.

1 participant