yuvipanda / pre-commit-hook-ensure-sops

pre-commit hook to ensure that files that should be encrypted with sops are
BSD 3-Clause "New" or "Revised" License
35 stars 19 forks source link

Add unit tests for the package #16

Closed nialov closed 1 year ago

nialov commented 1 year ago

Problem

There is no way to verify that the package works without some kind of test framework that can be run after installation.

Solution

I suggest starting with a few simple tests for the validate_enc and check_file functions. pytestseems reasonable as the test runner.

Let me know if you want me to make a pull request for this! I would add pytest to setup.py test_requires dependencies and draft a few simple tests that check a valid and invalid file at the very least.

yuvipanda commented 1 year ago

Yes, would love to have a PR with some tests! Thank you so much!