Closed chanchiwai-ray closed 2 months ago
Strangely, this change is not covered by the unit tests. I thought if we make this change, we also need to change the unit tests.
Strangely, this change is not covered by the unit tests. I thought if we make this change, we also need to change the unit tests.
This is only typing an issue; operator framework just released that corrected the types yesterday
There is not unit test for _on_install_or_upgrade
, it does not matter if it's just type. The self.model.config
should be mocked with returning something not as string, and then we should have a test checking that self.exporter.install
was called with some parameters.
After operator framework fixes the incorrect types in
model.config
[1], it introduces some issues in our existing codebases since we used to assume them to have type ofstr
which is not correct in the first place.[1] https://github.com/canonical/operator/pull/1183