canonical / charm-sysconfig

A subordinate charm to apply system settings like grub configurations or systemd configurations.
Apache License 2.0
0 stars 5 forks source link

functional tests fail on physical or virtual hosts #16

Closed dashmage closed 8 months ago

dashmage commented 8 months ago

When running functional tests within this charm, it will fail in the following 2 scenarios if the tests are run in kvm or physical host

We need to add a function or test to see if it's a container, then app.status == 'blocked' can be asserted, otherwise app.status should be active

This is in src/tests/functional/test_deploy.py


Imported from Launchpad using lp2gh.

dashmage commented 8 months ago

(by addyess) Arif: Are you saying that if the unit sysconfig unit is launched and running on metal or kvm then the result is the charm is active?

Are you running the functional tests in a juju environment that can start up VMs, or even MAAS hosts?

dashmage commented 8 months ago

(by addyess) From a side discussion, i understand the author's original environment is running the juju units as KVM hosts, which presents a problem with the tests assuming that this charm is run in a container.

This is probably an easy fix, but finding the right environment to test could be tricky.

dashmage commented 8 months ago

(by xavpaice) Using Serverstack (OpenStack KVM instances) the units come up with status active and message requiring reboot. This doesn't match 'blocked', so the tests time out.

We need to get this fixed in order to run any tests outside LXD, which is going to be essential soon since our tests will need to run in KVM to support modern Ceph.