Closed PietroPasotti closed 2 months ago
Scenario should mutate the input state as little as necessary.
It is desirable that, if you passed no config, the output state still has no config.
traefik_state = State(config={}) state_out = traefik_ctx.run('update-status', traefik_state) assert state_out.config == {}
However scenario needs to present some data to the config-get hook and so it populates the config before running the charm. However, it forgets to clean it up by removing any keys that were added by scenario itself in the process.
Scenario should mutate the input state as little as necessary.
It is desirable that, if you passed no config, the output state still has no config.
However scenario needs to present some data to the config-get hook and so it populates the config before running the charm. However, it forgets to clean it up by removing any keys that were added by scenario itself in the process.