Commit 6d81ce6
authored
Merge pull request #753 from cderici/fix-unit-action-run-status
#753
#### Description
This fixes the way we set the status of an action that's ran on a unit. Previously only the `action.output` was being returned and the actual status of the action was being retrieved from the `self.data[]` (as the Action object is a modelEntity), which is not reliable at the moment. This PR changes it to get it directly from the Action object returned by the Juju API when the action completes (with either `completed` or `failed`) status. So it should be completely accurate all the time.
Fixes #719
#### QA Steps
Following should pass %100.
```
tox -e integration -- tests/integration/test_unit.py::test_run
```1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
0 commit comments