diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a7106662f16e97e6b74e5267473706c03d8aa987..c14fe1746df71de6bf42cbe69a6ab7740fe884d9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ before_script:
     - ln -s /builds /go/src/gitlab.cs.fau.de
     - cd /go/src/gitlab.cs.fau.de/koomi/goatherd
     - go get -d
+    - export PGHOST=postgres PGUSER=$POSTGRES_USER PGPASSWORD=$POSTGRES_PASSWORD PGSSLMODE=disable
     - export DB_URL="host=postgres user=$POSTGRES_USER password=$POSTGRES_PASSWORD sslmode=disable"
     - apt update
     - apt install --yes libpam0g-dev libgnutls28-dev libpam-wrapper pamtester oathtool postgresql
@@ -18,13 +19,13 @@ before_script:
 go1.8:
     image: golang:1.8-stretch
     script:
-        - PGPASSWORD="$POSTGRES_PASSWORD" PGHOST=postgres make test
+        - make test
     tags:
         - shared runner
 
 go1.9:
     image: golang:1.9-stretch
     script:
-        - PGPASSWORD="$POSTGRES_PASSWORD" PGHOST=postgres make test
+        - make test
     tags:
         - shared runner