コード例 #1
0
 def testShouldHaveUsernameandAtLeastOneHostnameSetUp(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     self.assertTrue(logtailer.sanityCheck())
コード例 #2
0
ファイル: test_sshTailer.py プロジェクト: qrees/log4tailer
 def testShouldHaveUsernameandAtLeastOneHostnameSetUp(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     self.assertTrue(logtailer.sanityCheck())
コード例 #3
0
 def testshouldBuildCommandTailBasedOnHostnamesDict(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     logtailer.sanityCheck()
     command = "tail -F /var/log/anylog555 /var/log/anylog1"
     logtailer.createCommands()
     self.assertEquals(command, logtailer.hostnames['hostname0']['command'])
コード例 #4
0
 def testItShouldhaveBuildADictWithAllParamsIfAllParametersOk(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     logtailer.sanityCheck()
     self.assertEquals(3, len(logtailer.hostnames.keys()))
     self.assertEquals('username',
                       logtailer.hostnames['hostname0']['username'])
コード例 #5
0
ファイル: test_sshTailer.py プロジェクト: qrees/log4tailer
 def testshouldBuildCommandTailBasedOnHostnamesDict(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     logtailer.sanityCheck()
     command = "tail -F /var/log/anylog555 /var/log/anylog1"
     logtailer.createCommands()
     self.assertEquals(command,logtailer.hostnames['hostname0']['command'])
コード例 #6
0
ファイル: test_sshTailer.py プロジェクト: qrees/log4tailer
 def testItShouldhaveBuildADictWithAllParamsIfAllParametersOk(self):
     self._setUpConfigFile()
     properties = Property(self.configfile)
     properties.parse_properties()
     logging.debug(properties.get_keys())
     defaults = self._getDefaults()
     defaults.properties = properties
     logtailer = SSHLogTailer(defaults)
     logtailer.sanityCheck()
     self.assertEquals(3,len(logtailer.hostnames.keys()))
     self.assertEquals('username',
             logtailer.hostnames['hostname0']['username'])