Skip to content

Commit fe554b5

Browse files
authored
chore: source secrets for tests (#8728)
1 parent a8c842f commit fe554b5

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

auth/impersonate/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
const (
3535
envAppCreds = "GOOGLE_APPLICATION_CREDENTIALS"
36-
envProjectID = "GOOGLE_CLOUD_PROJECT"
36+
envProjectID = "GCLOUD_TESTS_GOLANG_PROJECT_ID"
3737
envReaderCreds = "GCLOUD_TESTS_IMPERSONATE_READER_KEY"
3838
envReaderEmail = "GCLOUD_TESTS_IMPERSONATE_READER_EMAIL"
3939
envWriterEmail = "GCLOUD_TESTS_IMPERSONATE_WRITER_EMAIL"

auth/internal/testutil/testutil.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
// run
2323
func IntegrationTestCheck(t *testing.T) {
2424
t.Helper()
25-
t.Skip("TODO(codyoss): remove this once we add all secrets")
2625
if testing.Short() {
2726
t.Skip("skipping integration test")
2827
}

internal/kokoro/continuous.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,20 @@ export GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES=database-01
3535
export GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID=gcloud-golang-firestore-tests
3636
export GCLOUD_TESTS_GOLANG_FIRESTORE_KEY=$KOKORO_KEYSTORE_DIR/72523_go_firestore_integration_service_account
3737
export GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES=database-02
38-
export GCLOUD_TESTS_API_KEY=`cat $KOKORO_KEYSTORE_DIR/72523_go_gcloud_tests_api_key`
38+
export GCLOUD_TESTS_API_KEY=$(cat $KOKORO_KEYSTORE_DIR/72523_go_gcloud_tests_api_key)
3939
export GCLOUD_TESTS_GOLANG_KEYRING=projects/dulcet-port-762/locations/us/keyRings/go-integration-test
4040
export GCLOUD_TESTS_GOLANG_PROFILER_ZONE="us-west1-b"
41+
export GCLOUD_TESTS_IMPERSONATE_READER_KEY="${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-impersonate-reader-service-account"
42+
export GCLOUD_TESTS_IMPERSONATE_READER_EMAIL="impersonate-reader@${GCLOUD_TESTS_GOLANG_PROJECT_ID}.iam.gserviceaccount.com"
43+
export GCLOUD_TESTS_IMPERSONATE_WRITER_EMAIL="impersonate-writer@${GCLOUD_TESTS_GOLANG_PROJECT_ID}.iam.gserviceaccount.com"
44+
export GCLOUD_TESTS_GOLANG_PROJECT_NUMBER=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-project-number)
45+
export GCLOUD_TESTS_GOLANG_SERVICE_ACCOUNT_CLIENT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-client-id)
46+
export GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-acc-id)
47+
export GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-role-name)
48+
export GCLOUD_TESTS_GOLANG_AWS_ROLE_ID="arn:aws:iam::$GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID:role/$GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME"
49+
export GCLOUD_TESTS_GOLANG_AUDIENCE_OIDC=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-oidc)
50+
export GCLOUD_TESTS_GOLANG_AUDIENCE_AWS=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-aws)
51+
export GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES="1"
4152

4253
# Bigtable integration tests expect an existing instance and cluster
4354
# ❯ cbt createinstance gc-bt-it-instance gc-bt-it-instance \

0 commit comments

Comments
 (0)