Skip to content

Commit

Permalink
Allow firebase-admin v10. Add integration tests for Node 16 (#998)
Browse files Browse the repository at this point in the history
* Allow firebase-admin v10. Add integration tests for Node 16

* Add changelog. Run formatter

* rerun formatter
  • Loading branch information
inlined authored Oct 25, 2021
1 parent 11e045a commit 43e68af
Show file tree
Hide file tree
Showing 7 changed files with 5,875 additions and 71 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- GCS Enhancement
- Add option to allow callable functions to ignore invalid App Check tokens.
- Add firebase-admin v10 as an allowed peer dependency
2 changes: 1 addition & 1 deletion integration_test/package.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@google-cloud/pubsub": "^2.10.0",
"firebase-admin": "^9.1.0",
"firebase-admin": "__FIREBASE_ADMIN__",
"firebase-functions": "__SDK_TARBALL__",
"lodash": "~4.17.2"
},
Expand Down
10 changes: 8 additions & 2 deletions integration_test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function create_package_json {
# backup file called package.json-e that we should clean up afterwards.
sed -i -e "s/__SDK_TARBALL__/firebase-functions-$1.tgz/g" functions/package.json
sed -i -e "s/__NODE_VERSION__/$2/g" functions/package.json
sed -i -e "s/__FIREBASE_ADMIN__/$3/g" functions/package.json
rm -f functions/package.json-e
}

Expand Down Expand Up @@ -138,8 +139,13 @@ build_sdk
delete_all_functions
set_region

for version in 10 12 14; do
create_package_json $TIMESTAMP $version
for version in 10 12 14 16; do
if [[ "$version" -eq 10 ]]; then
admin_sdk="^9.12.0"
else
admin_sdk="^10.0.0"
fi
create_package_json $TIMESTAMP $version $admin_sdk
install_deps
announce "Re-deploying the same functions to Node $version runtime ..."
deploy
Expand Down
Loading

0 comments on commit 43e68af

Please sign in to comment.