Пример #1
0
 def test_make_postgres_check_local_socket(self):
     result = make_postgres_check('/local.sock', 8080,'foo',
                                  'bar', 'test')
     self.assertIsInstance(result, MultiCheck)
     self.assertIs(result.strategy, sequential_strategy)
     self.assertEqual(len(result.subchecks), 1)
     self.assertThat(result.subchecks[0],
             FunctionCheckMatcher('postgres:/local.sock:8080', 'user foo', blocking=True))
Пример #2
0
 def test_make_postgres_check_local_socket(self):
     result = make_postgres_check('/local.sock', 8080, 'foo', 'bar', 'test')
     self.assertIsInstance(result, MultiCheck)
     self.assertIs(result.strategy, sequential_strategy)
     self.assertEqual(len(result.subchecks), 1)
     self.assertThat(
         result.subchecks[0],
         FunctionCheckMatcher('postgres:/local.sock:8080',
                              'user foo',
                              blocking=True))
Пример #3
0
 def test_make_postgres_check(self):
     result = make_postgres_check('localhost', 8080,'foo',
                                  'bar', 'test')
     self.assertIsInstance(result, MultiCheck)
     self.assertIs(result.strategy, sequential_strategy)
     self.assertEqual(len(result.subchecks), 2)
     self.assertThat(result.subchecks[0],
             FunctionCheckMatcher('tcp:localhost:8080', 'localhost:8080'))
     self.assertThat(result.subchecks[1],
             FunctionCheckMatcher('postgres:localhost:8080', 'user foo', blocking=True))
Пример #4
0
 def test_make_postgres_check(self):
     result = make_postgres_check('localhost', 8080, 'foo', 'bar', 'test')
     self.assertIsInstance(result, MultiCheck)
     self.assertIs(result.strategy, sequential_strategy)
     self.assertEqual(len(result.subchecks), 2)
     self.assertThat(
         result.subchecks[0],
         FunctionCheckMatcher('tcp:localhost:8080', 'localhost:8080'))
     self.assertThat(
         result.subchecks[1],
         FunctionCheckMatcher('postgres:localhost:8080',
                              'user foo',
                              blocking=True))