mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
committed by
John R Barker
parent
88df4e22d3
commit
0c2bb3da04
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from ansible.module_utils.docker_common import (
|
||||
from ansible.module_utils.docker.common import (
|
||||
compare_dict_allow_more_present,
|
||||
compare_generic,
|
||||
)
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user