Skip to content

Commit

Permalink
test improvements (#4764)
Browse files Browse the repository at this point in the history
* remove old hard coded baas configurations

* isolate test data by assigning a unique collection name per app

* update more hard coded test db names

* remove unused parameter
  • Loading branch information
ironage committed Jun 16, 2021
1 parent 2a67b99 commit fc8d687
Show file tree
Hide file tree
Showing 27 changed files with 58 additions and 381 deletions.
4 changes: 1 addition & 3 deletions Jenkinsfile
Expand Up @@ -280,8 +280,6 @@ def doCheckInDocker(Map options = [:]) {
def environment = environment()
environment << 'UNITTEST_PROGRESS=1'

cmakeDefinitions += " -DREALM_STITCH_CONFIG=\"${sourcesDir}/test/object-store/mongodb/config.json\""

def buildSteps = { String dockerArgs = "" ->
withEnv(environment) {
buildEnv.inside(dockerArgs) {
Expand All @@ -307,7 +305,7 @@ def doCheckInDocker(Map options = [:]) {
// see https://github.com/realm/ci/tree/master/realm/docker/mongodb-realm
// we refrain from using "latest" here to optimise docker pull cost due to a new image being built every day
// if there's really a new feature you need from the latest stitch, upgrade this manually
withRealmCloud(version: dependencies.MDBREALM_TEST_SERVER_TAG, appsToImport: ['auth-integration-tests': "${env.WORKSPACE}/test/object-store/mongodb"]) { networkName ->
withRealmCloud(version: dependencies.MDBREALM_TEST_SERVER_TAG) { networkName ->
buildSteps("--network=${networkName}")
}

Expand Down
1 change: 0 additions & 1 deletion evergreen/config.yml
Expand Up @@ -71,7 +71,6 @@ functions:
if [ -n "${run_tests_against_baas|}" ]; then
set_cmake_var baas_vars REALM_ENABLE_AUTH_TESTS BOOL On
set_cmake_var baas_vars REALM_MONGODB_ENDPOINT STRING "http://localhost:9090"
set_cmake_var baas_vars REALM_STITCH_CONFIG PATH $(pwd)/test/object-store/mongodb/config.json
fi
if [ -n "${enable_asan|}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion how-to-build.md
Expand Up @@ -152,7 +152,7 @@ Once authorized, run the following docker command from the top directory to star

```
export MDBREALM_TEST_SERVER_TAG=$(grep MDBREALM_TEST_SERVER_TAG dependencies.list |cut -f 2 -d=)
docker run --rm -v $(pwd)/test/object-store/mongodb:/apps/os-integration-tests -p 9090:9090 -it docker.pkg.github.com/realm/ci/mongodb-realm-test-server:${MDBREALM_TEST_SERVER_TAG}
docker run --rm -p 9090:9090 -it docker.pkg.github.com/realm/ci/mongodb-realm-test-server:${MDBREALM_TEST_SERVER_TAG}
```

This will make the stitch UI available in your browser at `localhost:9090` where you can login with "unique_user@domain.com" and "password".
Expand Down
1 change: 0 additions & 1 deletion test/object-store/mongodb/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/auth_providers/anon-user.json

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/auth_providers/api-key.json

This file was deleted.

9 changes: 0 additions & 9 deletions test/object-store/mongodb/auth_providers/custom-function.json

This file was deleted.

17 changes: 0 additions & 17 deletions test/object-store/mongodb/auth_providers/local-userpass.json

This file was deleted.

14 changes: 0 additions & 14 deletions test/object-store/mongodb/config.json

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/functions/authFunc/config.json

This file was deleted.

17 changes: 0 additions & 17 deletions test/object-store/mongodb/functions/authFunc/source.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/functions/confirmFunc/config.json

This file was deleted.

49 changes: 0 additions & 49 deletions test/object-store/mongodb/functions/confirmFunc/source.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/functions/resetFunc/config.json

This file was deleted.

51 changes: 0 additions & 51 deletions test/object-store/mongodb/functions/resetFunc/source.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/object-store/mongodb/functions/sumFunc/config.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/object-store/mongodb/functions/sumFunc/source.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/object-store/mongodb/graphql/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions test/object-store/mongodb/secrets.json

This file was deleted.

23 changes: 0 additions & 23 deletions test/object-store/mongodb/services/BackingDB/config.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions test/object-store/mongodb/services/gcm/config.json

This file was deleted.

0 comments on commit fc8d687

Please sign in to comment.