Skip to content

Commit d53c7b0

Browse files
authored
Add RC integration tests back in (#479)
* add RC integration tests back in * formatting
1 parent 9862b86 commit d53c7b0

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

integration_test/functions/src/index.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export * from './database-tests';
1212
export * from './auth-tests';
1313
export * from './firestore-tests';
1414
export * from './https-tests';
15-
// export * from './remoteConfig-tests';
15+
export * from './remoteConfig-tests';
1616
export * from './storage-tests';
1717
const 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

Comments
 (0)