tests: fix tests to run without x server