-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(test-repository-postgresql): run repository tests for postgresql #3853
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| package-lock=true |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| Copyright (c) IBM Corp. 2019. All Rights Reserved. | ||
| Node module: @loopback/test-repository-postgresql | ||
| This project is licensed under the MIT License, full text below. | ||
|
|
||
| -------- | ||
|
|
||
| MIT license | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # @loopback/test-repository-postgresql | ||
|
|
||
| Acceptance tests for `@loopback/repository` + `loopback-connector-postgresql`. | ||
|
|
||
| ## Running the test suite | ||
|
|
||
| ### Using own PostgreSQL instance | ||
|
|
||
| If you have a local PostgreSQL instance listening on `localhost` and the default | ||
| port, with a `root` user and an empty password, use the following command: | ||
|
|
||
| ```bash | ||
| npm test | ||
| ``` | ||
|
|
||
| If you have a local or remote PostgreSQL instance and would like to use that to | ||
| run the test suite, use the following command: | ||
|
|
||
| **Linux & MacOS** | ||
|
|
||
| ```bash | ||
| POSTGRESQL_HOST=<HOST> POSTGRESQL_PORT=<PORT> POSTGRESQL_USER=<USER> POSTGRESQL_PASSWORD=<PASSWORD> POSTGRESQL_DATABASE=<DATABASE> npm test | ||
| ``` | ||
|
|
||
| **Windows** | ||
|
|
||
| ```bash | ||
| SET POSTGRESQL_HOST=<HOST> | ||
| SET POSTGRESQL_PORT=<PORT> | ||
| SET POSTGRESQL_USER=<USER> | ||
| SET POSTGRESQL_PASSWORD=<PASSWORD> | ||
| SET POSTGRESQL_DATABASE=<DATABASE> | ||
| npm test | ||
| ``` | ||
|
|
||
| ### Using Docker (Linux, MacOS, WSL) | ||
|
|
||
| If you do not have a local PostgreSQL instance, you can also run the test suite | ||
| with very minimal requirements. | ||
|
|
||
| - Assuming you have [Docker](https://docs.docker.com/engine/installation/) | ||
| installed, run the following script which would spawn a PostgreSQL instance on | ||
| your local: | ||
|
|
||
| ```bash | ||
| source setup.sh <HOST> <PORT> <USER> <PASSWORD> <DATABASE> | ||
| ``` | ||
|
|
||
| Where `<HOST>`, `<PORT>`, `<USER>`, `<PASSWORD>` and `<DATABASE>` are optional | ||
| parameters. The default values are `localhost`, `5432`, `root`, `pass` and | ||
| both `repository_tests` and `repository_tests_new` respectively. | ||
|
|
||
| - Run the test: | ||
|
|
||
| ```bash | ||
| npm test | ||
| ``` | ||
|
|
||
| ## Contributors | ||
|
|
||
| See | ||
| [all contributors](https://github.com/strongloop/loopback-next/graphs/contributors). | ||
|
|
||
| ## License | ||
|
|
||
| MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Copyright IBM Corp. 2019. All Rights Reserved. | ||
| // Node module: @loopback/test-repository-postgresql | ||
| // This file is licensed under the MIT License. | ||
| // License text available at https://opensource.org/licenses/MIT | ||
|
|
||
| export * from './dist'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Copyright IBM Corp. 2019. All Rights Reserved. | ||
| // Node module: @loopback/test-repository-postgresql | ||
| // This file is licensed under the MIT License. | ||
| // License text available at https://opensource.org/licenses/MIT | ||
|
|
||
| module.exports = require('./dist'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Copyright IBM Corp. 2019. All Rights Reserved. | ||
| // Node module: @loopback/test-repository-postgresql | ||
| // This file is licensed under the MIT License. | ||
| // License text available at https://opensource.org/licenses/MIT | ||
|
|
||
| // DO NOT EDIT THIS FILE | ||
| // Add any additional (re)exports to src/index.ts instead. | ||
| export * from './src'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing because
--include-filtered-dependencieshas been renamed.