Commit 3364174a authored by Jérome Perrin's avatar Jérome Perrin

software/erp5/test: rename CaucaseClientCertificate to CaucaseCertificate

This resource is just a certificate, not necessary a certificate to use as
client.
parent ac7b74e4
...@@ -443,8 +443,8 @@ class TestContentEncoding(BalancerTestCase): ...@@ -443,8 +443,8 @@ class TestContentEncoding(BalancerTestCase):
self.assertEqual(resp.text, 'OK') self.assertEqual(resp.text, 'OK')
class CaucaseClientCertificate(ManagedResource): class CaucaseCertificate(ManagedResource):
"""A client certificate issued by a caucase services. """A certificate signed by a caucase service.
""" """
ca_crt_file = None # type: str ca_crt_file = None # type: str
...@@ -560,7 +560,7 @@ class TestFrontendXForwardedFor(BalancerTestCase): ...@@ -560,7 +560,7 @@ class TestFrontendXForwardedFor(BalancerTestCase):
def _getInstanceParameterDict(cls): def _getInstanceParameterDict(cls):
# type: () -> Dict # type: () -> Dict
frontend_caucase = cls.getManagedResource('frontend_caucase', CaucaseService) frontend_caucase = cls.getManagedResource('frontend_caucase', CaucaseService)
certificate = cls.getManagedResource('client_certificate', CaucaseClientCertificate) certificate = cls.getManagedResource('client_certificate', CaucaseCertificate)
certificate.request(u'shared frontend', frontend_caucase) certificate.request(u'shared frontend', frontend_caucase)
parameter_dict = super(TestFrontendXForwardedFor, cls)._getInstanceParameterDict() parameter_dict = super(TestFrontendXForwardedFor, cls)._getInstanceParameterDict()
...@@ -576,7 +576,7 @@ class TestFrontendXForwardedFor(BalancerTestCase): ...@@ -576,7 +576,7 @@ class TestFrontendXForwardedFor(BalancerTestCase):
def test_x_forwarded_for_added_when_verified_connection(self): def test_x_forwarded_for_added_when_verified_connection(self):
# type: () -> None # type: () -> None
client_certificate = self.getManagedResource('client_certificate', CaucaseClientCertificate) client_certificate = self.getManagedResource('client_certificate', CaucaseCertificate)
for backend in ('default', 'default-auth'): for backend in ('default', 'default-auth'):
balancer_url = json.loads(self.computer_partition.getConnectionParameterDict()['_'])[backend] balancer_url = json.loads(self.computer_partition.getConnectionParameterDict()['_'])[backend]
...@@ -613,11 +613,11 @@ class TestClientTLS(BalancerTestCase): ...@@ -613,11 +613,11 @@ class TestClientTLS(BalancerTestCase):
def _getInstanceParameterDict(cls): def _getInstanceParameterDict(cls):
# type: () -> Dict # type: () -> Dict
frontend_caucase1 = cls.getManagedResource('frontend_caucase1', CaucaseService) frontend_caucase1 = cls.getManagedResource('frontend_caucase1', CaucaseService)
certificate1 = cls.getManagedResource('client_certificate1', CaucaseClientCertificate) certificate1 = cls.getManagedResource('client_certificate1', CaucaseCertificate)
certificate1.request(u'client_certificate1', frontend_caucase1) certificate1.request(u'client_certificate1', frontend_caucase1)
frontend_caucase2 = cls.getManagedResource('frontend_caucase2', CaucaseService) frontend_caucase2 = cls.getManagedResource('frontend_caucase2', CaucaseService)
certificate2 = cls.getManagedResource('client_certificate2', CaucaseClientCertificate) certificate2 = cls.getManagedResource('client_certificate2', CaucaseCertificate)
certificate2.request(u'client_certificate2', frontend_caucase2) certificate2.request(u'client_certificate2', frontend_caucase2)
parameter_dict = super(TestClientTLS, cls)._getInstanceParameterDict() parameter_dict = super(TestClientTLS, cls)._getInstanceParameterDict()
...@@ -646,7 +646,7 @@ class TestClientTLS(BalancerTestCase): ...@@ -646,7 +646,7 @@ class TestClientTLS(BalancerTestCase):
('client_certificate2', 'frontend_caucase2'), ('client_certificate2', 'frontend_caucase2'),
): ):
client_certificate = self.getManagedResource(client_certificate_name, client_certificate = self.getManagedResource(client_certificate_name,
CaucaseClientCertificate) CaucaseCertificate)
# when client certificate can be authenticated, backend receive the CN of # when client certificate can be authenticated, backend receive the CN of
# the client certificate in "remote-user" header # the client certificate in "remote-user" header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment