-
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.
local-test-env and a DB-graph save/load test (#32)
* create docker-compose for continuous testing * add functions for clearing database entries, useful for testing * add test for graph saving
- Loading branch information
Showing
7 changed files
with
88 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3.8" | ||
services: | ||
test-database: | ||
image: postgres | ||
environment: | ||
- POSTGRES_USER=username | ||
- POSTGRES_PASSWORD=password | ||
kipubot: | ||
image: kipubot-test | ||
build: | ||
context: . | ||
dockerfile: test.Dockerfile | ||
volumes: | ||
- ./kipubot:/bot/kipubot | ||
- ./tests:/bot/tests | ||
environment: | ||
- MODE=TEST | ||
- PYTHONPATH=${PYTHONPATH}:kipubot | ||
- DATABASE_URL=postgresql://username:password@test-database:5432 | ||
depends_on: | ||
- test-database |
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,20 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM python:3.8 as base | ||
|
||
# Setup ENV variables here (if needed in the future) | ||
|
||
|
||
FROM base as python-deps | ||
|
||
# Install pipenv | ||
RUN pip3 install pipenv | ||
|
||
# Install python dependencies in /.venv | ||
WORKDIR /bot | ||
COPY Pipfile . | ||
COPY Pipfile.lock . | ||
RUN pipenv install --dev | ||
|
||
COPY . . | ||
# Run the app | ||
CMD [ "pipenv", "run", "test_hot" ] |
Binary file not shown.
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