File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 5858 - |
5959 ./test/retry.sh "gcloud run deploy ${_SERVICE} \
6060 --image gcr.io/${PROJECT_ID}/${_SERVICE}:${_VERSION} \
61- --allow-unauthenticated \
61+ --no- allow-unauthenticated \
6262 --region ${_REGION} \
6363 --service-account ${_SERVICE_ACCOUNT} \
6464 --add-cloudsql-instances ${_CLOUD_SQL_CONNECTION_NAME} \
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ describe('System Tests', () => {
5454 throw Error ( '"IDP_KEY" env var not found.' ) ;
5555 }
5656
57+ // Get ID token for the authentication part
58+ const { ID_TOKEN } = process . env ;
59+ if ( ! ID_TOKEN ) {
60+ throw Error ( '"ID_TOKEN" env var not found.' ) ;
61+ }
62+
5763 let BASE_URL , CUSTOM_TOKEN ;
5864 before ( async ( ) => {
5965 // Deploy service using Cloud Build
@@ -142,6 +148,7 @@ describe('System Tests', () => {
142148 form : { team : 'DOGS' } ,
143149 headers : {
144150 Authorization : `Bearer ${ CUSTOM_TOKEN . trim ( ) } ` ,
151+ "X-Serverless-Authorization" : `Bearer ${ ID_TOKEN } `
145152 } ,
146153 retry : {
147154 limit : 5 ,
@@ -167,6 +174,7 @@ describe('System Tests', () => {
167174 form : { team : 'DOGS' } ,
168175 headers : {
169176 Authorization : 'Bearer iam-a-token' ,
177+ "X-Serverless-Authorization" : `Bearer ${ ID_TOKEN } `
170178 } ,
171179 retry : {
172180 limit : 5 ,
You can’t perform that action at this time.
0 commit comments