def test_log_path_logfile_overrides_logdir(self): cfg.CONF.log_dir = '/some/other/path' cfg.CONF.log_file = '/some/path/foo-bar.log' self.assertEquals(log._get_log_file_path(binary='foo-bar'), '/some/path/foo-bar.log')
def test_log_path_logfile(self): cfg.CONF.log_file = '/some/path/foo-bar.log' self.assertEquals(log._get_log_file_path(binary='foo-bar'), '/some/path/foo-bar.log')
def test_log_path_none(self): cfg.CONF.log_dir = None cfg.CONF.log_file = None self.assertTrue(log._get_log_file_path(binary='foo-bar') is None)
def test_log_path_logdir(self): cfg.CONF.log_dir = '/some/path' cfg.CONF.log_file = None self.assertEquals(log._get_log_file_path(binary='foo-bar'), '/some/path/foo-bar.log')