@@ -97,7 +97,7 @@ async def test_status_is_not_unset(event_loop):
9797@pytest .mark .skip ('Update charm' )
9898async def test_status (event_loop ):
9999 async with base .CleanModel () as model :
100- app = await model .deploy ('cs:~ juju-qa/blocked-0 ' )
100+ app = await model .deploy ('ch: juju-qa-test ' )
101101
102102 def app_ready ():
103103 if not app .units :
@@ -116,7 +116,7 @@ async def test_add_units(event_loop):
116116
117117 async with base .CleanModel () as model :
118118 app = await model .deploy (
119- 'cs: ubuntu-0 ' ,
119+ 'ubuntu' ,
120120 application_name = 'ubuntu' ,
121121 series = 'trusty' ,
122122 channel = 'stable' ,
@@ -128,17 +128,6 @@ async def test_add_units(event_loop):
128128 assert isinstance (unit , Unit )
129129
130130
131- @base .bootstrapped
132- @pytest .mark .asyncio
133- @pytest .mark .skip ('Update charm' )
134- async def test_deploy_charmstore_charm (event_loop ):
135- async with base .CleanModel () as model :
136- app = await model .deploy ('cs:ubuntu-0' )
137- await model .block_until (lambda : (len (app .units ) > 0 and
138- app .units [0 ].machine ))
139- assert app .data ['charm-url' ] == 'cs:ubuntu-0'
140-
141-
142131@base .bootstrapped
143132@pytest .mark .asyncio
144133async def test_deploy_charmhub_charm (event_loop ):
@@ -199,27 +188,27 @@ async def test_upgrade_charm_switch_channel(event_loop):
199188@pytest .mark .skip ('Update charm' )
200189async def test_upgrade_charm_revision (event_loop ):
201190 async with base .CleanModel () as model :
202- app = await model .deploy ('cs: ubuntu-0 ' )
191+ app = await model .deploy ('ubuntu' )
203192 await model .block_until (lambda : (len (app .units ) > 0 and
204193 app .units [0 ].machine ))
205- assert app .data ['charm-url' ] == 'cs: ubuntu-0 '
194+ assert app .data ['charm-url' ] == 'ubuntu'
206195 await app .upgrade_charm (revision = 8 )
207- assert app .data ['charm-url' ] == 'cs: ubuntu-8 '
196+ assert app .data ['charm-url' ] == 'ubuntu'
208197
209198
210199@base .bootstrapped
211200@pytest .mark .asyncio
212201@pytest .mark .skip ('Update charm' )
213202async def test_upgrade_charm_switch (event_loop ):
214203 async with base .CleanModel () as model :
215- app = await model .deploy ('cs: ubuntu-0 ' )
204+ app = await model .deploy ('ubuntu' )
216205 await model .block_until (lambda : (len (app .units ) > 0 and
217206 app .units [0 ].machine ))
218- assert app .data ['charm-url' ] == 'cs: ubuntu-0 '
207+ assert app .data ['charm-url' ] == 'ubuntu'
219208 with pytest .raises (errors .JujuError ):
220- await app .upgrade_charm (switch = 'ubuntu-8 ' )
221- await app .upgrade_charm (switch = 'cs: ubuntu-8 ' )
222- assert app .data ['charm-url' ] == 'cs: ubuntu-8 '
209+ await app .upgrade_charm (switch = 'ubuntu' )
210+ await app .upgrade_charm (switch = 'ubuntu' )
211+ assert app .data ['charm-url' ] == 'ubuntu'
223212
224213
225214@base .bootstrapped
@@ -257,40 +246,6 @@ async def test_upgrade_local_charm_resource(event_loop):
257246 assert ress ['file-res' ]
258247
259248
260- @base .bootstrapped
261- @pytest .mark .asyncio
262- @pytest .mark .skip ('Update charm' )
263- async def test_upgrade_switch_charmstore_to_charmhub (event_loop ):
264- async with base .CleanModel () as model :
265- app = await model .deploy ('cs:ubuntu' , series = 'focal' )
266- await model .wait_for_idle (status = "active" )
267- assert app .data ['charm-url' ].startswith ('cs:ubuntu' )
268- await app .upgrade_charm (channel = 'latest/stable' , switch = 'ch:ubuntu-8' )
269- await model .wait_for_idle (status = "active" )
270- assert app .data ['charm-url' ].startswith ('ch:' )
271-
272-
273- @base .bootstrapped
274- @pytest .mark .asyncio
275- @pytest .mark .skip ('Update charm' )
276- async def test_upgrade_charm_resource (event_loop ):
277- async with base .CleanModel () as model :
278- app = await model .deploy ('cs:~juju-qa/bionic/upgrade-charm-resource-test-0' )
279-
280- await model .wait_for_idle (wait_for_units = 1 )
281- unit = app .units [0 ]
282- expected_message = 'I have no resource.'
283- assert unit .workload_status_message == expected_message
284-
285- await app .upgrade_charm (revision = 1 )
286- await model .block_until (
287- lambda : unit .workload_status_message != 'I have no resource.' ,
288- timeout = 60 ,
289- )
290- expected_message = 'My resource: I am the resource.'
291- assert app .units [0 ].workload_status_message == expected_message
292-
293-
294249@base .bootstrapped
295250@pytest .mark .asyncio
296251async def test_trusted (event_loop ):
0 commit comments