Update .gitignore + black run
This commit is contained in:
parent
dd8130a459
commit
6fbe96cc63
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
|||
check_patroni/__pycache__/
|
||||
*/__pycache__/
|
||||
check_patroni.egg-info
|
||||
test/*.state_file
|
||||
.*.swp
|
||||
|
|
|
@ -170,4 +170,9 @@ class ClusterIsInMaintenance(PatroniResource):
|
|||
item_dict = json.loads(r.data)
|
||||
|
||||
# The actual check
|
||||
return [nagiosplugin.Metric("is_in_maintenance", 1 if "pause" in item_dict and item_dict["pause"] else 0)]
|
||||
return [
|
||||
nagiosplugin.Metric(
|
||||
"is_in_maintenance",
|
||||
1 if "pause" in item_dict and item_dict["pause"] else 0,
|
||||
)
|
||||
]
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -25,6 +25,7 @@ def test_cluster_is_in_maintenance_ko(mocker: MockerFixture) -> None:
|
|||
)
|
||||
assert result.exit_code == 2
|
||||
|
||||
|
||||
def test_cluster_is_in_maintenance_ok_pause_false(mocker: MockerFixture) -> None:
|
||||
runner = CliRunner()
|
||||
|
||||
|
|
Loading…
Reference in a new issue