Skip to content

Commit 74e970d

Browse files
committed
Addressed comments
1 parent 74e296e commit 74e970d

File tree

6 files changed

+10
-80
lines changed

6 files changed

+10
-80
lines changed

.github/workflows/test-all.yml

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: Set start timestamp env var
9191
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
9292
- name: Run unit tests
93-
# Ignore auth data-connect and firestore since they're handled in their own separate jobs.
93+
# Ignore auth and firestore since they're handled in their own separate jobs.
9494
run: |
9595
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' test:ci
9696
node scripts/print_test_logs.js
@@ -154,68 +154,6 @@ jobs:
154154
github-token: ${{ secrets.GITHUB_TOKEN }}
155155
path-to-lcov: ./lcov-all.info
156156
continue-on-error: true
157-
test-data-connect:
158-
name: (Data Connect) Node.js and Browser (Chrome) Tests
159-
needs: build
160-
services:
161-
postgres:
162-
image: postgres
163-
env:
164-
POSTGRES_PASSWORD: postgres
165-
options: >-
166-
--health-cmd pg_isready
167-
--health-interval 10s
168-
--health-timeout 5s
169-
--health-retries 5
170-
name: Test Firebase Namespace
171-
runs-on: ubuntu-latest
172-
runs-on: ubuntu-latest
173-
steps:
174-
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
175-
# when setting up the repo
176-
- name: install Chrome stable
177-
run: |
178-
npx @puppeteer/browsers install chrome@stable
179-
chromeVersionString=$(ls chrome)
180-
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
181-
echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
182-
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
183-
echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV"
184-
fi
185-
- name: Test Evn TEMP
186-
run: |
187-
echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE
188-
- name: Download build archive
189-
uses: actions/download-artifact@v4
190-
with:
191-
name: build.tar.gz
192-
- name: Unzip build artifact
193-
run: tar xf build.tar.gz
194-
- name: Set up Node (20)
195-
uses: actions/setup-node@v4
196-
with:
197-
node-version: 22.10.0
198-
- name: Test setup and yarn install
199-
run: |
200-
cp config/ci.config.json config/project.json
201-
yarn
202-
- name: Set start timestamp env var
203-
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
204-
- name: Run unit tests
205-
run: |
206-
xvfb-run yarn lerna run test:ci --scope '@firebase/data-connect*'
207-
node scripts/print_test_logs.js
208-
env:
209-
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
210-
POSTGRES_PASSWORD: postgres
211-
- name: Generate coverage file
212-
run: yarn ci:coverage
213-
- name: Run coverage
214-
uses: coverallsapp/github-action@master
215-
with:
216-
github-token: ${{ secrets.GITHUB_TOKEN }}
217-
path-to-lcov: ./lcov-all.info
218-
continue-on-error: true
219157

220158
test-firestore:
221159
name: (Firestore) Node.js and Browser (Chrome) Tests

.github/workflows/test-firebase-integration.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ env:
2222

2323
jobs:
2424
test:
25-
services:
26-
postgres:
27-
image: postgres
28-
env:
29-
POSTGRES_PASSWORD: postgres
30-
options: >-
31-
--health-cmd pg_isready
32-
--health-interval 10s
33-
--health-timeout 5s
34-
--health-retries 5
3525
name: Test Firebase Namespace
3626
runs-on: ubuntu-latest
3727

@@ -57,5 +47,3 @@ jobs:
5747
run: yarn build:changed firebase-integration
5848
- name: Run tests on changed packages
5949
run: yarn test:changed firebase-integration
60-
env:
61-
POSTGRES_PASSWORD: postgres

packages/data-connect/test/queries.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import {
3535
terminate
3636
} from '../src';
3737

38-
// import { setupQueries } from './emulatorSeeder';
3938
import { getConnectionConfig, initDatabase, PROJECT_ID } from './util';
4039

4140
use(chaiAsPromised);

packages/data-connect/test/util.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
} from '../src';
2626

2727
export const EMULATOR_PORT = process.env.DC_EMULATOR_PORT;
28-
// eslint-disable-next-line no-console
2928
const USE_EMULATOR = !!EMULATOR_PORT;
3029
export const CONNECTOR_NAME = 'tests';
3130
export const LOCATION_NAME = 'us-west2';

scripts/emulator-testing/emulators/dataconnect-emulator.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const DATACONNECT_EMULATOR_VERSION = '1.7.5';
2222

2323
export class DataConnectEmulator extends Emulator {
2424
constructor(port = 9399) {
25-
console.log('passing in ' + port + ' as port for fdc');
2625
const os = platform();
2726
let urlString = '';
2827
switch (os) {
@@ -50,4 +49,13 @@ export class DataConnectEmulator extends Emulator {
5049
);
5150
this.isDataConnect = true;
5251
}
52+
async setUp(): Promise<void> {
53+
await super.setUp();
54+
await fetch(`localhost:${this.port}/emulator/configure`, {
55+
method: 'POST',
56+
body: JSON.stringify({
57+
'use_dummy': true
58+
})
59+
});
60+
}
5361
}

scripts/emulator-testing/emulators/emulator.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export abstract class Emulator {
126126
findDataConnectConfigDir() {
127127
let path = './';
128128
const files = fs.readdirSync(path);
129-
console.log(files);
130129
if (files.includes('dataconnect')) {
131130
return path + 'dataconnect';
132131
}
@@ -147,7 +146,6 @@ export abstract class Emulator {
147146
if (this.isDataConnect) {
148147
const dataConnectConfigDir = this.findDataConnectConfigDir();
149148
const password = process.env['POSTGRES_PASSWORD'];
150-
console.log('postgres password: ' + password);
151149
promise = spawn(this.binaryPath, [
152150
'--v=2',
153151
'dev',

0 commit comments

Comments
 (0)