projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
User parameters provided at instantiation time for Day-1 configuration mapping initia...
[osm/N2VC.git]
/
modules
/
libjuju
/
tests
/
integration
/
test_application.py
diff --git
a/modules/libjuju/tests/integration/test_application.py
b/modules/libjuju/tests/integration/test_application.py
index
7b780da
..
b705832
100644
(file)
--- a/
modules/libjuju/tests/integration/test_application.py
+++ b/
modules/libjuju/tests/integration/test_application.py
@@
-1,4
+1,5
@@
import asyncio
import asyncio
+
import pytest
from .. import base
import pytest
from .. import base
@@
-11,9
+12,9
@@
MB = 1
async def test_action(event_loop):
async with base.CleanModel() as model:
ubuntu_app = await model.deploy(
async def test_action(event_loop):
async with base.CleanModel() as model:
ubuntu_app = await model.deploy(
- '
mysql
',
+ '
percona-cluster
',
application_name='mysql',
application_name='mysql',
- series='
trusty
',
+ series='
xenial
',
channel='stable',
config={
'tuning-level': 'safest',
channel='stable',
config={
'tuning-level': 'safest',
@@
-28,11
+29,20
@@
async def test_action(event_loop):
config = await ubuntu_app.get_config()
assert config['tuning-level']['value'] == 'fast'
config = await ubuntu_app.get_config()
assert config['tuning-level']['value'] == 'fast'
+ # Restore config back to default
+ await ubuntu_app.reset_config(['tuning-level'])
+ config = await ubuntu_app.get_config()
+ assert config['tuning-level']['value'] == 'safest'
+
# update and check app constraints
await ubuntu_app.set_constraints({'mem': 512 * MB})
constraints = await ubuntu_app.get_constraints()
assert constraints['mem'] == 512 * MB
# update and check app constraints
await ubuntu_app.set_constraints({'mem': 512 * MB})
constraints = await ubuntu_app.get_constraints()
assert constraints['mem'] == 512 * MB
+ # check action definitions
+ actions = await ubuntu_app.get_actions()
+ assert 'backup' in actions.keys()
+
@base.bootstrapped
@pytest.mark.asyncio
@base.bootstrapped
@pytest.mark.asyncio