Skip to content

Commit c78d19e

Browse files
committed
Remove charmstore from integration tests
1 parent b717d64 commit c78d19e

7 files changed

Lines changed: 14 additions & 77 deletions

File tree

tests/bundle/invalid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
applications:
22
myapp:
3-
charm: cs:xenial/ubuntu-0
3+
charm: ch:xenial/ubuntu
44
num_units: 1
55
to:
66
- 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
series: xenial
22
applications:
33
ghost:
4-
charm: "cs:ghost-19"
4+
charm: "ch:ghost"
55
num_units: 1
66
resources:
77
ghost-stable: 11

tests/integration/test_application.py

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def test_status_is_not_unset(event_loop):
9797
@pytest.mark.skip('Update charm')
9898
async 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
144133
async 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')
200189
async 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')
213202
async 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
296251
async def test_trusted(event_loop):

tests/integration/test_expose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
async def test_expose_unexpose(event_loop):
1212
async with base.CleanModel() as model:
1313
app = await model.deploy(
14-
"cs:~jameinel/ubuntu-lite-7",
14+
"ubuntu",
1515
)
1616

1717
if not app.supports_granular_expose_parameters():

tests/integration/test_machine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
async def test_status(event_loop):
1313
async with base.CleanModel() as model:
1414
await model.deploy(
15-
'cs:ubuntu-0',
15+
'ubuntu',
1616
application_name='ubuntu',
1717
series='trusty',
1818
channel='stable',

tests/integration/test_model.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -305,23 +305,6 @@ async def test_deploy_trusted_bundle(event_loop):
305305
assert trusted is True
306306

307307

308-
@base.bootstrapped
309-
@pytest.mark.asyncio
310-
async def test_deploy_channels_revs(event_loop):
311-
pytest.skip('Revise to use local charms - shouldnt fail b/c of origin')
312-
async with base.CleanModel() as model:
313-
charm = 'cs:~johnsca/libjuju-test'
314-
stable = await model.deploy(charm, 'a1')
315-
edge = await model.deploy(charm, 'a2', channel='edge')
316-
rev = await model.deploy(charm + '-2', 'a3')
317-
318-
assert [a.charm_url for a in (stable, edge, rev)] == [
319-
'cs:~johnsca/libjuju-test-1',
320-
'cs:~johnsca/libjuju-test-2',
321-
'cs:~johnsca/libjuju-test-2',
322-
]
323-
324-
325308
@base.bootstrapped
326309
@pytest.mark.asyncio
327310
async def test_deploy_from_ch_with_series(event_loop):

tests/unit/test_bundle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ async def test_run(self, event_loop):
412412
"series": "series",
413413
"channel": "channel"})
414414

415-
416415
charms_facade = mock.Mock()
417416
charms_facade.AddCharm = base.AsyncMock(return_value=None)
418417

0 commit comments

Comments
 (0)