Skip to content

Commit

Permalink
Clean up FTP config to allow successfully test run.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrimesix committed Dec 19, 2024
1 parent 46b6f62 commit 2d6982d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/api2/test_port_delegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'], {}),
)
Expand All @@ -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'])
Expand Down

0 comments on commit 2d6982d

Please sign in to comment.