Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FDC Integration Tests #8703

Merged
merged 34 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d6d2aaf
First pass at getting fdc tests to work
maneesht Jan 11, 2025
8b45245
Fixed formatting
maneesht Jan 11, 2025
200a2c8
Added logging
maneesht Jan 11, 2025
f4fbfba
Updated formatting
maneesht Jan 11, 2025
72de503
Fixed firebase integration action
maneesht Jan 11, 2025
d8603d6
configure password
maneesht Jan 11, 2025
2420317
log POSTGRES_PASSWORD
maneesht Jan 11, 2025
1abbe54
Fixed integration tests
maneesht Jan 13, 2025
50d074f
Fixed more integration
maneesht Jan 13, 2025
d62d264
Updated ignored tests
maneesht Jan 13, 2025
3225eda
Renamed job
maneesht Jan 13, 2025
244464a
Updated test config
maneesht Jan 13, 2025
4c96d8c
Fixed integration tests?
maneesht Jan 13, 2025
1391cc8
Ignored fdc
maneesht Jan 13, 2025
b224296
Updated ports
maneesht Jan 13, 2025
5ec4c4f
Updated formatting
maneesht Jan 13, 2025
13b490c
Updated changed yaml
maneesht Jan 13, 2025
7d03de6
Fixed failed test
maneesht Jan 13, 2025
f3a5bb4
Updated queries
maneesht Jan 13, 2025
8d71140
Fix testing
maneesht Jan 13, 2025
bffe9dd
Fix emulator port
maneesht Jan 13, 2025
e3848e8
Updated readme and logging
maneesht Jan 13, 2025
b1dfea9
Removed single run
maneesht Jan 13, 2025
46a4c40
Added more logging
maneesht Jan 13, 2025
4737466
Trigger Build
maneesht Jan 13, 2025
699a700
Fixed CI tests
maneesht Jan 14, 2025
cc03960
Added test IDs
maneesht Jan 14, 2025
4c45262
Updated yml
maneesht Jan 14, 2025
338f970
Addressed comments'
maneesht Jan 14, 2025
b5a8c4e
Removed console.logs
maneesht Jan 14, 2025
74e296e
Fixed formatting
maneesht Jan 14, 2025
74e970d
Addressed comments
maneesht Jan 14, 2025
bac7e1c
Removed unnecessary connection string
maneesht Jan 14, 2025
80e4ff0
Updated emualtor configs
maneesht Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-firebase-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: build
run: yarn build:changed firebase-integration
- name: Run tests on changed packages
run: yarn test:changed firebase-integration
run: yarn test:changed firebase-integration
5 changes: 5 additions & 0 deletions packages/data-connect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Firebase Data Connect

## Local Development

Check `test/dataconnect.yaml` to ensure that the correct values are filled in.
8 changes: 4 additions & 4 deletions packages/data-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"prettier": "prettier --write '*.js' '*.ts' '@(src|test)/**/*.ts'",
"build:deps": "lerna run --scope @firebase/'{app,data-connect}' --include-dependencies build",
"dev": "rollup -c -w",
"test": "run-p --npm-path npm test:emulator",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
"test:all": "run-p --npm-path npm lint test:unit",
"test:browser": "karma start --single-run",
"test": "run-p --npm-path npm lint test:emulator",
maneesht marked this conversation as resolved.
Show resolved Hide resolved
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
"test:all": "run-p --npm-path npm lint test:browser test:node",
"test:browser": "karma start",
maneesht marked this conversation as resolved.
Show resolved Hide resolved
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:unit": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/unit/**/*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:emulator": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/dataconnect-test-runner.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-connect/src/api/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function queryRef<Data, Variables>(
dataConnect: dcInstance,
refType: QUERY_STR,
name: queryName,
variables: variables
variables
};
}
/**
Expand Down
1 change: 1 addition & 0 deletions packages/data-connect/src/network/transport/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export class RESTTransport implements DataConnectTransport {
body: U
) => {
const abortController = new AbortController();

// TODO(mtewani): Update to proper value
const withAuth = this.withRetry(() =>
dcFetch<T, U>(
Expand Down
5 changes: 5 additions & 0 deletions packages/data-connect/test/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "jscore-sandbox-141b5"
}
}
69 changes: 69 additions & 0 deletions packages/data-connect/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# dataconnect generated files
.dataconnect

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading