awslabs / git-secrets

Prevents you from committing secrets and credentials into git repositories
Apache License 2.0
12.36k stars 1.17k forks source link

test_helper: make test setup more hermetic #155

Open nasamuffin opened 4 years ago

nasamuffin commented 4 years ago

When running tests locally outside of a container (e.g. git clone git-secrets; make test), if a user is already using git-secrets by default in their system config and default gitdir template, tests which expect not to have git-secrets installed will fail. Instead, let's remove all hooks when we create a directory without the testbench's template and ignore the system config which may contain patterns that conflict with the testbench.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.