File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,26 @@ async def test_deploy_by_revision(event_loop):
104104 assert url .URL .parse (app .charm_url ).revision == 22
105105
106106
107+ @base .bootstrapped
108+ @pytest .mark .asyncio
109+ async def test_deploy_by_revision_validate_flags (event_loop ):
110+ # Make sure we fail gracefully when invalid --revision/--channel
111+ # flags are used
112+
113+ async with base .CleanModel () as model :
114+ # For charms --revision requires --channel
115+ with pytest .raises (JujuError ):
116+ await model .deploy ('juju-qa-test' ,
117+ # channel='2.0/stable',
118+ revision = 22 )
119+
120+ # For bundles, --revision and --channel are mutually exclusive
121+ with pytest .raises (JujuError ):
122+ await model .deploy ('ch:canonical-livepatch-onprem' ,
123+ channel = 'latest/stable' ,
124+ revision = 4 )
125+
126+
107127@base .bootstrapped
108128@pytest .mark .asyncio
109129async def test_deploy_local_bundle_include_file (event_loop ):
You can’t perform that action at this time.
0 commit comments