예제 #1
0
class TestMSSQLPlugin(unittest.TestCase):
    """
    Test MSSQL plugin class.
    """

    def setUp(self):
        #-H frselind0023.sel.fr.corp -u monitoring -p monitoring -d gIMM
        sys.argv = sys.argv[:1]
        args = [
            '-H', 'wweassql0005.eas.ww.corp',
            '-u', '9NagiosDC',
            '-p', 'NglP(23M,n',
            '-d', 'master',
        ]
        sys.argv.extend(args)
        self.plugin = NagiosPluginMSSQL()

    def tearDown(self):
        self.plugin.close()

    def test_db_connection(self):
        """Test connection to the database server."""
        self.assertTrue(self.plugin)

    def test_get_db_size(self):
        """Test retrieving the size of a database."""
        db_size = self.plugin.get_db_size()
        self.assertTrue('master' in db_size.keys())
예제 #2
0
class TestMSSQLPlugin(unittest.TestCase):
    """
    Test MSSQL plugin class.
    """

    def setUp(self):
        #-H frselind0023.sel.fr.corp -u monitoring -p monitoring -d gIMM
        sys.argv = sys.argv[:1]
        args = [
            '-H', 'wweassql0005.eas.ww.corp',
            '-u', '9NagiosDC',
            '-p', 'NglP(23M,n',
            '-d', 'master',
        ]
        sys.argv.extend(args)
        self.plugin = NagiosPluginMSSQL()

    def tearDown(self):
        self.plugin.close()

    def test_db_connection(self):
        """Test connection to the database server."""
        self.assertTrue(self.plugin)

    def test_get_db_size(self):
        """Test retrieving the size of a database."""
        db_size = self.plugin.get_db_size()
        self.assertTrue('master' in db_size.keys())
예제 #3
0
 def setUp(self):
     #-H frselind0023.sel.fr.corp -u monitoring -p monitoring -d gIMM
     sys.argv = sys.argv[:1]
     args = [
         '-H', 'wweassql0005.eas.ww.corp',
         '-u', '9NagiosDC',
         '-p', 'NglP(23M,n',
         '-d', 'master',
     ]
     sys.argv.extend(args)
     self.plugin = NagiosPluginMSSQL()
예제 #4
0
 def setUp(self):
     #-H frselind0023.sel.fr.corp -u monitoring -p monitoring -d gIMM
     sys.argv = sys.argv[:1]
     args = [
         '-H', 'wweassql0005.eas.ww.corp',
         '-u', '9NagiosDC',
         '-p', 'NglP(23M,n',
         '-d', 'master',
     ]
     sys.argv.extend(args)
     self.plugin = NagiosPluginMSSQL()