1414
1515const assert = require ( 'assert' ) ;
1616const got = require ( 'got' ) ;
17- const { execSync} = require ( 'child_process' ) ;
17+ const { execSync } = require ( 'child_process' ) ;
1818
1919describe ( 'End-to-End Tests' , ( ) => {
2020 // Retrieve Cloud Run service test config
21- const { GOOGLE_CLOUD_PROJECT } = process . env ;
21+ const { GOOGLE_CLOUD_PROJECT } = process . env ;
2222 if ( ! GOOGLE_CLOUD_PROJECT ) {
2323 throw Error ( '"GOOGLE_CLOUD_PROJECT" env var not found.' ) ;
2424 }
25- let { SERVICE_NAME } = process . env ;
25+ let { SERVICE_NAME } = process . env ;
2626 if ( ! SERVICE_NAME ) {
2727 console . log ( '"SERVICE_NAME" env var not found. Defaulting to "editor"' ) ;
2828 SERVICE_NAME = 'editor' ;
2929 }
30- const { ID_TOKEN } = process . env ;
30+ const { ID_TOKEN } = process . env ;
3131 if ( ! ID_TOKEN ) throw Error ( 'ID token not in envvar' ) ;
32- const { SAMPLE_VERSION } = process . env ;
33- const { SERVICE_ACCOUNT } = process . env ;
32+ const { SAMPLE_VERSION } = process . env ;
33+ const { SERVICE_ACCOUNT } = process . env ;
3434 const REGION = 'us-central1' ;
3535
3636 let BASE_URL ;
@@ -44,7 +44,7 @@ describe('End-to-End Tests', () => {
4444 if ( SERVICE_ACCOUNT ) buildRendererCmd += `,_SERVICE_ACCOUNT=${ SERVICE_ACCOUNT } ` ;
4545
4646 console . log ( 'Starting Cloud Build for Renderer service...' ) ;
47- execSync ( buildRendererCmd , { cwd : '../renderer' } ) ;
47+ execSync ( buildRendererCmd , { cwd : '../renderer' } ) ;
4848 console . log ( 'Cloud Build completed.\n' ) ;
4949
5050 // Deploy Editor service using Cloud Build
@@ -56,13 +56,13 @@ describe('End-to-End Tests', () => {
5656 if ( SERVICE_ACCOUNT ) buildCmd += `,_SERVICE_ACCOUNT=${ SERVICE_ACCOUNT } ` ;
5757
5858 console . log ( 'Starting Cloud Build for Editor service...' ) ;
59- execSync ( buildCmd , { timeout : 240000 } ) ; // timeout at 4 mins
59+ execSync ( buildCmd , { timeout : 240000 } ) ; // timeout at 4 mins
6060 console . log ( 'Cloud Build completed.\n' ) ;
6161
6262 // Retrieve URL of Cloud Run service
6363 const url = execSync (
6464 `gcloud run services describe ${ SERVICE_NAME } --project=${ GOOGLE_CLOUD_PROJECT } ` +
65- `--region=${ REGION } --format='value(status.url)'`
65+ `--region=${ REGION } --format='value(status.url)'`
6666 ) ;
6767 BASE_URL = url . toString ( 'utf-8' ) . trim ( ) ;
6868 if ( ! BASE_URL ) throw Error ( 'Cloud Run service URL not found' ) ;
0 commit comments