Skip to content

Commit 6405779

Browse files
authored
Merge pull request #1679 from rackerlabs/fix-workflow-logging
fix: workflow logging
2 parents b232b67 + 72d5e55 commit 6405779

28 files changed

Lines changed: 153 additions & 260 deletions

python/understack-workflows/tests/test_netapp_configure_net.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,10 +1744,8 @@ class TestMainFunctionWithNetAppManager:
17441744
@patch("understack_workflows.main.netapp_configure_net.NetAppManager")
17451745
@patch("understack_workflows.main.netapp_configure_net.Nautobot")
17461746
@patch("understack_workflows.main.netapp_configure_net.credential")
1747-
@patch("understack_workflows.main.netapp_configure_net.setup_logger")
17481747
def test_main_function_initializes_netapp_manager_with_default_path(
17491748
self,
1750-
mock_setup_logger,
17511749
mock_credential,
17521750
mock_nautobot_class,
17531751
mock_netapp_manager_class,
@@ -1759,10 +1757,6 @@ def test_main_function_initializes_netapp_manager_with_default_path(
17591757
"""
17601758
from understack_workflows.main.netapp_configure_net import main
17611759

1762-
# Mock logger
1763-
mock_logger = Mock()
1764-
mock_setup_logger.return_value = mock_logger
1765-
17661760
# Mock credential function
17671761
mock_credential.return_value = "test-token"
17681762

@@ -1809,21 +1803,15 @@ def test_main_function_initializes_netapp_manager_with_default_path(
18091803
@patch("understack_workflows.main.netapp_configure_net.NetAppManager")
18101804
@patch("understack_workflows.main.netapp_configure_net.Nautobot")
18111805
@patch("understack_workflows.main.netapp_configure_net.credential")
1812-
@patch("understack_workflows.main.netapp_configure_net.setup_logger")
18131806
def test_main_function_initializes_netapp_manager_with_custom_path(
18141807
self,
1815-
mock_setup_logger,
18161808
mock_credential,
18171809
mock_nautobot_class,
18181810
mock_netapp_manager_class,
18191811
):
18201812
"""Test that main function initializes NetAppManager with custom config path."""
18211813
from understack_workflows.main.netapp_configure_net import main
18221814

1823-
# Mock logger
1824-
mock_logger = Mock()
1825-
mock_setup_logger.return_value = mock_logger
1826-
18271815
# Mock credential function
18281816
mock_credential.return_value = "test-token"
18291817

@@ -1871,21 +1859,15 @@ def test_main_function_initializes_netapp_manager_with_custom_path(
18711859
@patch("understack_workflows.main.netapp_configure_net.NetAppManager")
18721860
@patch("understack_workflows.main.netapp_configure_net.Nautobot")
18731861
@patch("understack_workflows.main.netapp_configure_net.credential")
1874-
@patch("understack_workflows.main.netapp_configure_net.setup_logger")
18751862
def test_main_function_handles_netapp_manager_initialization_error(
18761863
self,
1877-
mock_setup_logger,
18781864
mock_credential,
18791865
mock_nautobot_class,
18801866
mock_netapp_manager_class,
18811867
):
18821868
"""Test that main function handles NetAppManager initialization errors."""
18831869
from understack_workflows.main.netapp_configure_net import main
18841870

1885-
# Mock logger
1886-
mock_logger = Mock()
1887-
mock_setup_logger.return_value = mock_logger
1888-
18891871
# Mock credential function
18901872
mock_credential.return_value = "test-token"
18911873

@@ -1923,10 +1905,8 @@ def test_main_function_handles_netapp_manager_initialization_error(
19231905
@patch("understack_workflows.main.netapp_configure_net.NetAppManager")
19241906
@patch("understack_workflows.main.netapp_configure_net.Nautobot")
19251907
@patch("understack_workflows.main.netapp_configure_net.credential")
1926-
@patch("understack_workflows.main.netapp_configure_net.setup_logger")
19271908
def test_main_function_calls_netapp_create_interfaces_and_routes(
19281909
self,
1929-
mock_setup_logger,
19301910
mock_credential,
19311911
mock_nautobot_class,
19321912
mock_netapp_manager_class,
@@ -1935,10 +1915,6 @@ def test_main_function_calls_netapp_create_interfaces_and_routes(
19351915
"""Test that main function calls netapp_create_interfaces through do_action."""
19361916
from understack_workflows.main.netapp_configure_net import main
19371917

1938-
# Mock logger
1939-
mock_logger = Mock()
1940-
mock_setup_logger.return_value = mock_logger
1941-
19421918
# Mock credential function
19431919
mock_credential.return_value = "test-token"
19441920

0 commit comments

Comments
 (0)