예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
 def test_new_configs(self):
     cfgs = ['*.* myhost', '*.* my2host']
     self.basecfg.update({'configs': cfgs})
     self.assertEqual(load_config({'rsyslog': {
         'configs': cfgs
     }}), self.basecfg)
예제 #5
0
 def test_new_defaults(self):
     self.assertEqual(load_config({}), self.basecfg)
예제 #6
0
 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)
예제 #7
0
 def test_new_configs(self):
     cfgs = ['*.* myhost', '*.* my2host']
     self.basecfg.update({'configs': cfgs})
     self.assertEqual(
         load_config({'rsyslog': {'configs': cfgs}}),
         self.basecfg)
예제 #8
0
 def test_new_defaults(self):
     self.assertEqual(load_config({}), self.basecfg)
예제 #9
0
 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)
예제 #10
0
 def test_new_configs(self):
     cfgs = ["*.* myhost", "*.* my2host"]
     self.basecfg.update({"configs": cfgs})
     self.assertEqual(load_config({"rsyslog": {
         "configs": cfgs
     }}), self.basecfg)
예제 #11
0
 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)