mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
9cd47b39dd
The logic which ensures that we expose ports which are being bound, even when not explicitly configured, was done incorrectly. UDP ports were being passed to the API as '1234/udp' instead of (1234, 'udp'). This results in the port not being exposed properly. The logic has been corrected. Additionally both the "ports" input translation function, as well as the post-processing code (where the port numbers configured in port_bindings were being added) both contained code to "fix" any ports which were configured using 'portnum/tcp', as these must be passed to the API simply as integers. To reduce code duplication, this normalization is now only performed at the very end of the post-processing function, after ports have been translated, and any missing ports from the port_bindings have been added. The unit test for the port_bindings input translation code, which was written based upon the same incorrect reading of the API docs that resulted in the incorrect behavior, have been updated to confirm the (now) correct behavior. The unit test for the ports input translation code has been updated to reflect the new normalization behavior. Finally, an integration test has been added to ensure that we properly expose UDP ports which are added as part of the post-processing function. |
||
---|---|---|
.. | ||
__init__.py | ||
test_alternatives.py | ||
test_archive.py | ||
test_boto_sns.py | ||
test_bower.py | ||
test_cmd.py | ||
test_compiler.py | ||
test_docker_container.py | ||
test_file.py | ||
test_git.py | ||
test_handle_error.py | ||
test_handle_iorder.py | ||
test_host.py | ||
test_keystone.py | ||
test_match.py | ||
test_mysql.py | ||
test_network.py | ||
test_npm.py | ||
test_pip.py | ||
test_pkg.py | ||
test_pkgrepo.py | ||
test_rabbitmq_user.py | ||
test_rabbitmq_vhost.py | ||
test_renderers.py | ||
test_service.py | ||
test_ssh.py | ||
test_supervisord.py | ||
test_svn.py | ||
test_user.py | ||
test_virtualenv.py |