diff --git a/integration_test/functions/src/index.ts b/integration_test/functions/src/index.ts index 6541dee23..679ba3a5a 100644 --- a/integration_test/functions/src/index.ts +++ b/integration_test/functions/src/index.ts @@ -12,7 +12,7 @@ export * from './database-tests'; export * from './auth-tests'; export * from './firestore-tests'; export * from './https-tests'; -// export * from './remoteConfig-tests'; +export * from './remoteConfig-tests'; export * from './storage-tests'; const numTests = Object.keys(exports).length; // Assumption: every exported function is its own test. @@ -127,25 +127,25 @@ export const integrationTests: any = functions // Invoke a callable HTTPS trigger. callHttpsTrigger('callableTests', { foo: 'bar', testId }, baseUrl), // A Remote Config update to trigger the Remote Config tests. - // admin.credential - // .applicationDefault() - // .getAccessToken() - // .then(accessToken => { - // const options = { - // hostname: 'firebaseremoteconfig.googleapis.com', - // path: `/v1/projects/${firebaseConfig.projectId}/remoteConfig`, - // method: 'PUT', - // headers: { - // Authorization: 'Bearer ' + accessToken.access_token, - // 'Content-Type': 'application/json; UTF-8', - // 'Accept-Encoding': 'gzip', - // 'If-Match': '*', - // }, - // }; - // const request = https.request(options, resp => {}); - // request.write(JSON.stringify({ version: { description: testId } })); - // request.end(); - // }), + admin.credential + .applicationDefault() + .getAccessToken() + .then((accessToken) => { + const options = { + hostname: 'firebaseremoteconfig.googleapis.com', + path: `/v1/projects/${firebaseConfig.projectId}/remoteConfig`, + method: 'PUT', + headers: { + Authorization: 'Bearer ' + accessToken.access_token, + 'Content-Type': 'application/json; UTF-8', + 'Accept-Encoding': 'gzip', + 'If-Match': '*', + }, + }; + const request = https.request(options, (resp) => {}); + request.write(JSON.stringify({ version: { description: testId } })); + request.end(); + }), // A storage upload to trigger the Storage tests admin .storage()