def test_build_global(self): expected_opts = [ 'global', '\tdaemon', '\tuser nobody', '\tgroup test_group', '\tlog /dev/log local0', '\tlog /dev/log local1 notice', '\tstats socket test_path mode 0666 level user' ] opts = cfg._build_global(mock.Mock(), 'test_path', 'test_group') self.assertEqual(expected_opts, list(opts))
def test_build_global(self): expected_opts = ['global', '\tdaemon', '\tuser nobody', '\tgroup test_group', '\tlog /dev/log local0', '\tlog /dev/log local1 notice', '\tstats socket test_path mode 0666 level user'] opts = cfg._build_global(mock.Mock(), 'test_path', 'test_group') self.assertEqual(expected_opts, list(opts))
def test_build_global(self): if not hasattr(config.CONF, 'user_group'): config.CONF.register_opt(config.StrOpt('user_group')) config.CONF.set_override('user_group', 'test_group') expected_opts = [ 'global', '\tdaemon', '\tuser nobody', '\tgroup test_group', '\tlog /dev/log local0', '\tlog /dev/log local1 notice', '\tstats socket test_path mode 0666 level user' ] opts = cfg._build_global(mock.Mock(), 'test_path') self.assertEqual(expected_opts, list(opts)) config.CONF.reset()
def test_build_global(self): if not hasattr(config.CONF, 'user_group'): config.CONF.register_opt(config.StrOpt('user_group')) config.CONF.set_override('user_group', 'test_group') expected_opts = ['global', '\tdaemon', '\tuser nobody', '\tgroup test_group', '\tlog /dev/log local0', '\tlog /dev/log local1 notice', '\tstats socket test_path mode 0666 level user'] opts = cfg._build_global(mock.Mock(), 'test_path') self.assertEqual(expected_opts, list(opts)) config.CONF.reset()
def test_build_global(self): if not hasattr(config.CONF, "user_group"): config.CONF.register_opt(config.StrOpt("user_group")) config.CONF.set_override("user_group", "test_group") expected_opts = [ "global", "\tdaemon", "\tuser nobody", "\tgroup test_group", "\tlog /dev/log local0", "\tlog /dev/log local1 notice", "\tstats socket test_path mode 0666 level user", ] opts = cfg._build_global(mock.Mock(), "test_path") self.assertEqual(expected_opts, list(opts)) config.CONF.reset()