Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-133186 / 25.04 / Fix port delegate test #15245

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 """
mgrimesix marked this conversation as resolved.
Show resolved Hide resolved
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
Loading