Checklist
- [x] Checked if it requires a pylibjuju change?
- [x] Added integration tests for the PR?
- [x] Added or updated doc.go related to packages changed?
- [x] Do comments answer the question of why design decisions were made?
Description of change
The following changes introduce the idea of a display clouds integration tests. Unfortunately it required to change how we handle machine interactions. For formatting directives such as json or yaml, we never want to be prompted for anything, we just either want an empty output in the right format (json being {}) or the data.
Bringing in the changes is the first drive into doing so, the PR doesn't enforce the changes through out, although it is a first step in doing so.
Adding redirection of the stderr to /dev/null for machine directives is
pointless, so in the future checking for ctx.IsSerial() should be used.
If the value is true then omitting the information and the noise is
probably the wisest.
See: https://discourse.jujucharms.com/t/cli-serialisable-output-formats/2490
QA steps
Please replace with how we can verify that the change works?
sh
cd tests && ./main.sh cli test_display_clouds
该提问来源于开源项目:juju/juju