Skip to content

Commit 95214e3

Browse files
sdks/python: skip cloudsql tests if ALLOYDB_PASSWORD not set
1 parent 6f67233 commit 95214e3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sdks/python/apache_beam/transforms/enrichment_handlers/cloudsql_it_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,19 +545,22 @@ def tearDownClass(cls):
545545
cls._db = None
546546

547547

548+
@unittest.skipUnless(
549+
os.environ.get('ALLOYDB_PASSWORD'),
550+
"ALLOYDB_PASSWORD environment var is not provided")
548551
class TestCloudSQLPostgresEnrichment(BaseCloudSQLDBEnrichment):
549552
_db_adapter = DatabaseTypeAdapter.POSTGRESQL
550553

551554
# Configuration required for locating the CloudSQL instance.
552555
_table_id = "product_details_cloudsql_pg_enrichment"
553-
_gcp_project_id = "cultivated-snow-456016-c0"
556+
_gcp_project_id = "apache-beam-testing"
554557
_region = "us-central1"
555558
_instance_name = "beam-integration-tests"
556559
_instance_connection_uri = f"{_gcp_project_id}:{_region}:{_instance_name}"
557560

558561
# Configuration required for authenticating to the CloudSQL instance.
559562
_user = "postgres"
560-
_password = "password"
563+
_password = os.getenv("ALLOYDB_PASSWORD")
561564
_db_id = "postgres"
562565

563566
_metadata = MetaData()

0 commit comments

Comments
 (0)