From 2d6982d1872281cd0f92dfe48074cd831c929d6c Mon Sep 17 00:00:00 2001 From: Mark Grimes Date: Thu, 19 Dec 2024 11:31:05 -0800 Subject: [PATCH] Clean up FTP config to allow successfully test run. --- tests/api2/test_port_delegates.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/api2/test_port_delegates.py b/tests/api2/test_port_delegates.py index a107c8814527e..96fa2e362eb8f 100644 --- a/tests/api2/test_port_delegates.py +++ b/tests/api2/test_port_delegates.py @@ -11,6 +11,11 @@ from middlewared.test.integration.utils import call +def remove_FTP_anonymous(): + """ remove spurrious onlyanonymous as it requires a path """ + call('ftp.update', {"onlyanonymous": False}) + + PAYLOAD = ( ('ftp.config', 'ftp.update', ['port'], {}), ) @@ -36,6 +41,9 @@ def test_port_delegate_validation_with_invalid_ports(config_method, method, keys @pytest.mark.parametrize('config_method,method,keys,payload', PAYLOAD) def test_port_delegate_validation_with_valid_ports(config_method, method, keys, payload): + # Clean up previous config settings + remove_FTP_anonymous() + in_use_ports = [] for entry in call('port.get_in_use'): in_use_ports.extend(entry['ports'])