mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
Move modules and module_utils unit tests to correct place (#81)
* Move modules and module_utils unit tests to correct place. * Update ignore.txt * Fix imports. * Fix typos. * Fix more typos.
This commit is contained in:
parent
ab3c2120fb
commit
be191cce6c
1170 changed files with 732 additions and 751 deletions
|
@ -0,0 +1,22 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import unittest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.cloud.docker.docker_container import TaskParameters
|
||||
|
||||
|
||||
class TestTaskParameters(unittest.TestCase):
|
||||
"""Unit tests for TaskParameters."""
|
||||
|
||||
def test_parse_exposed_ports_tcp_udp(self):
|
||||
"""
|
||||
Ensure _parse_exposed_ports does not cancel ports with the same
|
||||
number but different protocol.
|
||||
"""
|
||||
task_params = TaskParameters.__new__(TaskParameters)
|
||||
task_params.exposed_ports = None
|
||||
result = task_params._parse_exposed_ports([80, '443', '443/udp'])
|
||||
self.assertTrue((80, 'tcp') in result)
|
||||
self.assertTrue((443, 'tcp') in result)
|
||||
self.assertTrue((443, 'udp') in result)
|
Loading…
Add table
Add a link
Reference in a new issue