Skip to content

Commit

Permalink
chore: test wider array of things, fail on purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaqq committed Oct 18, 2024
1 parent b36e846 commit 1796997
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ jobs:
# - "3.9"
- "3.10"
juju:
#- "3.1/stable"
#- "3.3/stable"
#- "3.4/stable"
- "3.1/stable"
- "3.3/stable"
- "3.4/stable"
- "3.5/stable"
# A bunch of tests fail with juju.errors.JujuError: base: [email protected]/stable
# * test_subordinate_units
Expand Down
22 changes: 22 additions & 0 deletions tests/integration/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,32 @@ async def test_add_units():
assert isinstance(unit, Unit)


@pytest.mark.parametrize("thebase", [
None,
"[email protected]",
"[email protected]/stable",
"[email protected]",
"[email protected]/stable",
"[email protected]",
"[email protected]/stable",
"[email protected]",
"[email protected]/stable",
])
@base.bootstrapped
async def test_deploy_charmhub_charm_ex(thebase: str):
async with base.CleanModel() as model:
app = await model.deploy('ubuntu', base=thebase)
assert False, "fail on purpose to get the logs"
await model.block_until(lambda: (len(app.units) > 0 and
app.units[0].machine))
assert 'ubuntu' in app.data['charm-url']


@base.bootstrapped
async def test_deploy_charmhub_charm():
async with base.CleanModel() as model:
app = await model.deploy('ubuntu')
assert False, "fail on purpose to get the logs"
await model.block_until(lambda: (len(app.units) > 0 and
app.units[0].machine))
assert 'ubuntu' in app.data['charm-url']
Expand Down

0 comments on commit 1796997

Please sign in to comment.