Skip to content

Commit 1b1a471

Browse files
committed
chore: update gcloud tests for private IP
1 parent 6e97e0e commit 1b1a471

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

.ci/cloudbuild.yaml

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

1515
steps:
16-
- id: setup gcloud
17-
name: gcr.io/google.com/cloudsdktool/cloud-sdk
18-
entrypoint: bash
19-
args:
20-
- '-c'
21-
- |
22-
which gcloud
23-
gcloud version
24-
2516
- id: run integration tests
2617
name: golang:${_VERSION}
2718
env:
2819
- "IP_TYPE=${_IP_TYPE}"
2920
- "GOOGLE_CLOUD_PROJECT=${PROJECT_ID}"
3021
- "TMPDIR=/tmp"
31-
- "CLOUDSDK_CORE_DISABLE_PROMPTS=1"
3222
secretEnv:
3323
- "MYSQL_CONNECTION_NAME"
3424
- "MYSQL_USER"
@@ -53,8 +43,6 @@ steps:
5343
args:
5444
- -c
5545
- |
56-
which gcloud
57-
5846
go test -race -v ./tests/...
5947
6048
substitutions:

tests/mysql_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ func TestMySQLGcloudAuth(t *testing.T) {
208208
if testing.Short() {
209209
t.Skip("skipping MySQL integration tests")
210210
}
211+
if v := os.Getenv("IP_TYPE"); v == "private" || v == "psc" {
212+
t.Skipf("skipping test because IP_TYPE is set to %v", v)
213+
}
211214
requireMySQLVars(t)
212215

213216
tcs := []struct {

tests/postgres_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ func TestPostgresGcloudAuth(t *testing.T) {
192192
if testing.Short() {
193193
t.Skip("skipping Postgres integration tests")
194194
}
195+
if v := os.Getenv("IP_TYPE"); v == "private" || v == "psc" {
196+
t.Skipf("skipping test because IP_TYPE is set to %v", v)
197+
}
195198
requirePostgresVars(t)
196199

197200
tcs := []struct {

tests/sqlserver_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ func TestSQLServerGcloudAuth(t *testing.T) {
152152
if testing.Short() {
153153
t.Skip("skipping SQL Server integration tests")
154154
}
155+
if v := os.Getenv("IP_TYPE"); v == "private" || v == "psc" {
156+
t.Skipf("skipping test because IP_TYPE is set to %v", v)
157+
}
155158
requireSQLServerVars(t)
156159

157160
tcs := []struct {

0 commit comments

Comments
 (0)