Skip to content

Commit cf46134

Browse files
authored
Merge pull request #557 from freyes/fix-func-test
Fix functional testing: This patch series fixes the functional testing and adds some improvements to make it more stable. * Switch away from `cs:` to `ch:` * Set the default series in the bundles to focal, this allows to get a reliable testing outside the CI system where the default series may be different. * Add ntp charm as a subordinate of ubuntu to exercise subordinates related functionality. * Import the LXD images before juju bootstrap, this prevents juju from racing when launching multiple machines of the same series. * Drop Xenial in favor of Focal (see canonical/charm-ubuntu#45 ) * Pin `aiohttp<4.0.0`, because 4.0.0a1 fails to build on Jammy.
2 parents 408aff0 + 9eb432e commit cf46134

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

.github/workflows/tox.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ jobs:
4646
sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket
4747
# until Juju provides stable IPv6-support we unfortunately need this
4848
lxc network set lxdbr0 ipv6.address none
49+
# pull images
50+
lxc image copy --alias juju/bionic/amd64 --copy-aliases ubuntu-daily:bionic local:
51+
lxc image copy --alias juju/focal/amd64 --copy-aliases ubuntu-daily:focal local:
52+
lxc image copy --alias juju/jammy/amd64 --copy-aliases ubuntu-daily:jammy local:
53+
lxc image list
4954
juju bootstrap --no-gui localhost
5055
- name: Functional test
5156
run: |

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
version = "0.0.1.dev1"
2727
install_require = [
28+
'aiohttp<4.0.0', # aiohttp/_http_parser.c:16227:5: error: lvalue required as increment operand
2829
'oslo.config<6.12.0', # pin at stable/train to retain Py3.5 support
2930
'async_generator',
3031

tests/bundles/first.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
series: focal
12
applications:
2-
magpie-xenial:
3-
series: xenial
4-
charm: cs:~openstack-charmers-next/magpie
3+
magpie-focal:
4+
series: focal
5+
charm: ch:magpie
6+
channel: latest/edge
57
num_units: 2
68
magpie-bionic:
79
series: bionic
8-
charm: cs:~openstack-charmers-next/magpie
10+
charm: ch:magpie
11+
channel: latest/edge
912
num_units: 2
1013
ubuntu:
11-
charm: cs:ubuntu
14+
charm: ch:ubuntu
1215
num_units: 3

tests/bundles/second.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
series: focal
12
applications:
23
magpie-focal:
34
series: focal
4-
charm: cs:~openstack-charmers-next/magpie
5+
charm: ch:magpie
6+
channel: latest/edge
57
num_units: 2
68
ubuntu:
7-
charm: cs:ubuntu
9+
charm: ch:ubuntu
810
num_units: 3

tests/bundles/third.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
series: focal
12
applications:
23
ubuntu:
3-
charm: cs:ubuntu
4+
charm: ch:ubuntu
45
num_units: 10
56

tests/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ gate_bundles:
77
- second
88
- third
99
target_deploy_status:
10-
magpie-xenial:
11-
workload-status: active
12-
workload-status-message-prefix: icmp ok, local hostname ok
1310
magpie-bionic:
1411
workload-status: active
1512
workload-status-message-prefix: icmp ok, local hostname ok
@@ -21,6 +18,9 @@ target_deploy_status:
2118
workload-status-message-prefix: icmp ok, local hostname ok
2219
ubuntu:
2320
workload-status-message-regex: "^$"
21+
ntp:
22+
workload-status: active
23+
workload-status-message-prefix: 'chrony: Ready'
2424
configure:
2525
- zaza.charm_tests.noop.setup.basic_setup
2626
tests:

0 commit comments

Comments
 (0)