Skip to content

Commit a086809

Browse files
committed
Fix vault charm and cmr tests
1 parent d18cd65 commit a086809

8 files changed

Lines changed: 40 additions & 5 deletions

File tree

tests/integration/a.file

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
options:
2+
status:
3+
type: string
4+
default: "active"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
status="$(config-get status)"
4+
5+
if [[ "$status" == "error" ]]; then
6+
if [[ -e .errored ]]; then
7+
status="active"
8+
else
9+
touch .errored
10+
exit 1
11+
fi
12+
fi
13+
status-set "$status"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bases:
2+
- architectures:
3+
- amd64
4+
channel: '22.04'
5+
name: ubuntu
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: assumes-charm
2+
summary: "test"
3+
description: "test"
4+
maintainers: ["test"]
5+
assumes:
6+
- juju
7+
- any-of:
8+
- all-of:
9+
- juju >= 2.9
10+
- juju < 3
11+
- all-of:
12+
- juju >= 3.1
13+
- juju < 4

tests/integration/test_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ async def test_secrets_backend_lifecycle(event_loop):
205205
# deploy postgresql
206206
await m.deploy('postgresql', base='ubuntu@22.04')
207207
# deploy vault
208-
await m.deploy("vault", base='ubuntu@20.04')
208+
await m.deploy("vault", channel='1.8/stable', base='ubuntu@22.04')
209209
# relate/integrate
210210
await m.integrate("vault:db", "postgresql:db")
211211
# wait for the postgresql app

tests/integration/test_crossmodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async def test_relate_with_offer(event_loop):
104104
channel='14/stable',
105105
)
106106
assert 'postgresql' in model_1.applications
107-
await model_1.wait_for_idle(status="active")
107+
await model_1.wait_for_idle()
108108
await model_1.create_offer("postgresql:db")
109109

110110
offers = await model_1.list_offers()

tests/integration/test_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ async def test_application_annotations(event_loop):
10861086
async def test_unit_annotations(event_loop):
10871087

10881088
async with base.CleanModel() as model:
1089-
app = await model.deploy('ubuntu', channel="stable")
1089+
app = await model.deploy('ubuntu')
10901090
await model.wait_for_idle()
10911091
unit = app.units[0]
10921092

@@ -1096,8 +1096,8 @@ async def test_unit_annotations(event_loop):
10961096
expected = {"foo": "bar", "another": "value"}
10971097
await unit.set_annotations(expected)
10981098

1099-
annotations = await unit.get_annotations()
1100-
assert annotations == expected
1099+
annotations_2 = await unit.get_annotations()
1100+
assert annotations_2 == expected
11011101

11021102

11031103
@base.bootstrapped

0 commit comments

Comments
 (0)