Skip to content

docs(agent): add test data sanitization rules - #1174

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
K53:push-vrtlyomqxmrt
Oct 24, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
K53:push-vrtlyomqxmrt

Conversation

@K53

@K53 K53 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an agent rule to define standard dummy values and prohibited identifiers.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +469 to +470
projectID := "test-project"
clusterName := "test-cluster"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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"
}
Comment on lines +581 to +582
projectID := "test-project"
clusterName := "test-cluster"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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"
    }
@kyasbal
kyasbal added this pull request to the merge queue Oct 24, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 8e81b76 Oct 24, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants