File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import uuid
66import hvac
77
8- from juju import access
8+ from juju import access , controller
99from juju .client .connection import Connection
1010from juju .client import client
1111from juju .errors import JujuAPIError , JujuError
@@ -298,6 +298,22 @@ async def test_grant_revoke_controller_access(event_loop):
298298 raise
299299
300300
301+ @base .bootstrapped
302+ async def test_connection_lazy_jujudata (event_loop ):
303+ async with base .CleanController () as cont1 :
304+ conn = cont1 .connection ()
305+ new_controller = controller .Controller ()
306+ await new_controller .connect (endpoint = conn .endpoints [0 ][0 ],
307+ cacert = conn .cacert ,
308+ username = conn .usertag ,
309+ password = conn .password ,
310+ )
311+ assert new_controller ._controller_name is None
312+ new_controller .controller_name
313+ assert new_controller ._controller_name is not None
314+ await new_controller .disconnect ()
315+
316+
301317@base .bootstrapped
302318async def test_grant_revoke_model_access (event_loop ):
303319 async with base .CleanController () as controller :
You can’t perform that action at this time.
0 commit comments