Skip to content

Commit 31917a4

Browse files
chore: audit csql test instances (#2117)
* chore: update mysql iam and postgres iam references --------- Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
1 parent d276672 commit 31917a4

File tree

12 files changed

+22
-31
lines changed

12 files changed

+22
-31
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ jobs:
130130
MYSQL_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER
131131
MYSQL_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_PASS
132132
MYSQL_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_DB
133-
MYSQL_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_JAVA_IAM_CONNECTION_NAME
134133
MYSQL_IAM_USER_JAVA:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER_IAM_JAVA
135134
POSTGRES_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_CONNECTION_NAME
136-
POSTGRES_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_IAM_CONNECTION_NAME
137135
POSTGRES_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER
138136
POSTGRES_IAM_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER_IAM_JAVA
139137
POSTGRES_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_PASS
@@ -156,10 +154,8 @@ jobs:
156154
MYSQL_USER: "${{ steps.secrets.outputs.MYSQL_USER }}"
157155
MYSQL_PASS: "${{ steps.secrets.outputs.MYSQL_PASS }}"
158156
MYSQL_DB: "${{ steps.secrets.outputs.MYSQL_DB }}"
159-
MYSQL_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.MYSQL_IAM_CONNECTION_NAME }}"
160157
MYSQL_IAM_USER: "${{ steps.secrets.outputs.MYSQL_IAM_USER_JAVA }}"
161158
POSTGRES_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
162-
POSTGRES_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_IAM_CONNECTION_NAME }}"
163159
POSTGRES_USER: "${{ steps.secrets.outputs.POSTGRES_USER }}"
164160
POSTGRES_IAM_USER: "${{ steps.secrets.outputs.POSTGRES_IAM_USER }}"
165161
POSTGRES_PASS: "${{ steps.secrets.outputs.POSTGRES_PASS }}"
@@ -241,10 +237,8 @@ jobs:
241237
MYSQL_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER
242238
MYSQL_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_PASS
243239
MYSQL_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_DB
244-
MYSQL_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_JAVA_IAM_CONNECTION_NAME
245240
MYSQL_IAM_USER_JAVA:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER_IAM_JAVA
246241
POSTGRES_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_CONNECTION_NAME
247-
POSTGRES_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_IAM_CONNECTION_NAME
248242
POSTGRES_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER
249243
POSTGRES_IAM_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER_IAM_JAVA
250244
POSTGRES_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_PASS
@@ -268,10 +262,8 @@ jobs:
268262
MYSQL_USER: "${{ steps.secrets.outputs.MYSQL_USER }}"
269263
MYSQL_PASS: "${{ steps.secrets.outputs.MYSQL_PASS }}"
270264
MYSQL_DB: "${{ steps.secrets.outputs.MYSQL_DB }}"
271-
MYSQL_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.MYSQL_IAM_CONNECTION_NAME }}"
272265
MYSQL_IAM_USER: "${{ steps.secrets.outputs.MYSQL_IAM_USER_JAVA }}"
273266
POSTGRES_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
274-
POSTGRES_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_IAM_CONNECTION_NAME }}"
275267
POSTGRES_USER: "${{ steps.secrets.outputs.POSTGRES_USER }}"
276268
POSTGRES_IAM_USER: "${{ steps.secrets.outputs.POSTGRES_IAM_USER }}"
277269
POSTGRES_PASS: "${{ steps.secrets.outputs.POSTGRES_PASS }}"

