I like the intuition, simple and clean, but it makes me wonder: is it enough to check that the charm itself deploys without issues and goes to active/idle?
What if some related charm errors out? Should that not be part of the test?
For example if the charm being tested starts putting rubbish in the databags.
I’d argue that for this to qualify as a regression test, all of the ‘outputs’ of the charm being tested should be verified for consistency and validity. Chiefly relation data.
What about:
before the upgrade, get a snapshot of all relation data on the charm’s side
after the upgrade, verify that the relation data is unchanged (or either way, “still valid”)
However, we might also say: this kind of checks should be done elsewhere. The upgraded charm’s CI should be verifying the databag integrity in a separate pipeline.
When we do not provide the apps arg to wait_for_idle then it waits for all apps. Without raise_on_error=False, it will raise on any charm error.
all of the ‘outputs’ of the charm being tested should be verified for consistency and validity
Agreed. And with prometheus it’s slightly easier than with most charms because it can be related to itself. But generally speaking, the test could be rewritten in the context of a bundle + peripherals. When we go all-in for bundle tests then the bundle would be a natural place for this test.