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

Fake test cases sample #3813

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Dec 23, 2024

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 kashifkhan0771 changed the title Tests/fake testcase sample Fake test cases sample Dec 23, 2024
@rgmz
Copy link
Contributor

rgmz commented Dec 24, 2024

Seems like it would be easier to use ConstantResponseHttpClient.

@kashifkhan0771 kashifkhan0771 marked this pull request as ready for review December 26, 2024 05:57
@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner December 26, 2024 05:57
Copy link
Contributor

@rgmz rgmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly, I don't see value in this beyond testing rare/complicated edge cases.

While the integration test cases work similarly, they rely on real credentials pulled from GCP, which prevents non-Truffle members from running them locally.

There is no substitution for integration tests. GitHub Actions should run the integration tests but this has been broken for a while.

@kashifkhan0771
Copy link
Contributor Author

kashifkhan0771 commented Jan 8, 2025

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 kashifkhan0771 self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants