diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2310f11fbc33276f4fdbb1a1fef9504d22294ef8..64bc9f8e26f4168772c439299704bd427e6f2d40 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -44,6 +44,7 @@ test_postgres:
          - postgres:latest
     script:
          - cp "local_settings_ci.py" "smash/smash/local_settings.py"
+         - pip install "psycopg2==2.9.9"
          - cd smash
          - coverage run --source web manage.py test -v3
          - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
@@ -54,6 +55,7 @@ test_mariadb:
          - mariadb:10.6-ubi
     script:
          - cp "local_settings_ci_mariadb.py" "smash/smash/local_settings.py"
+         - pip install "mysqlclient==2.2.4"
          - cd smash
          - sleep 10
          - coverage run --source web manage.py test --noinput -v3
diff --git a/CHANGELOG b/CHANGELOG
index 79646dd2f8aa2efa2e30599da2f140119a6fcd5f..21cb55fdc0dbbe162ea3934b333c328f55d6f72c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
 smasch (1.4.5-1) stable; urgency=medium
   * added support for mariadb
+  * allow overriding the redcap test instance in settings.
 
   -- Carlos Vega <carlos.vega@lih.lu> Wed, 31 Jul 2024 10:11:00 +0200
 
diff --git a/requirements.txt b/requirements.txt
index 2b48025ae36f0e507bcd5c1443af15bdcaeb1f0f..b575d0f39596ae49e079c5ff9e0e4c65089eb5f5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -31,7 +31,6 @@ luhn==0.2.0
 lxml==4.9.3
 matplotlib==3.8.1
 mockito==1.4.0
-mysqlclient==2.2.4
 nexmo==2.5.2
 numpy==1.26.1
 pandas==2.1.2
@@ -39,7 +38,6 @@ packaging==23.2
 django-datatables-view==1.20.0
 phonenumberslite==8.13.24
 Pillow==10.1.0
-psycopg2==2.9.9
 pycparser==2.21
 pyexcel==0.7.0
 pyexcel-io==0.6.6
diff --git a/smash/smash/settings.py b/smash/smash/settings.py
index 5d3a28ae39aa969f1696fb71e2c33492a27a863e..12e6fc6b411a20ef64351e023c6f51102f91ec4b 100644
--- a/smash/smash/settings.py
+++ b/smash/smash/settings.py
@@ -11,12 +11,15 @@ https://docs.djangoproject.com/en/1.10/ref/settings/
 """
 
 import functools
+import logging
 import os
 import ldap
 from django_auth_ldap.config import LDAPSearch
 
 from django.contrib.staticfiles import storage
 
+logger = logging.getLogger(__name__)
+
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
@@ -25,8 +28,11 @@ PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
 
 # To run the unit tests we need a redcap instance.
 # UL
-REDCAP_TEST_API_TOKEN = "5DC21D45E3A2E068659F11046EA88734"
-REDCAP_TEST_URL = "https://luxparktest.lcsb.uni.lu/redcap/"
+REDCAP_TEST_API_TOKEN = os.environ.get('REDCAP_TEST_API_TOKEN', None)
+REDCAP_TEST_URL = os.environ.get('REDCAP_TEST_URL', None)
+
+if REDCAP_TEST_API_TOKEN is None or REDCAP_TEST_URL is None:
+    logging.warning('Environment variables REDCAP_TEST_API_TOKEN or REDCAP_TEST_URL does not exist. Unit tests for redcap will fail without them having proper values.')
 
 COPYRIGHT_NOTE = "2024 Bioinformatics Core, Luxembourg Centre for Systems Biomedicine"