-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#49 - added pytest db dependency test + readmy
- Loading branch information
1 parent
6f7f1bd
commit c3013f4
Showing
6 changed files
with
98 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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 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 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,29 @@ | ||
# How to setup the test environment | ||
|
||
## Check if all dependencies are installed or install them | ||
|
||
To check if all dependencies are installed run the following command: | ||
|
||
go to test folder in the project root directory and run: | ||
```bash | ||
bash ./bash_requirements_test.sh | ||
``` | ||
|
||
## Set up database or use existing one by changing the config file. Use one of the following options: | ||
1) Open `bedbase_config_test.yaml` file in the `test/test_dependencies` folder, and change database credentials the one that you want to use. | ||
2) Create a new database and user with the credentials that are in the `bedbase_config_test.yaml` file. Credentials that | ||
are in the config file are: | ||
```text | ||
host: localhost | ||
port: 5432 | ||
password: docker | ||
user: postgres | ||
name: bedbase | ||
``` | ||
|
||
### To create a new database and user with the credentials that are in the `bedbase_config_test.yaml` file, run the following commands: | ||
|
||
1) Go to `db_setup` directory and then run the following lines | ||
2) Build the docker: `docker build -t bedbase ./` | ||
3) Run the docker: `docker run --name bedbase -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=docker -p 5432:5432 -d bedbase` | ||
4) Start it: `docker start bedbase` |
This file contains 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,4 @@ | ||
FROM postgres | ||
ENV POSTGRES_USER postgres | ||
ENV POSTGRES_PASSWORD docker | ||
ENV POSTGRES_DB bedbase |
This file contains 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 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