Update .gitignore + black run

This commit is contained in:
benoit 2021-08-12 13:02:49 +02:00
parent dd8130a459
commit 6fbe96cc63
15 changed files with 10 additions and 2 deletions

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
check_patroni/__pycache__/
*/__pycache__/
check_patroni.egg-info
test/*.state_file
.*.swp

View file

@ -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,
)
]

View file

@ -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()