Skip to content
Snippets Groups Projects

Added (again) database integration tests

Open Karsten Prehn requested to merge feature/integration-tests into main
1 unresolved thread
+ 31
0
@@ -38,3 +38,34 @@ tests::unit:
- pip3 install -r requirements.txt
# Run the unit tests
- pytest tests/unit -s -v
tests::integration:
stage: test
interruptible: true
image: docker:20.10.16
tags:
- dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
# We rely on the docker-in-docker service
- name: docker:20.10.16-dind
    • I see there is now a new error message. Can you add an alias like this:

        services:
          # We rely on the docker-in-docker service
          - name: docker:20.10.16-dind
            alias: docker
Please register or sign in to reply
alias: docker
before_script:
# Check if docker is up and running
- docker version
- docker-compose version
# Install dependencies
- apk update && apk add py-pip python3-dev libffi-dev
gcc libc-dev postgresql postgresql-dev docker-compose postgis
# Verify that `psql` executable is there
- psql --version && which psql && echo $PATH
# Install python pip
- python3 -m pip install --upgrade pip
script:
# Install Python `pytest` docker, mocker and database libraries
- pip3 install -r requirements.test-integration.txt
# Run the integration test
- pytest tests/integration -s -v
Loading