Beispiel #1
0
 def test_db_pools_to_provider_pools(self, mock_load_cert, mock_secret):
     pool_cert = data_models.TLSContainer(certificate='pool cert')
     mock_load_cert.return_value = {'tls_cert': pool_cert,
                                    'sni_certs': None,
                                    'client_ca_cert': None}
     mock_secret.side_effect = ['X509 POOL CA CERT FILE',
                                'X509 POOL CRL FILE']
     provider_pools = utils.db_pools_to_provider_pools(
         self.sample_data.test_db_pools)
     self.assertEqual(self.sample_data.provider_pools, provider_pools)
Beispiel #2
0
 def test_db_pools_to_provider_pools(self, mock_load_cert, mock_secret):
     pool_cert = data_models.TLSContainer(certificate='pool cert')
     mock_load_cert.return_value = {'tls_cert': pool_cert,
                                    'sni_certs': None,
                                    'client_ca_cert': None}
     mock_secret.side_effect = ['X509 POOL CA CERT FILE',
                                'X509 POOL CRL FILE']
     provider_pools = utils.db_pools_to_provider_pools(
         self.sample_data.test_db_pools)
     self.assertEqual(self.sample_data.provider_pools, provider_pools)
Beispiel #3
0
 def test_db_pools_to_provider_pools(self, mock_load_cert, mock_secret):
     pool_cert = data_models.TLSContainer(certificate='pool cert')
     mock_load_cert.return_value = {
         'tls_cert': pool_cert,
         'sni_certs': None,
         'client_ca_cert': None
     }
     mock_secret.side_effect = [
         'X509 POOL CA CERT FILE', 'X509 POOL CRL FILE'
     ]
     provider_pools = utils.db_pools_to_provider_pools(
         self.sample_data.test_db_pools)
     # TODO(johnsom) Remove when versions and ciphers are implemented
     expect_prov_pools = copy.deepcopy(self.sample_data.provider_pools)
     for prov_pool in expect_prov_pools:
         delattr(prov_pool, lib_constants.TLS_VERSIONS)
     self.assertEqual(expect_prov_pools, provider_pools)
Beispiel #4
0
 def test_db_pools_to_provider_pools(self):
     provider_pools = utils.db_pools_to_provider_pools(
         self.sample_data.test_db_pools)
     self.assertEqual(self.sample_data.provider_pools, provider_pools)