Skip to content

Commit 91ed9b6

Browse files
committed
wip(integration_test): Rename directory to integration_test
1 parent f447dcd commit 91ed9b6

20 files changed

+64
-4
lines changed

.gcloudignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
venv
2+
build
3+
!integration_test/.env

cloudbuild.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
steps:
2+
- name: "gcr.io/cloud-builders/git"
3+
id: "Checkout tests"
4+
dir: "integration_test"
5+
entrypoint: "bash"
6+
args:
7+
- "./checkout.sh"
28
- name: "node:18"
39
entrypoint: "npm"
410
dir: "integration_test"

integration_tests/.env.example renamed to integration_test/.env.example

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
DEBUG=true
2-
TEST_RUNTIME=node
1+
TEST_RUNTIME=python
32
REGION=us-central1
43
PROJECT_ID=
54
DATABASE_URL=
65
STORAGE_BUCKET=
7-
NODE_VERSION=18
8-
FIREBASE_ADMIN=^12.6.0
6+
FIREBASE_ADMIN=6.5.0
97
FIREBASE_APP_ID=
108
FIREBASE_MEASUREMENT_ID=
119
FIREBASE_AUTH_DOMAIN=
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Use a combined base image with Python 3.11 and Node 18
2+
FROM python:3.11
3+
4+
# Install Node.js 18 using the Nodesource repository
5+
RUN apt-get update && \
6+
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
7+
apt-get install -y nodejs && \
8+
rm -rf /var/lib/apt/lists/*

integration_test/checkout.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env sh
2+
3+
set -ex
4+
5+
cleanup() {
6+
current_dir_name=$(basename "$PWD")
7+
8+
if [ "$current_dir_name" = ".tmp" ]; then
9+
cd ..
10+
fi
11+
12+
if [ -z "$DEBUG" ]; then
13+
rm -rf .tmp
14+
fi
15+
}
16+
17+
trap cleanup EXIT
18+
19+
if [ -d ".tmp" ]; then
20+
rm -rf .tmp
21+
fi
22+
23+
mkdir .tmp
24+
cd .tmp
25+
26+
git init
27+
git remote add origin https://github.com/firebase/firebase-functions.git
28+
git config core.sparseCheckout true
29+
mkdir -p .git/info
30+
echo 'integration_test/**/*' > .git/info/sparse-checkout
31+
git fetch origin v2-integration-tests
32+
git pull origin v2-integration-tests
33+
git checkout v2-integration-tests
34+
35+
rm -rf integration_test/functions
36+
rm -f integration_test/.env.example
37+
38+
mv integration_test/* ../
39+
for file in integration_test/.[!.]* integration_test/..?*; do
40+
[ -e "$file" ] && mv "$file" ../
41+
done
42+
43+
cd ..
44+
rm -rf tests/v1
45+
rm -rf .tmp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)