Skip to content

Commit

Permalink
chore: source secrets for tests (#8728)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Oct 16, 2023
1 parent a8c842f commit fe554b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion auth/impersonate/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

const (
envAppCreds = "GOOGLE_APPLICATION_CREDENTIALS"
envProjectID = "GOOGLE_CLOUD_PROJECT"
envProjectID = "GCLOUD_TESTS_GOLANG_PROJECT_ID"
envReaderCreds = "GCLOUD_TESTS_IMPERSONATE_READER_KEY"
envReaderEmail = "GCLOUD_TESTS_IMPERSONATE_READER_EMAIL"
envWriterEmail = "GCLOUD_TESTS_IMPERSONATE_WRITER_EMAIL"
Expand Down
1 change: 0 additions & 1 deletion auth/internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
// run
func IntegrationTestCheck(t *testing.T) {
t.Helper()
t.Skip("TODO(codyoss): remove this once we add all secrets")
if testing.Short() {
t.Skip("skipping integration test")
}
Expand Down
13 changes: 12 additions & 1 deletion internal/kokoro/continuous.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,20 @@ export GCLOUD_TESTS_GOLANG_DATASTORE_DATABASES=database-01
export GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID=gcloud-golang-firestore-tests
export GCLOUD_TESTS_GOLANG_FIRESTORE_KEY=$KOKORO_KEYSTORE_DIR/72523_go_firestore_integration_service_account
export GCLOUD_TESTS_GOLANG_FIRESTORE_DATABASES=database-02
export GCLOUD_TESTS_API_KEY=`cat $KOKORO_KEYSTORE_DIR/72523_go_gcloud_tests_api_key`
export GCLOUD_TESTS_API_KEY=$(cat $KOKORO_KEYSTORE_DIR/72523_go_gcloud_tests_api_key)
export GCLOUD_TESTS_GOLANG_KEYRING=projects/dulcet-port-762/locations/us/keyRings/go-integration-test
export GCLOUD_TESTS_GOLANG_PROFILER_ZONE="us-west1-b"
export GCLOUD_TESTS_IMPERSONATE_READER_KEY="${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-impersonate-reader-service-account"
export GCLOUD_TESTS_IMPERSONATE_READER_EMAIL="impersonate-reader@${GCLOUD_TESTS_GOLANG_PROJECT_ID}.iam.gserviceaccount.com"
export GCLOUD_TESTS_IMPERSONATE_WRITER_EMAIL="impersonate-writer@${GCLOUD_TESTS_GOLANG_PROJECT_ID}.iam.gserviceaccount.com"
export GCLOUD_TESTS_GOLANG_PROJECT_NUMBER=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-project-number)
export GCLOUD_TESTS_GOLANG_SERVICE_ACCOUNT_CLIENT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-client-id)
export GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-acc-id)
export GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-role-name)
export GCLOUD_TESTS_GOLANG_AWS_ROLE_ID="arn:aws:iam::$GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID:role/$GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME"
export GCLOUD_TESTS_GOLANG_AUDIENCE_OIDC=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-oidc)
export GCLOUD_TESTS_GOLANG_AUDIENCE_AWS=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-aws)
export GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES="1"

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

0 comments on commit fe554b5

Please sign in to comment.