1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #28322 -- Added dbshell support for MySQL client TLS certs.

This commit is contained in:
Paul Tiplady
2017-06-19 15:11:25 -07:00
committed by Tim Graham
parent a469e158a9
commit 335a8d7895
3 changed files with 20 additions and 5 deletions

View File

@@ -59,14 +59,21 @@ class MySqlDbshellCommandTestCase(SimpleTestCase):
def test_ssl_certificate_is_added(self):
self.assertEqual(
['mysql', '--user=someuser', '--password=somepassword',
'--host=somehost', '--port=444', '--ssl-ca=sslca', 'somedbname'],
'--host=somehost', '--port=444', '--ssl-ca=sslca',
'--ssl-cert=sslcert', '--ssl-key=sslkey', 'somedbname'],
self.get_command_line_arguments({
'NAME': 'somedbname',
'USER': 'someuser',
'PASSWORD': 'somepassword',
'HOST': 'somehost',
'PORT': 444,
'OPTIONS': {'ssl': {'ca': 'sslca'}},
'OPTIONS': {
'ssl': {
'ca': 'sslca',
'cert': 'sslcert',
'key': 'sslkey',
},
},
}))
def get_command_line_arguments(self, connection_settings):