🚧 Update certificate management
This commit is contained in:
@@ -64,6 +64,26 @@ def test_disabled_listeners_are_omitted(session):
|
||||
assert "listener 1884" not in result.config_text
|
||||
|
||||
|
||||
def test_unpublished_port_listener_warns(session):
|
||||
"""Listeners on ports not published by compose warn: they are only
|
||||
reachable inside the Docker network (spec section 5)."""
|
||||
session.add(ListenerConfig(name="internal-only", port=8884, protocol="mqtt"))
|
||||
session.commit()
|
||||
|
||||
result = generate_config(session)
|
||||
assert any(
|
||||
"not published to the host" in w and "8884" in w for w in result.warnings
|
||||
)
|
||||
|
||||
|
||||
def test_published_port_listener_does_not_warn(session):
|
||||
session.add(ListenerConfig(name="prod", port=8883, protocol="mqtt"))
|
||||
session.commit()
|
||||
|
||||
result = generate_config(session)
|
||||
assert not any("not published to the host" in w for w in result.warnings)
|
||||
|
||||
|
||||
def test_tls_listener_without_pki_warns(session):
|
||||
session.add(
|
||||
ListenerConfig(
|
||||
|
||||
Reference in New Issue
Block a user