Skip to content

Commit 322d17c

Browse files
committed
chore: update substitutions
1 parent b70ad04 commit 322d17c

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.ci/cloudbuild.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
# limitations under the License.
1414

1515
steps:
16+
- id: check the private DNS zone and the private connection
17+
name: gcr.io/cloud-builders/git
18+
entrypoint: bash
19+
args:
20+
- '-c'
21+
- |
22+
apt-get update
23+
apt-get install dnsutils -y
24+
echo "dig ${_DNS_NAME} ..."
25+
dig ${_DNS_NAME}
26+
1627
- id: run integration tests
1728
name: python:${_VERSION}
1829
entrypoint: bash
@@ -109,6 +120,7 @@ availableSecrets:
109120
substitutions:
110121
_VERSION: ${_VERSION}
111122
_IP_TYPE: ${_IP_TYPE}
123+
_DNS_NAME: ${_DNS_NAME}
112124

113125
options:
114126
dynamicSubstitutions: true

tests/system/test_pymysql_connection.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ def create_sqlalchemy_engine(
9090

9191
def test_pymysql_connection() -> None:
9292
"""Basic test to get time from database."""
93-
inst_conn_name = os.environ["MYSQL_PSA_CONNECTION_NAME"]
94-
user = os.environ["MYSQL_PSA_USER"]
95-
password = os.environ["MYSQL_PSA_PASS"]
93+
inst_conn_name = os.environ.get(
94+
"MYSQL_PSA_CONNECTION_NAME", os.environ["MYSQL_CONNECTION_NAME"]
95+
)
96+
user = os.environ.get("MYSQL_PSA_USER", os.environ["MYSQL_USER"])
97+
password = os.environ.get("MYSQL_PSA_PASS", os.environ["MYSQL_PASS"])
9698
db = os.environ["MYSQL_DB"]
9799
ip_type = os.environ.get("IP_TYPE", "public")
98100

0 commit comments

Comments
 (0)