@@ -98,8 +98,6 @@ Once the virtual environment has been activated, please refer to [usage](#Usage)
9898
9999## Testing
100100
101- To run integration tests locally, it is highly recommended that [ Docker] ( https://www.docker.com/ ) is installed.
102-
103101### Unit Tests
104102
105103To run unit tests, run the following command:
@@ -110,37 +108,18 @@ $ pytest
110108
111109### Integration Tests
112110
113- Before running integration tests, please ensure the following information is configured correctly:
114-
115- - ` tests/integration/test_integration.sh:8 `
116-
117- Please ensure that the database connection string points to a valid PostgreSQL instance with valid parameters.
118-
119- To run integration tests, run the following command:
120-
121- ```
122- $ ./tests/integration/test_integration.sh
123- ```
124-
125- #### Docker
126-
127- If Docker is installed, running tests is as simple as running the following commands:
128-
129- ```
130- $ docker pull postgres
131- $ docker run --name stubdatabase -p 5432:5432 -e POSTGRES_PASSWORD=travisci -d postgres
132- $ make test_integration
133- $ docker stop stubdatabase
134- $ docker remove stubdatabase
135- ```
136-
137- #### Local PostgreSQL
138-
139- If a local instance of PostgreSQL is installed, run integration tests with the following command:
140-
141- ```
142- $ make test_integration
143- ```
111+ - Install PostgreSQL 9.6+
112+ - Execute below scripts to setup test db and user
113+ ```
114+ ./tests/integration/setup-part1.sql
115+ ./tests/integration/setup-part2.sql
116+ alembic -c dpo/alembic.ini -x postgresql+psycopg2://integration_test_user:integration_test_password@localhost:5432/integration_test_db upgrade head
117+ ```
118+ - To run integration tests, run either of the following commands:
119+ ```
120+ $ make test_integration
121+ $ ./tests/integration/test_integration.sh
122+ ```
144123
145124#### Notes
146125
0 commit comments