tests: Make tests fail if they try to connect to the real session bus
authorSimon McVittie <smcv@collabora.com>
Wed, 5 Jul 2017 14:32:40 +0000 (15:32 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Jul 2017 09:54:14 +0000 (10:54 +0100)
commitf2f239fc83cd902ceeb73b5338fd8afa3563d649
tree8c62bd7c6fbca6e24af3ff9cd043386b2b6f2d62
parent8e48532d242c8f7529960b2bbee85e11179cfb56
tests: Make tests fail if they try to connect to the real session bus

It is too easy for a developer working in an environment that has a
session bus to write tests that pass locally, but fail in minimal
environments. This is also risky because the tests might do
destructive things on the developer's real session bus. We can avoid
connecting to the session bus by consistently removing its address
from the environment, and replacing it with something that will
always fail.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101698
test/Makefile.am
test/name-test/Makefile.am