Browse Source

Fix config option setting in unit tests

Since https://github.com/canonical/operator/pull/635
harness.update_config()'s behavior has changed and
validates that the config options being set do exist
on the charm.

Change-Id: I2fee2ecb61bf51e7412de74cf1b030114ec3b8dd
changes/25/819325/1
Aurelien Lourot 6 months ago
parent
commit
eb21629e5f
  1. 23
      unit_tests/test_ops_openstack.py

23
unit_tests/test_ops_openstack.py

@ -124,6 +124,29 @@ class TestOSBaseCharm(CharmTestCase):
description: pause action
resume:
description: resume action
''',
config='''
options:
source:
type: string
default:
description: a PPA
key:
type: string
default:
description: a key
custom-check-fail:
type: bool
default: False
description: a failure to report in the unit status
plugin1-check-fail:
type: bool
default: False
description: another failure to report
plugin2-check-fail:
type: bool
default: False
description: yet another failure to report
''')
def test_init(self):

Loading…
Cancel
Save