missing coverage of charm events

Bug #1888641 reported by John A Meinel on 2020-07-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-k8s-jenkins-agent
Medium
Unassigned

Bug Description

https://git.launchpad.net/charm-k8s-jenkins-agent/tree/tests/unit/test_charm.py

has no test coverage for what happens if a user changes config.

You could do that testing with the operator framework's testing harness along the lines of:

from ops import testing

harness = testing.Harness(JenkinsAgentCharm)
harness.begin()
harness.update_config({'config_key': 'new_value'})

and then introspect attributes of 'harness.charm' to see if config changed was properly handled.

Note there is an open Operator issue for cleaner testing support of pod-spec-set:
https://github.com/canonical/operator/issues/261

If there is something that you would like to see that would make testing of charm behavior clear and clean for you, please leave comments on that issue.

Tom Haddon (mthaddon) on 2020-07-29
Changed in charm-k8s-jenkins-agent:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers