mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 11:41:32 -07:00
docker modules: various adjustments (#51700)
* Move docker_ module_utils into subpackage. * Remove docker_ prefix from module_utils.docker modules. * Adding jurisdiction for module_utils/docker to $team_docker. * Making docker* unit tests community supported. * Linting. * Python < 2.6 is not supported. * Refactoring docker-py version comments. Moving them to doc fragments. Cleaning up some indentations.
This commit is contained in:
parent
88df4e22d3
commit
0c2bb3da04
25 changed files with 178 additions and 274 deletions
|
@ -5,7 +5,7 @@ import json
|
|||
import pytest
|
||||
|
||||
from ansible.modules.cloud.docker import docker_volume
|
||||
from ansible.module_utils import docker_common
|
||||
from ansible.module_utils.docker import common
|
||||
|
||||
pytestmark = pytest.mark.usefixtures('patch_ansible_module')
|
||||
|
||||
|
@ -19,8 +19,8 @@ TESTCASE_DOCKER_VOLUME = [
|
|||
|
||||
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_DOCKER_VOLUME, indirect=['patch_ansible_module'])
|
||||
def test_create_volume_on_invalid_docker_version(mocker, capfd):
|
||||
mocker.patch.object(docker_common, 'HAS_DOCKER_PY', True)
|
||||
mocker.patch.object(docker_common, 'docker_version', '1.8.0')
|
||||
mocker.patch.object(common, 'HAS_DOCKER_PY', True)
|
||||
mocker.patch.object(common, 'docker_version', '1.8.0')
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
docker_volume.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue