10 async def test_action(event_loop
):
11 async with base
.CleanModel() as model
:
12 ubuntu_app
= await model
.deploy(
14 application_name
='mysql',
18 'tuning-level': 'safest',
25 # update and check app config
26 await ubuntu_app
.set_config({'tuning-level': 'fast'})
27 config
= await ubuntu_app
.get_config()
28 assert config
['tuning-level']['value'] == 'fast'
30 # update and check app constraints
31 await ubuntu_app
.set_constraints({'mem': 512 * MB
})
32 constraints
= await ubuntu_app
.get_constraints()
33 assert constraints
['mem'] == 512 * MB
38 async def test_add_units(event_loop
):
39 from juju
.unit
import Unit
41 async with base
.CleanModel() as model
:
42 app
= await model
.deploy(
44 application_name
='ubuntu',
48 units
= await app
.add_units(count
=2)
50 assert len(units
) == 2
52 assert isinstance(unit
, Unit
)