For integration tests like the one for async replication, it would be helpful to have status and logs from multiple models.
Solution
In .github/workflows/integration_test_charm.yaml:
Loop over the existing models (except the controller model) and run the juju status and juju debug-log (or convert-logsink-to-debug-log for LXD clouds) commands for each model, writing the output to one status or log file, respectively, per model.
For the logs, output the model name before showing its logs.
In python/cli/data_platform_workflows_cli/convert_logsink_to_debug_log.py:
Get the first model from the juju show-model command output because a second model has a name different from the test (example: test-other in the PostgreSQL charms async replication integration tests).
Issue
For integration tests like the one for async replication, it would be helpful to have status and logs from multiple models.
Solution
In
.github/workflows/integration_test_charm.yaml
:Loop over the existing models (except the
controller
model) and run thejuju status
andjuju debug-log
(orconvert-logsink-to-debug-log
for LXD clouds) commands for each model, writing the output to one status or log file, respectively, per model.For the logs, output the model name before showing its logs.
In
python/cli/data_platform_workflows_cli/convert_logsink_to_debug_log.py
:juju show-model
command output because a second model has a name different from the test (example:test-other
in the PostgreSQL charms async replication integration tests).Tested on:
Fixes https://github.com/canonical/data-platform-workflows/issues/193.