@@ -12,7 +12,7 @@ export * from './database-tests';
1212export * from './auth-tests' ;
1313export * from './firestore-tests' ;
1414export * from './https-tests' ;
15- // export * from './remoteConfig-tests';
15+ export * from './remoteConfig-tests' ;
1616export * from './storage-tests' ;
1717const numTests = Object . keys ( exports ) . length ; // Assumption: every exported function is its own test.
1818
@@ -127,25 +127,25 @@ export const integrationTests: any = functions
127127 // Invoke a callable HTTPS trigger.
128128 callHttpsTrigger ( 'callableTests' , { foo : 'bar' , testId } , baseUrl ) ,
129129 // A Remote Config update to trigger the Remote Config tests.
130- // admin.credential
131- // .applicationDefault()
132- // .getAccessToken()
133- // .then(accessToken => {
134- // const options = {
135- // hostname: 'firebaseremoteconfig.googleapis.com',
136- // path: `/v1/projects/${firebaseConfig.projectId}/remoteConfig`,
137- // method: 'PUT',
138- // headers: {
139- // Authorization: 'Bearer ' + accessToken.access_token,
140- // 'Content-Type': 'application/json; UTF-8',
141- // 'Accept-Encoding': 'gzip',
142- // 'If-Match': '*',
143- // },
144- // };
145- // const request = https.request(options, resp => {});
146- // request.write(JSON.stringify({ version: { description: testId } }));
147- // request.end();
148- // }),
130+ admin . credential
131+ . applicationDefault ( )
132+ . getAccessToken ( )
133+ . then ( ( accessToken ) => {
134+ const options = {
135+ hostname : 'firebaseremoteconfig.googleapis.com' ,
136+ path : `/v1/projects/${ firebaseConfig . projectId } /remoteConfig` ,
137+ method : 'PUT' ,
138+ headers : {
139+ Authorization : 'Bearer ' + accessToken . access_token ,
140+ 'Content-Type' : 'application/json; UTF-8' ,
141+ 'Accept-Encoding' : 'gzip' ,
142+ 'If-Match' : '*' ,
143+ } ,
144+ } ;
145+ const request = https . request ( options , ( resp ) => { } ) ;
146+ request . write ( JSON . stringify ( { version : { description : testId } } ) ) ;
147+ request . end ( ) ;
148+ } ) ,
149149 // A storage upload to trigger the Storage tests
150150 admin
151151 . storage ( )
0 commit comments