Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
test: add mongo db integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
machi1990 authored and wtrocki committed Jun 25, 2020
1 parent 92c197e commit 9622f73
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgresql
POSTGRES_DB: users
- image: circleci/mongo:latest
environment:
MONGO_INITDB_DATABASE: users
MONGO_INITDB_ROOT_USERNAME: mongodb
MONGO_INITDB_ROOT_PASSWORD: mongo
steps:
- checkout
- restore_cache:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ lib
yarn.lock
integration/test.sqlite
integration/output/
integration/output-postgres/
integration/output-mongo/
24 changes: 0 additions & 24 deletions integration/.graphqlrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"rimraf": "3.0.2",
"sqlite3": "4.2.0",
"ts-node": "8.10.2",
"tsutils": "3.17.1",
"typescript": "3.9.5",
Expand All @@ -27,6 +26,7 @@
"apollo-server-testing": "2.15.0",
"jest": "26.1.0",
"knex": "0.21.1",
"mongodb": "3.5.9",
"node-fetch": "2.6.0"
},
"license": "Apache-2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Object {
"nullable": true,
"type": "string",
},
"metadata" => Object {
"note" => Object {
"annotations": Object {},
"args": Array [],
"autoIncrementable": false,
Expand All @@ -146,15 +146,15 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "commentmetadata",
"type": "CommentMetadata",
"tableName": "note",
"type": "Note",
},
"isPrimaryKey": false,
"name": "metadataId",
"name": "noteId",
"nullable": true,
"type": "integer",
},
"note" => Object {
"metadata" => Object {
"annotations": Object {},
"args": Array [],
"autoIncrementable": false,
Expand All @@ -163,11 +163,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "note",
"type": "Note",
"tableName": "commentmetadata",
"type": "CommentMetadata",
},
"isPrimaryKey": false,
"name": "noteId",
"name": "metadataId",
"nullable": true,
"type": "integer",
},
Expand Down Expand Up @@ -222,11 +222,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "commentmetadata",
"type": "CommentMetadata",
"tableName": "note",
"type": "Note",
},
"isPrimaryKey": false,
"name": "metadataId",
"name": "noteId",
"nullable": true,
"type": "integer",
},
Expand All @@ -239,11 +239,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "note",
"type": "Note",
"tableName": "commentmetadata",
"type": "CommentMetadata",
},
"isPrimaryKey": false,
"name": "noteId",
"name": "metadataId",
"nullable": true,
"type": "integer",
},
Expand Down Expand Up @@ -448,7 +448,7 @@ Object {
"nullable": true,
"type": "string",
},
"metadata" => Object {
"note" => Object {
"annotations": Object {},
"args": Array [],
"autoIncrementable": false,
Expand All @@ -457,15 +457,15 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "commentmetadata",
"type": "CommentMetadata",
"tableName": "note",
"type": "Note",
},
"isPrimaryKey": false,
"name": "metadataId",
"name": "noteId",
"nullable": true,
"type": "integer",
},
"note" => Object {
"metadata" => Object {
"annotations": Object {},
"args": Array [],
"autoIncrementable": false,
Expand All @@ -474,11 +474,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "note",
"type": "Note",
"tableName": "commentmetadata",
"type": "CommentMetadata",
},
"isPrimaryKey": false,
"name": "noteId",
"name": "metadataId",
"nullable": true,
"type": "integer",
},
Expand Down Expand Up @@ -533,11 +533,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "commentmetadata",
"type": "CommentMetadata",
"tableName": "note",
"type": "Note",
},
"isPrimaryKey": false,
"name": "metadataId",
"name": "noteId",
"nullable": true,
"type": "integer",
},
Expand All @@ -550,11 +550,11 @@ Object {
"foreign": Object {
"columnName": "id",
"field": "id",
"tableName": "note",
"type": "Note",
"tableName": "commentmetadata",
"type": "CommentMetadata",
},
"isPrimaryKey": false,
"name": "noteId",
"name": "metadataId",
"nullable": true,
"type": "integer",
},
Expand Down
Loading

0 comments on commit 9622f73

Please sign in to comment.