Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
backoff==2.2.1
pytest==8.2.0
google-cloud-bigquery==3.27.0
google-cloud-securitycentermanagement==0.1.21
google-cloud-securitycentermanagement==0.1.22
Comment on lines 1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

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

high

To improve maintainability and avoid dependency version mismatches between your test and production environments, you should refactor this file to inherit dependencies from requirements.txt.

Currently, you have dependencies like google-cloud-securitycentermanagement duplicated, and more critically, you have a different version of google-cloud-bigquery for testing (3.27.0) than for production (3.11.4 in requirements.txt). This divergence is risky as tests may pass using features or bugfixes unavailable in the production version, leading to unexpected failures in production.

By using -r requirements.txt, you ensure that your tests run against the same dependency versions that are used in production, providing a more reliable testing environment.

-r requirements.txt
backoff==2.2.1
pytest==8.2.0

2 changes: 1 addition & 1 deletion securitycenter/snippets_management_api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
google-cloud-securitycentermanagement==0.1.21
google-cloud-securitycentermanagement==0.1.22
google-cloud-bigquery==3.11.4
google-cloud-pubsub==2.28.0