From e4d594fca9fb42854bdc167aada9847acf6c231f Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 20 Nov 2017 10:36:37 -0200 Subject: [test] always use a tempdir for server fixture config file When starting up a Soledad Server through the use of a fixture in tests, a config file is created with the options needed for that test. As the config file was being created in /etc and not being removed, this was influencing servers started by other tests that don't use that fixture. By always using a temporary directory in the server fixture, we make sure that the config file is used only for that test and is removed after the test is finished. Closes: #8995 --- tests/conftest.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 59cce97e..36bed78b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -205,16 +205,7 @@ class SoledadServer(object): ]) def _create_conf_file(self): - - # come up with name of the configuration file - fname = '/etc/soledad/soledad-server.conf' - if not os.access('/etc', os.W_OK): - fname = os.path.join(self.tmpdir.strpath, 'soledad-server.conf') - - # create the configuration file - dirname = os.path.dirname(fname) - if not os.path.isdir(dirname): - os.mkdir(dirname) + fname = os.path.join(self.tmpdir.strpath, 'soledad-server.conf') with open(fname, 'w') as f: blobs_path = os.path.join(str(self.tmpdir), 'blobs') content = '''[soledad-server] -- cgit v1.2.3