Exemple #1
0
  def testunit_assert_collectd_installed_WHEN_nagios_bin_missing_error(
      self):
    check_collectd_mlab.COLLECTD_NAGIOS = (
        os.path.join(self.testdata_dir, 'does_not_exist'))

    with self.assertRaises(check_collectd_mlab.MissingNagiosBinaryError):
      check_collectd_mlab.assert_collectd_installed()
Exemple #2
0
  def testunit_assert_collectd_installed_WHEN_bad_socket_RAISES_error(
      self):
    check_collectd_mlab.COLLECTD_UNIXSOCK = 'does_not_exist'

    with self.assertRaises(check_collectd_mlab.MissingSocketError):
      check_collectd_mlab.assert_collectd_installed()
Exemple #3
0
  def testunit_assert_collectd_installed_WHEN_bin_missing_RAISES_error(
      self):
    check_collectd_mlab.COLLECTD_BIN = 'does_not_exist'

    with self.assertRaises(check_collectd_mlab.MissingBinaryError):
      check_collectd_mlab.assert_collectd_installed()
 def testunit_assert_collectd_installed_WHEN_missing_updated_RAISES_error(
         self):
     # Use default value for check_collectd_mlab.SNMP_COMMUNITY.
     with self.assertRaises(
             check_collectd_mlab.MissingUpdatedSNMPCommunityError):
         check_collectd_mlab.assert_collectd_installed()
    def testunit_assert_collectd_installed_WHEN_missing_community_RAISES_error(
            self):
        check_collectd_mlab.SNMP_COMMUNITY = 'does_not_exist'

        with self.assertRaises(check_collectd_mlab.MissingSNMPCommunityError):
            check_collectd_mlab.assert_collectd_installed()
Exemple #6
0
 def testunit_assert_collectd_installed_WHEN_missing_updated_RAISES_error(
         self):
     # Use default value for check_collectd_mlab.SNMP_COMMUNITY.
     with self.assertRaises(
             check_collectd_mlab.MissingUpdatedSNMPCommunityError):
         check_collectd_mlab.assert_collectd_installed()
Exemple #7
0
    def testunit_assert_collectd_installed_WHEN_missing_community_RAISES_error(
            self):
        check_collectd_mlab.SNMP_COMMUNITY = 'does_not_exist'

        with self.assertRaises(check_collectd_mlab.MissingSNMPCommunityError):
            check_collectd_mlab.assert_collectd_installed()