jdbc/mariadb/src/test/java/com/google/cloud/sql/mariadb/JdbcMariaDBIamAuthIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
@RunWith(JUnit4.class)
3939
public class JdbcMariaDBIamAuthIntegrationTests {
4040

41-
private static final String CONNECTION_NAME = System.getenv("MYSQL_IAM_CONNECTION_NAME");
41+
private static final String CONNECTION_NAME = System.getenv("MYSQL_CONNECTION_NAME");
4242
private static final String DB_NAME = System.getenv("MYSQL_DB");
4343
private static final String DB_USER = System.getenv("MYSQL_IAM_USER");
4444
private static final ImmutableList<String> requiredEnvVars =
45-
ImmutableList.of("MYSQL_IAM_CONNECTION_NAME", "MYSQL_DB", "MYSQL_IAM_USER");
45+
ImmutableList.of("MYSQL_CONNECTION_NAME", "MYSQL_DB", "MYSQL_IAM_USER");
4646
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
4747

4848
private HikariDataSource connectionPool;

jdbc/mysql-j-8/src/test/java/com/google/cloud/sql/mysql/JdbcMysqlJ8IAMServiceAccountImpersonationIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
@RunWith(JUnit4.class)
3939
public class JdbcMysqlJ8IAMServiceAccountImpersonationIntegrationTests {
4040

41-
private static final String CONNECTION_NAME = System.getenv("MYSQL_IAM_CONNECTION_NAME");
41+
private static final String CONNECTION_NAME = System.getenv("MYSQL_CONNECTION_NAME");
4242
private static final String DB_NAME = System.getenv("MYSQL_DB");
4343
private static final String IMPERSONATED_USER = System.getenv("IMPERSONATED_USER");
4444

4545
private static final ImmutableList<String> requiredEnvVars =
46-
ImmutableList.of("MYSQL_DB", "MYSQL_IAM_CONNECTION_NAME", "IMPERSONATED_USER");
46+
ImmutableList.of("MYSQL_DB", "MYSQL_CONNECTION_NAME", "IMPERSONATED_USER");
4747
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
4848
private HikariDataSource connectionPool;
4949

jdbc/mysql-j-8/src/test/java/com/google/cloud/sql/mysql/JdbcMysqlJ8IamAuthIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
@RunWith(JUnit4.class)
3939
public class JdbcMysqlJ8IamAuthIntegrationTests {
4040

41-
private static final String CONNECTION_NAME = System.getenv("MYSQL_IAM_CONNECTION_NAME");
41+
private static final String CONNECTION_NAME = System.getenv("MYSQL_CONNECTION_NAME");
4242
private static final String DB_NAME = System.getenv("MYSQL_DB");
4343
private static final String DB_USER = System.getenv("MYSQL_IAM_USER");
4444

4545
private static final ImmutableList<String> requiredEnvVars =
46-
ImmutableList.of("MYSQL_IAM_USER", "MYSQL_DB", "MYSQL_IAM_CONNECTION_NAME");
46+
ImmutableList.of("MYSQL_IAM_USER", "MYSQL_DB", "MYSQL_CONNECTION_NAME");
4747
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
4848
private HikariDataSource connectionPool;
4949

jdbc/postgres/src/test/java/com/google/cloud/sql/postgres/JdbcPostgresIamAuthIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public class JdbcPostgresIamAuthIntegrationTests {
4747
LoggerFactory.getLogger(JdbcPostgresIamAuthIntegrationTests.class);
4848

4949
// [START cloud_sql_connector_postgres_jdbc_iam_auth]
50-
private static final String CONNECTION_NAME = System.getenv("POSTGRES_IAM_CONNECTION_NAME");
50+
private static final String CONNECTION_NAME = System.getenv("POSTGRES_CONNECTION_NAME");
5151
private static final String DB_NAME = System.getenv("POSTGRES_DB");
5252
private static final String DB_USER = System.getenv("POSTGRES_IAM_USER");
5353
// [END cloud_sql_connector_postgres_jdbc_iam_auth]
5454
private static final ImmutableList<String> requiredEnvVars =
55-
ImmutableList.of("POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_IAM_CONNECTION_NAME");
55+
ImmutableList.of("POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_CONNECTION_NAME");
5656
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
5757

5858
private HikariDataSource connectionPool;

jdbc/postgres/src/test/java/com/google/cloud/sql/postgres/JdbcPostgresNamedConnectorIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
@RunWith(JUnit4.class)
4545
public class JdbcPostgresNamedConnectorIntegrationTests {
4646

47-
private static final String CONNECTION_NAME = System.getenv("POSTGRES_IAM_CONNECTION_NAME");
47+
private static final String CONNECTION_NAME = System.getenv("POSTGRES_CONNECTION_NAME");
4848
private static final String DB_NAME = System.getenv("POSTGRES_DB");
4949
private static final String DB_USER = System.getenv("POSTGRES_IAM_USER");
5050
private static final ImmutableList<String> requiredEnvVars =
51-
ImmutableList.of("POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_IAM_CONNECTION_NAME");
51+
ImmutableList.of("POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_CONNECTION_NAME");
5252
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
5353

5454
private HikariDataSource connectionPool;

jdbc/postgres/src/test/java/com/google/cloud/sql/postgres/JdbcPostgresQuotaProjecImpersonationtIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
@RunWith(JUnit4.class)
3939
public class JdbcPostgresQuotaProjecImpersonationtIntegrationTests {
4040

41-
private static final String CONNECTION_NAME = System.getenv("POSTGRES_IAM_CONNECTION_NAME");
41+
private static final String CONNECTION_NAME = System.getenv("POSTGRES_CONNECTION_NAME");
4242
private static final String DB_NAME = System.getenv("POSTGRES_DB");
4343
private static final String IMPERSONATED_USER = System.getenv("IMPERSONATED_USER");
4444
private static final String QUOTA_PROJECT = System.getenv("QUOTA_PROJECT");
4545

4646
private static final ImmutableList<String> requiredEnvVars =
4747
ImmutableList.of(
48-
"IMPERSONATED_USER", "POSTGRES_DB", "POSTGRES_IAM_CONNECTION_NAME", "QUOTA_PROJECT");
48+
"IMPERSONATED_USER", "POSTGRES_DB", "POSTGRES_CONNECTION_NAME", "QUOTA_PROJECT");
4949
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
5050

5151
private HikariDataSource connectionPool;

jdbc/postgres/src/test/java/com/google/cloud/sql/postgres/JdbcPostgresQuotaProjectIAMAuthIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
@RunWith(JUnit4.class)
3939
public class JdbcPostgresQuotaProjectIAMAuthIntegrationTests {
4040

41-
private static final String CONNECTION_NAME = System.getenv("POSTGRES_IAM_CONNECTION_NAME");
41+
private static final String CONNECTION_NAME = System.getenv("POSTGRES_CONNECTION_NAME");
4242
private static final String DB_NAME = System.getenv("POSTGRES_DB");
4343
private static final String DB_USER = System.getenv("POSTGRES_IAM_USER");
4444
private static final String QUOTA_PROJECT = System.getenv("QUOTA_PROJECT");
4545

4646
private static final ImmutableList<String> requiredEnvVars =
4747
ImmutableList.of(
48-
"POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_IAM_CONNECTION_NAME", "QUOTA_PROJECT");
48+
"POSTGRES_IAM_USER", "POSTGRES_DB", "POSTGRES_CONNECTION_NAME", "QUOTA_PROJECT");
4949
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
5050

5151
private HikariDataSource connectionPool;

jdbc/postgres/src/test/java/com/google/cloud/sql/postgres/JdbcPostgresServiceAccountImpersonationIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
@RunWith(JUnit4.class)
4343
public class JdbcPostgresServiceAccountImpersonationIntegrationTests {
4444

45-
private static final String CONNECTION_NAME = System.getenv("POSTGRES_IAM_CONNECTION_NAME");
45+
private static final String CONNECTION_NAME = System.getenv("POSTGRES_CONNECTION_NAME");
4646
private static final String DB_NAME = System.getenv("POSTGRES_DB");
4747
private static final String IMPERSONATED_USER = System.getenv("IMPERSONATED_USER");
4848

4949
private static final ImmutableList<String> requiredEnvVars =
50-
ImmutableList.of("POSTGRES_DB", "POSTGRES_IAM_CONNECTION_NAME", "IMPERSONATED_USER");
50+
ImmutableList.of("POSTGRES_DB", "POSTGRES_CONNECTION_NAME", "IMPERSONATED_USER");
5151
@Rule public Timeout globalTimeout = new Timeout(80, TimeUnit.SECONDS);
5252
private HikariDataSource connectionPool;
5353

r2dbc/mariadb/src/test/java/com/google/cloud/sql/core/R2dbcMariadbIamAuthIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
public class R2dbcMariadbIamAuthIntegrationTests {
4747

4848
private static final ImmutableList<String> requiredEnvVars =
49-
ImmutableList.of("MYSQL_IAM_USER", "MYSQL_DB", "MYSQL_IAM_CONNECTION_NAME");
49+
ImmutableList.of("MYSQL_IAM_USER", "MYSQL_DB", "MYSQL_CONNECTION_NAME");
5050

51-
private static final String CONNECTION_NAME = System.getenv("MYSQL_IAM_CONNECTION_NAME");
51+
private static final String CONNECTION_NAME = System.getenv("MYSQL_CONNECTION_NAME");
5252
private static final String DB_NAME = System.getenv("MYSQL_DB");
5353
private static final String DB_USER = System.getenv("MYSQL_IAM_USER");
5454

0 commit comments

Comments
 (0)