Skip to content

Commit b705c45

Browse files
committed
feat: Move to new project, bug fixes, move region
1 parent 193039c commit b705c45

File tree

5 files changed

+23
-14
lines changed

5 files changed

+23
-14
lines changed

integration_tests/.firebaserc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"projects": {
3-
"default": "ff-test-74aeb"
3+
"default": "functions-testing-e710c"
44
}
55
}

integration_tests/functions/main.py

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
from firebase_admin import initialize_app
2+
from v2.database_tests import *
3+
from v2.eventarc_tests import *
24
from v2.firestore_tests import *
5+
from v2.https_tests import *
6+
from v2.identity_tests import *
7+
from v2.pubsub_tests import *
8+
from v2.remote_config_tests import *
9+
from v2.scheduler_tests import *
10+
from v2.storage_tests import *
11+
from v2.tasks_tests import *
12+
from v2.test_lab_tests import *
313

414
initialize_app()

integration_tests/functions/region.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# FIXME: Change to us-central1
2-
REGION = "asia-south1"
1+
REGION = "us-central1"

integration_tests/run.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import setup from "./setup.js";
1111

1212
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1313

14-
function loadEnv(): void {
14+
export function loadEnv(): void {
1515
try {
1616
const envPath = path.resolve(process.cwd(), ".env");
1717
console.log("Loading .env file from", envPath);
@@ -28,7 +28,7 @@ function loadEnv(): void {
2828
loadEnv();
2929

3030
const {
31-
FIREBASE_ADMIN = "^10.0.0",
31+
FIREBASE_ADMIN = "6.5.0",
3232
PROJECT_ID,
3333
DATABASE_URL,
3434
STORAGE_BUCKET,
@@ -54,7 +54,7 @@ if (
5454
process.exit(1);
5555
}
5656

57-
setup(TEST_RUN_ID, FIREBASE_ADMIN);
57+
setup(FIREBASE_ADMIN);
5858

5959
const config = {
6060
projectId: PROJECT_ID,
@@ -68,7 +68,7 @@ const firebaseConfig = {
6868
projectId: PROJECT_ID,
6969
storageBucket: STORAGE_BUCKET,
7070
};
71-
const env = {
71+
export const env = {
7272
FIRESTORE_PREFER_REST: "true",
7373
GCLOUD_PROJECT: config.projectId,
7474
FIREBASE_CONFIG: JSON.stringify(firebaseConfig),
@@ -96,7 +96,7 @@ async function discoverAndModifyEndpoints() {
9696
try {
9797
const port = await portfinder.getPortPromise({ port: 9000 });
9898
const delegate = await getRuntimeDelegate(config);
99-
const killServer = await delegate.serveAdmin(port.toString(), {}, env);
99+
const killServer = await delegate.serveAdmin(port.toString(), env);
100100

101101
console.log("Started on port", port);
102102
const originalYaml = await detectFromPort(

integration_tests/setup.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ const DIR = process.cwd();
77
/**
88
* Build SDK, and Functions
99
*/
10-
export default function setup(testRunId: string, firebaseAdmin: string) {
11-
buildSdk(testRunId);
12-
createRequirementsTxt(testRunId, firebaseAdmin);
10+
export default function setup(firebaseAdmin: string) {
11+
buildSdk();
12+
createRequirementsTxt(firebaseAdmin);
1313
installDependencies();
1414
}
1515

16-
function buildSdk(testRunId: string) {
16+
function buildSdk() {
1717
console.log("Building SDK...");
1818
process.chdir(path.join(DIR, "..")); // go up to root
1919

@@ -52,8 +52,8 @@ function buildSdk(testRunId: string) {
5252
process.chdir(DIR); // go back to integration_test
5353
}
5454

55-
function createRequirementsTxt(testRunId: string, firebaseAdmin: string) {
56-
console.log("Creating package.json...");
55+
function createRequirementsTxt(firebaseAdmin: string) {
56+
console.log("Creating requirements.txt...");
5757
const requirementsTemplatePath = `${DIR}/requirements.txt.template`;
5858
const requirementsPath = `${DIR}/functions/requirements.txt`;
5959

0 commit comments

Comments
 (0)