File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616@pytest .mark .asyncio
1717async def test_action (event_loop ):
1818 async with base .CleanModel () as model :
19- mysql_app = await model .deploy (
20- 'mysql' ,
21- application_name = 'mysql' ,
22- channel = '8.0/stable' ,
23- config = {
24- 'cluster-name' : 'cluster1' ,
25- },
26- constraints = {
27- 'arch' : 'amd64' ,
28- 'mem' : 256 * MB ,
29- },
30- )
31-
32- # update and check app config
33- await mysql_app .set_config ({'cluster-name' : 'cluster2' })
34- config = await mysql_app .get_config ()
35- assert config ['cluster-name' ]['value' ] == 'cluster2'
36-
37- # Restore config back to default
38- await mysql_app .reset_config (['cluster-name' ])
39- config = await mysql_app .get_config ()
40- assert 'value' not in config ['cluster-name' ]
41-
42- # update and check app constraints
43- await mysql_app .set_constraints ({'mem' : 512 * MB })
44- constraints = await mysql_app .get_constraints ()
45- assert constraints ['mem' ] == 512 * MB
46-
19+ app = await model .deploy ('juju-qa-test' )
4720 await jasyncio .sleep (10 )
48-
49- # check action definitions
50- actions = await mysql_app .get_actions (schema = True )
51- assert 'create-backup' in actions .keys ()
21+ actions = await app .get_actions (schema = True )
22+ assert 'fortune' in actions .keys (), 'mis"fortune" in charm actions'
5223
5324
5425@base .bootstrapped
You can’t perform that action at this time.
0 commit comments