missing coverage of charm events

Bug #1888641 reported by John A Meinel
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description


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.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:

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)
Changed in charm-k8s-jenkins-agent:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Tom Haddon (mthaddon) wrote :

We've since updated tests for this charm, and currently have 100% unit test coverage.

Changed in charm-k8s-jenkins-agent:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers