Repository navigation
docs(agent): add test data sanitization rules - #1174
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new rule file ".agents/rules/test-data-rule.md" outlining standards for test data sanitization and dummy values. In accordance with these standards, various test files are updated to replace real project IDs, cluster names, IP addresses, and usernames with sanitized dummy values. The review feedback suggests retrieving the project ID and cluster name from environment variables (with dummy values as fallbacks) in the live integration tests to allow them to run successfully against real GCP resources.
| projectID := "test-project" | ||
| clusterName := "test-cluster" |
There was a problem hiding this comment.
In live integration tests, hardcoding the dummy project ID and cluster name prevents running the tests against real GCP resources. Retrieve these values from environment variables (with the dummy values as fallbacks) to allow running the live tests successfully.
| projectID := "test-project" | |
| clusterName := "test-cluster" | |
| projectID := os.Getenv("GCP_PROJECT_ID") | |
| if projectID == "" { | |
| projectID = "test-project" | |
| } | |
| clusterName := os.Getenv("TEST_CLUSTER_NAME") | |
| if clusterName == "" { | |
| clusterName = "test-cluster" | |
| } |
| projectID := "test-project" | ||
| clusterName := "test-cluster" |
There was a problem hiding this comment.
In live integration tests, hardcoding the dummy project ID and cluster name prevents running the tests against real GCP resources. Retrieve these values from environment variables (with the dummy values as fallbacks) to allow running the live tests successfully.
projectID := os.Getenv("GCP_PROJECT_ID")
if projectID == "" {
projectID = "test-project"
}
clusterName := os.Getenv("TEST_CLUSTER_NAME")
if clusterName == "" {
clusterName = "test-cluster"
}| } | ||
|
|
||
| projectID := "tse-kakeru" | ||
| projectID := "test-project" |
There was a problem hiding this comment.
In live integration tests, hardcoding the dummy project ID prevents running the tests against real GCP resources. Retrieve the project ID from the GCP_PROJECT_ID environment variable with a fallback to the dummy value.
projectID := os.Getenv("GCP_PROJECT_ID")
if projectID == "" {
projectID = "test-project"
}8e81b76
Summary