def test_wrong_config(self): cfg = '/x/y/z/not_found/on_any/server/rdir.conf' with open('/dev/null', 'w') as out: fd = out.fileno() proc = subprocess.Popen( ['oio-rdir-server', cfg], stderr=fd) self.assertTrue(check_process_absent(proc))
def test_volume_lock(self): host, port = '127.0.0.1', 5999 cfg = tempfile.mktemp() db = tempfile.mkdtemp() self.garbage_files.extend((cfg, db)) out = open('/dev/null', 'w') fd = out.fileno() # start a first rdir config = {'host': host, 'port': port, 'ns': self.ns, 'db': db} _write_config(cfg, config) proc0 = subprocess.Popen(['oio-rdir-server', cfg], stderr=fd) self.garbage_procs.append(proc0) self.assertTrue(wait_for_slow_startup(port)) # now start a second rdir on another port config.update({'port': port + 1}) _write_config(cfg, config) proc1 = subprocess.Popen(['oio-rdir-server', cfg], stderr=fd) self.garbage_procs.append(proc1) self.assertTrue(check_process_absent(proc1))
def test_no_config(self): with open('/dev/null', 'w') as out: fd = out.fileno() proc = subprocess.Popen(['oio-rdir-server'], stderr=fd) self.assertTrue(check_process_absent(proc))