trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Fake test cases sample

Open kashifkhan0771 opened this issue 11 months ago • 2 comments

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 lint this requires golangci-lint)?

kashifkhan0771 avatar Dec 23 '24 07:12 kashifkhan0771

Seems like it would be easier to use ConstantResponseHttpClient.

rgmz avatar Dec 24 '24 16:12 rgmz

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.

kashifkhan0771 avatar Jan 08 '25 11:01 kashifkhan0771