diff --git a/tests/test_apt.sh b/tests/test_apt.sh
index 079bd9561104d6f313cdb688f7cfb8d1ec83c4c6..8e7a3a1fb022b683e1ddd2124b06850356592cab 100755
--- a/tests/test_apt.sh
+++ b/tests/test_apt.sh
@@ -3,6 +3,9 @@
 # Check that updates can be installed and that automatic security updates are enabled.
 set -e
 
+PATH=/usr/bin:/bin:/usr/sbin:/sbin
+DEBIAN_FRONTEND=noninteractive
+
 echo "Testing apt-get install"
 
 echo "Clean repository"