From c08a668f473ba7896aad36bae741d665d9da72eb Mon Sep 17 00:00:00 2001 From: jeanluc Date: Mon, 12 Aug 2024 19:34:08 +0200 Subject: [PATCH] Run pre-commit after update --- src/saltext/haproxy/beacons/haproxy.py | 1 + src/saltext/haproxy/modules/haproxyconn.py | 2 ++ tests/unit/beacons/test_haproxy.py | 1 + tests/unit/modules/test_haproxyconn.py | 1 + 4 files changed, 5 insertions(+) diff --git a/src/saltext/haproxy/beacons/haproxy.py b/src/saltext/haproxy/beacons/haproxy.py index e19ec34..a3aa13d 100644 --- a/src/saltext/haproxy/beacons/haproxy.py +++ b/src/saltext/haproxy/beacons/haproxy.py @@ -4,6 +4,7 @@ .. versionadded:: 2016.11.0 """ + import logging import salt.utils.beacons diff --git a/src/saltext/haproxy/modules/haproxyconn.py b/src/saltext/haproxy/modules/haproxyconn.py index 586bdc9..f7a8cf3 100644 --- a/src/saltext/haproxy/modules/haproxyconn.py +++ b/src/saltext/haproxy/modules/haproxyconn.py @@ -3,6 +3,7 @@ .. versionadded:: 2014.7.0 """ + import logging import os import stat @@ -307,6 +308,7 @@ def set_state(name, backend, state, socket=DEFAULT_SOCKET_URL): salt '*' haproxy.set_state my_proxy_server my_backend ready """ + # Pulling this in from the latest 0.5 release which is not yet in PyPi. # https://github.com/neurogeek/haproxyctl class setServerState(haproxy.cmds.Cmd): diff --git a/tests/unit/beacons/test_haproxy.py b/tests/unit/beacons/test_haproxy.py index 97bb307..febe39a 100644 --- a/tests/unit/beacons/test_haproxy.py +++ b/tests/unit/beacons/test_haproxy.py @@ -4,6 +4,7 @@ HAProxy beacon test cases """ + from unittest.mock import MagicMock from unittest.mock import patch diff --git a/tests/unit/modules/test_haproxyconn.py b/tests/unit/modules/test_haproxyconn.py index a032dfb..f2a0241 100644 --- a/tests/unit/modules/test_haproxyconn.py +++ b/tests/unit/modules/test_haproxyconn.py @@ -3,6 +3,7 @@ Test cases for salt.modules.haproxyconn """ + import pytest import salt.modules.haproxyconn as haproxyconn