1616@pytest .mark .asyncio
1717async def test_action (event_loop ):
1818 async with base .CleanModel () as model :
19- ubuntu_app = await model .deploy (
20- 'percona-cluster ' ,
19+ mysql_app = await model .deploy (
20+ 'mysql ' ,
2121 application_name = 'mysql' ,
22- series = 'xenial' ,
23- channel = 'stable' ,
22+ channel = '8.0/stable' ,
2423 config = {
25- 'tuning-level ' : 'safest ' ,
24+ 'cluster-name ' : 'cluster1 ' ,
2625 },
2726 constraints = {
2827 'arch' : 'amd64' ,
@@ -31,25 +30,25 @@ async def test_action(event_loop):
3130 )
3231
3332 # update and check app config
34- await ubuntu_app .set_config ({'tuning-level ' : 'fast ' })
35- config = await ubuntu_app .get_config ()
36- assert config ['tuning-level ' ]['value' ] == 'fast '
33+ await mysql_app .set_config ({'cluster-name ' : 'cluster2 ' })
34+ config = await mysql_app .get_config ()
35+ assert config ['cluster-name ' ]['value' ] == 'cluster2 '
3736
3837 # Restore config back to default
39- await ubuntu_app .reset_config (['tuning-level ' ])
40- config = await ubuntu_app .get_config ()
41- assert config [ 'tuning-level' ][ ' value'] == 'safest'
38+ await mysql_app .reset_config (['cluster-name ' ])
39+ config = await mysql_app .get_config ()
40+ assert ' value' not in config [ 'cluster-name' ]
4241
4342 # update and check app constraints
44- await ubuntu_app .set_constraints ({'mem' : 512 * MB })
45- constraints = await ubuntu_app .get_constraints ()
43+ await mysql_app .set_constraints ({'mem' : 512 * MB })
44+ constraints = await mysql_app .get_constraints ()
4645 assert constraints ['mem' ] == 512 * MB
4746
48- await jasyncio .sleep (5 )
47+ await jasyncio .sleep (10 )
4948
5049 # check action definitions
51- actions = await ubuntu_app .get_actions ()
52- assert 'backup' in actions .keys ()
50+ actions = await mysql_app .get_actions (schema = True )
51+ assert 'create- backup' in actions .keys ()
5352
5453
5554@base .bootstrapped
0 commit comments