def test_legacy_full(self): found = load_config({ 'rsyslog': ['*.* @192.168.1.1'], 'rsyslog_dir': "mydir", 'rsyslog_filename': "myfilename"}) self.basecfg.update({ 'configs': ['*.* @192.168.1.1'], 'config_dir': "mydir", 'config_filename': 'myfilename', 'service_reload_command': 'auto'} ) self.assertEqual(found, self.basecfg)
def test_legacy_full(self): found = load_config({ "rsyslog": ["*.* @192.168.1.1"], "rsyslog_dir": "mydir", "rsyslog_filename": "myfilename", }) self.basecfg.update({ "configs": ["*.* @192.168.1.1"], "config_dir": "mydir", "config_filename": "myfilename", "service_reload_command": "auto", }) self.assertEqual(found, self.basecfg)
def test_new_configs(self): cfgs = ['*.* myhost', '*.* my2host'] self.basecfg.update({'configs': cfgs}) self.assertEqual(load_config({'rsyslog': { 'configs': cfgs }}), self.basecfg)
def test_new_defaults(self): self.assertEqual(load_config({}), self.basecfg)
def test_legacy_defaults(self): found = load_config({'rsyslog': ['*.* @192.168.1.1']}) self.basecfg.update({'configs': ['*.* @192.168.1.1']}) self.assertEqual(found, self.basecfg)
def test_new_configs(self): cfgs = ['*.* myhost', '*.* my2host'] self.basecfg.update({'configs': cfgs}) self.assertEqual( load_config({'rsyslog': {'configs': cfgs}}), self.basecfg)
def test_legacy_defaults(self): found = load_config({ 'rsyslog': ['*.* @192.168.1.1']}) self.basecfg.update({ 'configs': ['*.* @192.168.1.1']}) self.assertEqual(found, self.basecfg)
def test_new_configs(self): cfgs = ["*.* myhost", "*.* my2host"] self.basecfg.update({"configs": cfgs}) self.assertEqual(load_config({"rsyslog": { "configs": cfgs }}), self.basecfg)
def test_legacy_defaults(self): found = load_config({"rsyslog": ["*.* @192.168.1.1"]}) self.basecfg.update({"configs": ["*.* @192.168.1.1"]}) self.assertEqual(found, self.basecfg)