Beispiel #1
0
 def test_validate_pgport_with_non_matching_pgport(self, mock1, mock2):
     master_data_dir = '/foo'
     with self.assertRaisesRegexp(
             Exception,
             'PGPORT value in %s/postgresql.conf does not match PGPORT environment variable'
             % master_data_dir):
         validate_pgport(master_data_dir)
Beispiel #2
0
 def test_validate_pgport_with_matching_pgport(self, mock1, mock2):
     self.assertEqual(12345, validate_pgport('/foo'))
Beispiel #3
0
 def test_validate_pgport_with_no_pgport_env(self, mock1, mock2):
     self.assertEqual(12345, validate_pgport('/foo'))
Beispiel #4
0
 def test_validate_pgport_with_no_pgport_env(self, mock1, mock2):
     self.assertEqual(12345, validate_pgport('/foo'))        
Beispiel #5
0
 def test_validate_pgport_with_matching_pgport(self, mock1, mock2):
     self.assertEqual(12345, validate_pgport('/foo'))        
Beispiel #6
0
 def test_validate_pgport_with_non_matching_pgport(self, mock1, mock2):
     master_data_dir = '/foo'
     with self.assertRaisesRegexp(Exception, 'PGPORT value in %s/postgresql.conf does not match PGPORT environment variable' % master_data_dir):
         validate_pgport(master_data_dir)