Open sed-i opened 3 months ago
This line can be improved:
juju wait-for juju wait-for model $MODEL \
--query='forEach(units, unit => unit.agent-status == "idle") && forEach(applications, app => app.status != "error")' --timeout=10m
Like this:
juju wait-for model $MODEL \
--query='forEach(units, unit => unit.agent-status == "idle") && forEach(applications, app => app.status != "error")' --timeout=10m
Also in these two lines... is MATCH
a spread thing? 🤔 ... if not, I would write them this way:
juju exec --unit k6/0 -- curl localhost:8080/metrics \
| grep '^some_metric_we_know_should_be_there'
curl $(juju status --format=json | jq -r '.applications.k6.address'):8080/metrics \
| grep '^some_metric_we_know_should_be_there'
If prepare-each
creates the model, then why do we create the model again in:
task1 prepare # juju add-model y (create model and set its name in an envvar)
This new charm is a good opportunity to write integration tests with bash, in spread.
A very simple spread task could look like this:
The
task.yaml
above assumes we have a fresh juju model ready to go. This can be accomplished economically using some spread hierarchy, for example:References