salt/tests/integration/states
Erik Johnson 9cd47b39dd
Fix incorrect translation of docker port_bindings -> ports
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.
2018-02-08 23:23:43 -06:00
..
__init__.py Include the python encoding file header on tests. 2013-11-27 11:19:24 +00:00
test_alternatives.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_archive.py Add regression test for issue 45893 2018-02-07 14:32:59 -06:00
test_boto_sns.py Don't attempt connections at the module level! 2017-04-28 13:33:32 +01:00
test_bower.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_cmd.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_compiler.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_docker_container.py Fix incorrect translation of docker port_bindings -> ports 2018-02-08 23:23:43 -06:00
test_file.py Merge branch '2016.11' into '2017.7' 2017-12-07 17:33:03 -05:00
test_git.py Lint fix 2018-01-17 12:42:38 -05:00
test_handle_error.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_handle_iorder.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_host.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_keystone.py Merge branch '2016.11' into 'nitrogen' 2017-05-30 10:16:14 -06:00
test_match.py Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
test_mysql.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_network.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_npm.py Merge branch '2016.11' into '2017.7' 2017-08-25 16:07:27 -04:00
test_pip.py Merge branch '2016.11' into '2017.7' 2017-12-20 10:26:10 -05:00
test_pkg.py Add integration test for #42774 2017-08-08 14:20:42 -05:00
test_pkgrepo.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_rabbitmq_user.py Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
test_rabbitmq_vhost.py Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
test_renderers.py Merge branch '2016.11' into '2017.7' 2017-07-20 09:54:08 -06:00
test_service.py Merge pull request #45634 from Ch3LL/mac-service 2018-01-23 16:51:56 -05:00
test_ssh.py Update fingerprint hash type default from md5 to sha256 2017-05-11 09:33:45 -06:00
test_supervisord.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_svn.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_user.py Fix integration tests for 'user.present' state. 2018-01-12 12:47:29 +00:00
test_virtualenv.py create home directory for issue-1959 2017-06-06 13:32:57 -06:00