fix unit test, disable some tests on headless machines