Fix ssl_key var name
Incorrect config key was responsible for bugs when configuring websso when using SSL. Closes-bug: #1960854 Change-Id: I241c7492ffcddf11c6b6464391fe986c61895b19
This commit is contained in:
parent
82897f8f5f
commit
a322faa469
|
@ -444,7 +444,7 @@ def websso_trusted_dashboard_changed():
|
|||
|
||||
# TODO: check for vault relation in order to determine url scheme
|
||||
tls_configured = (relation_ids('certificates') or
|
||||
config('ssl-key') or config('enforce-ssl'))
|
||||
config('ssl_key') or config('enforce-ssl'))
|
||||
scheme = 'https://' if tls_configured else 'http://'
|
||||
|
||||
hostname = resolve_address(endpoint_type=PUBLIC, override=True)
|
||||
|
@ -515,7 +515,7 @@ def application_dashboard_relation_changed(relation_id=None, unit=None):
|
|||
if not relations:
|
||||
return
|
||||
tls_configured = (
|
||||
relation_ids("certificates") or config("ssl-key")
|
||||
relation_ids("certificates") or config("ssl_key")
|
||||
or config("enforce-ssl")
|
||||
)
|
||||
scheme = "https://" if tls_configured else "http://"
|
||||
|
|
|
@ -245,7 +245,7 @@ class TestHorizonHooks(CharmTestCase):
|
|||
|
||||
def config_side_effect(key):
|
||||
return {
|
||||
'ssl-key': 'somekey',
|
||||
'ssl_key': 'somekey',
|
||||
'enforce-ssl': True,
|
||||
'dns-ha': True,
|
||||
'os-public-hostname': 'dashboard.intranet.test',
|
||||
|
@ -363,7 +363,7 @@ class TestHorizonHooks(CharmTestCase):
|
|||
|
||||
def config_side_effect(key):
|
||||
return {
|
||||
'ssl-key': None,
|
||||
'ssl_key': None,
|
||||
'enforce-ssl': None,
|
||||
'dns-ha': None,
|
||||
'os-public-hostname': hostname,
|
||||
|
@ -402,7 +402,7 @@ class TestHorizonHooks(CharmTestCase):
|
|||
|
||||
def config_side_effect(key):
|
||||
return {
|
||||
'ssl-key': None,
|
||||
'ssl_key': None,
|
||||
'enforce-ssl': None,
|
||||
'dns-ha': None,
|
||||
'os-public-hostname': hostname,
|
||||
|
@ -441,7 +441,7 @@ class TestHorizonHooks(CharmTestCase):
|
|||
|
||||
def config_side_effect(key):
|
||||
return {
|
||||
'ssl-key': 'somekey',
|
||||
'ssl_key': 'somekey',
|
||||
'enforce-ssl': True,
|
||||
'dns-ha': True,
|
||||
'os-public-hostname': hostname,
|
||||
|
@ -492,7 +492,7 @@ class TestHorizonHooks(CharmTestCase):
|
|||
|
||||
def config_side_effect(key):
|
||||
return {
|
||||
'ssl-key': 'somekey',
|
||||
'ssl_key': 'somekey',
|
||||
'enforce-ssl': True,
|
||||
'dns-ha': True,
|
||||
'os-public-hostname': hostname,
|
||||
|
|
Loading…
Reference in New Issue