trufflehog
trufflehog copied to clipboard
Fake test cases sample
Description:
This PR serves as a sample for new fake test cases. It helps us verify how our detector behaves when receiving specific responses from the API. While the integration test cases work similarly, they rely on real credentials pulled from GCP, which prevents non-Truffle members from running them locally.
Please review and feel free to share any ideas or suggestions in the comments! 🚀
Do not Merge ❌ unless approved by @zricethezav @ahrav @abmussani and other key members.
Checklist:
- [ ] Tests passing (
make test-community)? - [ ] Lint passing (
make lintthis requires golangci-lint)?
Seems like it would be easier to use ConstantResponseHttpClient.
Frankly, I don't see value in this beyond testing rare/complicated edge cases.
This will become helpful when we will implement the detectors as config feature I guess.