Skip to content

Commit

Permalink
Test migration master (realm#5251)
Browse files Browse the repository at this point in the history
* Initial commit

* Documenting guidelines for testing & refactoring accordingly (realm#4584)

* Fixed types of openRealm

* Adding documentation on the hooks

* Apply suggestions from code review

* Test Migration: Alias tests (realm#4581)

* Migrate alias tests
* Refactor to follow new test guidelines
* Remove alias-tests from legacy test spec

* Add migration tests (realm#5285)

* Migrate set tests to integration tests  (realm#5290)

* Move list tests to ts (realm#5287)

* move app tests to typescript (realm#5297)

* remove mistakenly added duplicates of apps

* Test Migration: Results Tests (realm#5325)

* move mixed tests to integration tests (realm#5256)

* Move array-buffer tests to integration tests (realm#5255)

* use correct baseurl for tests (realm#5337)

* migrate dictionary tests to ts (realm#5254)

* move linking-objects tests to ts (realm#5268)

* Test Migration: User Tests (realm#5324)

* Test Migration: Queries test (realm#5299)

* Test Migration: Notification Tests (realm#5347)

* Add a debug launcher for integration tests

* Fix the mongo client tests for local baas

* fix queries test, make test errors more verbose

* Remove Chrome Debugger and fix package-lock problems (realm#5403)

* Pushed Chrome Debugger Removal with Lint errors (realm#5414)

* fix the errors

* Andrew/tests/fix-watch (realm#5412)

* Initial commit

* Fix watch for React Native

* Remove lock files

* Migrate object-tests to TS (realm#5348)

* test migration:  open-behaviour (realm#5365)

* test migration: mixed-sync-test (realm#5398)

* migrate encryption tests to TS (realm#5362)

* migrate sync-based UUID, Dictionary and Set tests (realm#5356)

* migrate realm tests to TS (realm#5352)

there are additions to other files as well such as bson.ts, that is because the old realm.js file had som tests that made more sense elsewhere, so I've moved such tests into other fields where I thought it made more sense

* migrate partition-values tests to TS (realm#5359)

* test migration: session tests (realm#5391)

* Fix issues with migrated integration tests, add select helper method. (realm#5429)

* Refactored the importApp hook

* Remove BSON as a dependency from tests

* Fixed import app hook 🤞

* Renamed "BackingDB" to "mongodb"

* Throw on app import errors

* Delete the app on failure to import

* Added bundled Realm to iOS app

* Updating Gemfile.lock after RN update

* Increase test timeouts

* fix remainder of failing integration tests (realm#5451)

* Cleanup tests and move test-runners into install-tests

* Small Fixes for Stability and Cleanup

* path tests now put realms in a testFiles folder which has been added to .gitignore
* path tests now delete the realms when finished
* increased the longTimeout to 30 seconds as some of the migrated tests can take this long
* added more `this.longTimeout` calls where appropriate
* added `mongodb-realm` directory to .gitignore, which contains app configuration when importing apps

* Delete dependants of `tests` and any unused files

* Andrew/app-importer/rules (realm#5478)

* Fix for applying the default rules to BaaS

* Remove any other rules and apply a general rule that allows everything
* Change the app importer to update the default rule

* Also fix it for realm-web

* Fix web tests and apply PR feedback

* Update docker image for BaaS in web tests

* `realm-web` importing http service fixed (realm#5483)

* Use the "default_rule" only for mongodb services

* Ensure download assisted_agg in baas test server

* Fix a broken test from upgrading baas
  • Loading branch information
takameyer authored Feb 23, 2023
1 parent e167505 commit 48bdd74
Show file tree
Hide file tree
Showing 269 changed files with 35,508 additions and 91,498 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ build/
node_modules/
vendor/

/tests/test-runners/
/object-server-for-testing/

# The sub-packages have their own linting
/integration-tests/
/install-tests/
/packages/
/tests/ReactTestApp/
/templates/
/example/
16 changes: 8 additions & 8 deletions .github/workflows/pr-realm-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,23 +329,23 @@ jobs:
if: ${{ (matrix.variant.os == 'ios') }}
run: open -a ${{ env.DEVELOPER_DIR }}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator

- name: Create Mocha Env
- name: Create Mocha Remote Context
id: mocha-env
run: echo "mrc=syncLogLevel=warn,longTimeout=${{ env.LONG_TIMEOUT }},realmBaseUrl=${{ secrets.REALM_QA_BASE_URL }},mongodbClusterName=${{ secrets.ATLAS_QA_DAILY_CLUSTER_NAME }},privateKey=${{ secrets.ATLAS_QA_PRIVATE_API_KEY }},publicKey=${{ secrets.ATLAS_QA_PUBLIC_API_KEY }}" >> $GITHUB_OUTPUT
run: echo "context=syncLogLevel=warn,longTimeout=${{ env.LONG_TIMEOUT }},realmBaseUrl=${{ secrets.REALM_QA_BASE_URL }},mongodbClusterName=${{ secrets.ATLAS_QA_DAILY_CLUSTER_NAME }},privateKey=${{ secrets.ATLAS_QA_PRIVATE_API_KEY }},publicKey=${{ secrets.ATLAS_QA_PUBLIC_API_KEY }}" >> $GITHUB_OUTPUT

- name: Run ${{matrix.variant.target}} (${{ matrix.variant.os}} / ${{ matrix.variant.environment }})
if: ${{ (matrix.variant.os != 'android') && (matrix.variant.os != 'ios') }}
env:
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.mrc }}
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.context }}
# The non react native environments should not take so long
timeout-minutes: 20
timeout-minutes: 60
run: ${{ env.wrapper }} npm run ${{ matrix.variant.target}} --prefix integration-tests/environments/${{ matrix.variant.environment }}

- name: Run ${{matrix.variant.target}} (${{ matrix.variant.os}} / ${{ matrix.variant.environment }})
if: ${{ (matrix.variant.os == 'ios') }}
env:
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.mrc }}
timeout-minutes: 45
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.context }}
timeout-minutes: 75
run: ${{ env.wrapper }} npm run ${{ matrix.variant.target}} --prefix integration-tests/environments/${{ matrix.variant.environment }}

- name: Setup Java Gradle cache for android test app
Expand Down Expand Up @@ -378,8 +378,8 @@ jobs:
- name: Run ${{matrix.variant.target}} (${{ matrix.variant.os}} / ${{ matrix.variant.environment }})
if: ${{ (matrix.variant.os == 'android') }}
env:
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.mrc }}
timeout-minutes: 45
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.context }}
timeout-minutes: 75
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-realm-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.BAAS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BAAS_AWS_SECRET_ACCESS_KEY }}
MONGODB_REALM_TEST_SERVER: "2022-06-15"
MONGODB_REALM_TEST_SERVER: "2023-02-22"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ integration-tests/**/.lock
/react-native/android/src/main/java/io/realm/react/Version.java
/react-native/android/src/main/jniLibs/
/realm*.tgz
/tests/js/realm-tests*.tgz
/react-native/ios/realm-js-ios.xcframework/

# Ignore template package-lock.json files
Expand Down
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@
"--filter=${input:testFilter}"
]
},
{
"type": "node",
"name": "Realm Integration Tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder}/integration-tests/tests",
"runtimeExecutable": "npm",
"args": [
"run",
"test",
"--",
"--grep='${input:grepPattern}'"
]
},
{
"type": "node",
"request": "launch",
Expand Down Expand Up @@ -253,5 +268,11 @@
"default": "",
"description": "PID of the app process"
},
{
"id": "grepPattern",
"type": "promptString",
"default": "",
"description": "Grep pattern for filtering by test description name"
},
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ realm.write(() => {
* APIs are backwards compatible with all previous releases of Realm JavaScript in the 10.5.x series.
* File format: generates Realms with format v22 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 or later for synced Realms).

<<<<<<< HEAD
### Internal
* Upgraded Realm Core from v12.5.1 to v12.6.0. ([#4865](https://github.com/realm/realm-js/issues/4865))
* Updated C++ `clang-format` version to match newer MacOS default ([#4869](https://github.com/realm/realm-js/pull/4869))
Expand Down Expand Up @@ -755,6 +756,8 @@ const Person = {

## 10.18.0 (2022-5-29)

=======
>>>>>>> 1537f98a8 (Initial commit)
### Enhancements
* Switch to building xcframeworks with Xcode 13.1. Xcode 12 is no longer supported.
* Added an `initialSubscriptions` option to the `sync` config, which allows users to specify a subscription update function to bootstrap a set of flexible sync subscriptions when the Realm is first opened (or every time the app runs, using the `rerunOnOpen` flag). (#4561[https://github.com/realm/realm-js/pull/4561])
Expand Down
Loading

0 comments on commit 48bdd74

Please sign in to comment.