Skip to content

Commit 3ee4cd9

Browse files
committed
Simplify and use juju-qa-test in test_action
1 parent d21399d commit 3ee4cd9

1 file changed

Lines changed: 3 additions & 32 deletions

File tree

tests/integration/test_application.py

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,10 @@
1616
@pytest.mark.asyncio
1717
async 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

0 commit comments

Comments
 (0)