Skip to content

Commit e4ea8ab

Browse files
authored
Merge pull request #932 from cderici/change-charm-in-test-action
#932 #### Description This fixes an issue (we see [in the nightly build](https://github.com/cderici/python-libjuju/actions/runs/5779670269/job/15662283086#step:8:334)) with the `test_action` integration test that's seemingly caused by the percona-cluster cham (no code about the `get_actions` has changed in the pylibjuju side). In this PR we just change that to the `mysql` charm to have this test pass again. #### QA Steps ``` tox -e integration -- tests/integration/test_application.py::test_action ```
2 parents 7708429 + 3ee4cd9 commit e4ea8ab

1 file changed

Lines changed: 4 additions & 34 deletions

File tree

tests/integration/test_application.py

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,10 @@
1616
@pytest.mark.asyncio
1717
async def test_action(event_loop):
1818
async with base.CleanModel() as model:
19-
ubuntu_app = await model.deploy(
20-
'percona-cluster',
21-
application_name='mysql',
22-
series='xenial',
23-
channel='stable',
24-
config={
25-
'tuning-level': 'safest',
26-
},
27-
constraints={
28-
'arch': 'amd64',
29-
'mem': 256 * MB,
30-
},
31-
)
32-
33-
# 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'
37-
38-
# 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'
42-
43-
# update and check app constraints
44-
await ubuntu_app.set_constraints({'mem': 512 * MB})
45-
constraints = await ubuntu_app.get_constraints()
46-
assert constraints['mem'] == 512 * MB
47-
48-
await jasyncio.sleep(5)
49-
50-
# check action definitions
51-
actions = await ubuntu_app.get_actions()
52-
assert 'backup' in actions.keys()
19+
app = await model.deploy('juju-qa-test')
20+
await jasyncio.sleep(10)
21+
actions = await app.get_actions(schema=True)
22+
assert 'fortune' in actions.keys(), 'mis"fortune" in charm actions'
5323

5424

5525
@base.bootstrapped

0 commit comments

Comments
 (0)