Closed PietroPasotti closed 2 years ago
This is a feature available through libjuju.
async def test_my_config_changes(ops_test)
app = ops_test.model.applications[APP_NAME]
await app.set_config({"key": "value"})
# test something happening with this key=value
await app.reset_config(["key"])
I'm not sure if this feature is there already (and I haven't found it), but it would be nice to support more natively application config management (set, get).
At the moment the best way I could find to config-set is:
await ops_test.juju("config", APP_NAME, "key=value")
However, this makes unsetting keys impossible:
await ops_test.juju("config", APP_NAME, 'key=""')
--> 'key' is now '""' (quoted quotation marks), notNone
. I solved this by doingos.system(f'juju config {APP_NAME} key=""')
But this is an indication that a unit config wrapper would be very welcome :)