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

Unit tests shouldn't update /data files #413

Open
alexey-yarmosh opened this issue Aug 3, 2023 · 0 comments
Open

Unit tests shouldn't update /data files #413

alexey-yarmosh opened this issue Aug 3, 2023 · 0 comments
Assignees

Comments

@alexey-yarmosh
Copy link
Member

Currently our unit tests update static files in the /data folder (cloud ip ranges, malware domains/ips, geonames) and leaves them in that state after. That brings inconsistency to dev env, for example if geo location of a dev probe is not specified in the test mock file after the test run it will be unresolvable during development. I specified current dev geo ips in that file, but that is not stable.

One of that should be done:

  • use mock-fs for all tests instead of updating real files;
  • revert files to it's prev state after the tests;
  • use same files in tests as in dev/prod (in theory may be inconsistent as files might change);
@alexey-yarmosh alexey-yarmosh self-assigned this Aug 3, 2023
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

No branches or pull requests

1 participant