Fix local tests and enable functional tests