Skip to content

Commit 40325df

Browse files
FDC: update api version, integration tests, and CONTRIBUTING.md (#2972)
* update integration tests and CONTRIBUTING.md * make test data more readable, tweak contributing instructions * update api to v1 * check in dataconnect folder * address comments * remove .dataconnect folder * update .gitignore * make integration tests more robust, explicitly setting and clearing database state
1 parent 3442251 commit 40325df

File tree

11 files changed

+438
-136
lines changed

11 files changed

+438
-136
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ test/resources/appid.txt
2020
firebase-admin-*.tgz
2121

2222
docgen/markdown/
23+
24+
# Dataconnect integration test artifacts should not be checked in
25+
test/integration/dataconnect/dataconnect/.dataconnect

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,22 @@ to ensure that exported user records contain the password hashes of the user acc
245245
3. Click **ADD ANOTHER ROLE** and choose **Firebase Authentication Admin**.
246246
4. Click **SAVE**.
247247

248+
9. Setup your project for Firebase Data Connect integration tests:
249+
1. Set up Data Connect in the Firebase Console:
250+
1. Go to the Firebase Console, and select **Data Connect** from the **Build** menu.
251+
2. Click on **Get Started**. You can skip any Gemini generation.
252+
3. Select **Create a new Cloud SQL instance**.
253+
4. Set your **Location** to `us-west2`
254+
5. Set your **Cloud SQL instance ID** to `my-instance`
255+
6. Set your **Database name** to `my-database`
256+
7. Set your **Service ID** to `my-service`
257+
8. Click **Submit**. This operation may take up to 10 minutes to complete - you may
258+
continue setting up while this completes.
259+
2. Run the following command from the root of the Node Admin SDK repo:
260+
```bash
261+
$ firebase deploy --only dataconnect:my-service:my-connector --config ./test/integration/dataconnect/firebase.json --project <PROJECT_ID>
262+
```
263+
1. If you're asked if you'd like to execute changes, select `Execute all`.
248264
249265
Finally, to run the integration test suite:
250266

src/data-connect/data-connect-api-client-internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import * as utils from '../utils/index';
2525
import * as validator from '../utils/validator';
2626
import { ConnectorConfig, ExecuteGraphqlResponse, GraphqlOptions } from './data-connect-api';
2727

28-
const API_VERSION = 'v1alpha';
28+
const API_VERSION = 'v1';
2929

3030
/** The Firebase Data Connect backend base URL format. */
3131
const FIREBASE_DATA_CONNECT_BASE_URL_FORMAT =

0 commit comments

Comments
 (0)