Skip to content

Commit c8a82b5

Browse files
author
David Cavazos
committed
Merge branch 'main' of github.com:GoogleCloudPlatform/nodejs-docs-samples into remove-old-tests
2 parents 43f81a7 + 5a1e566 commit c8a82b5

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.github/config/nodejs-dev.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"endpoints/getting-started-grpc",
114114
"error-reporting",
115115
"eventarc/generic",
116+
"eventarc/pubsub",
116117
"functions/concepts/afterResponse",
117118
"functions/concepts/afterTimeout",
118119
"functions/concepts/backgroundTermination",

.github/config/nodejs-prod.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"dlp", // [ERR_REQUIRE_ESM]: require() of ES Module
8888
"document-ai", // [ERR_REQUIRE_ESM]: require() of ES Module
8989
"eventarc/audit-storage", // (untested) Environment Variable 'SERVICE_NAME' not found
90-
"eventarc/pubsub", // (untested) Environment Variable 'SERVICE_NAME' not found
9190
"functions/billing", // (untested) Error: Request failed with status code 500
9291
"functions/imagemagick", // (untested) Error: A bucket name is needed to use Cloud Storage
9392
"functions/ocr/app", // (untested) Error: Bucket not provided. Make sure you have a "bucket" property in your request

eventarc/pubsub/ci-setup.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env": {
3+
"SERVICE_NAME": "eventarc-pubsub-${RUN_ID}",
4+
"CONTAINER_IMAGE": "gcr.io/long-door-651/eventarc-pubsub:${RUN_ID}"
5+
}
6+
}

eventarc/pubsub/test/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ requireEnv() {
2222

2323
requireEnv SERVICE_NAME
2424
requireEnv CONTAINER_IMAGE
25+
requireEnv SERVICE_ACCOUNT
2526

2627
# Build the service
2728
set -x
@@ -35,6 +36,8 @@ gcloud run deploy "${SERVICE_NAME}" \
3536
--region="${REGION:-us-central1}" \
3637
${FLAGS} \
3738
--platform=managed \
39+
--service-account="${SERVICE_ACCOUNT}" \
40+
--add-custom-audiences="https://action.test/" \
3841
--quiet
3942
set +x
4043

eventarc/pubsub/test/runner.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ requireEnv() {
2020
test "${!1}" || (echo "Environment Variable '$1' not found" && exit 1)
2121
}
2222
requireEnv SERVICE_NAME
23+
requireEnv CONTAINER_IMAGE
24+
requireEnv SERVICE_ACCOUNT
25+
requireEnv ID_TOKEN
2326

2427
echo '---'
2528
test/deploy.sh
@@ -33,14 +36,11 @@ echo
3336
function cleanup {
3437
set -x
3538
gcloud run services delete ${SERVICE_NAME} \
36-
--platform=managed \
3739
--region="${REGION:-us-central1}" \
3840
--quiet
3941
}
4042
trap cleanup EXIT
4143

42-
# TODO: Perform authentication inside the test.
43-
export ID_TOKEN=$(gcloud auth print-identity-token)
4444
export BASE_URL=$(test/url.sh)
4545

4646
test -z "$BASE_URL" && echo "BASE_URL value is empty" && exit 1

0 commit comments

Comments
 (0)