From bd7ce0696ee8973e3715adfd0f3db075b67a74a1 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 6 Dec 2016 11:29:16 -0500 Subject: [PATCH] Fix tests after repo merge. --- test/compile/python2.4-skip.txt | 33 +++++++++---------- test/sanity/code-smell/boilerplate.sh | 6 ++-- test/sanity/code-smell/no-basestring.sh | 3 +- test/sanity/code-smell/use-compat-six.sh | 2 +- test/sanity/validate-modules/skip.txt | 10 ++---- .../modules/core/cloud/docker/test_docker.py | 2 +- .../core/cloud/openstack/test_os_server.py | 2 +- .../modules/core/packaging/os/test_apt.py | 2 +- .../cloud/amazon/test_ec2_vpc_nat_gateway.py | 2 +- .../cloud/amazon/test_kinesis_stream.py | 2 +- 10 files changed, 28 insertions(+), 36 deletions(-) diff --git a/test/compile/python2.4-skip.txt b/test/compile/python2.4-skip.txt index 156f8d3a2c..dc7fb631ff 100644 --- a/test/compile/python2.4-skip.txt +++ b/test/compile/python2.4-skip.txt @@ -10,23 +10,22 @@ /lib/ansible/galaxy/ /lib/ansible/__init__.py /lib/ansible/inventory/ -/lib/ansible/modules/core/cloud/[^/]+/(?!(ec2_facts.py|_ec2_ami_search.py)) -/lib/ansible/modules/extras/cloud/ -/lib/ansible/modules/extras/clustering/consul.*.py -/lib/ansible/modules/extras/clustering/znode.py -/lib/ansible/modules/extras/database/influxdb/ -/lib/ansible/modules/extras/database/mssql/ -/lib/ansible/modules/extras/infrastructure/foreman/ -/lib/ansible/modules/extras/monitoring/zabbix.*.py -/lib/ansible/modules/extras/network/f5/ -/lib/ansible/modules/extras/network/nmcli.py -/lib/ansible/modules/extras/notification/pushbullet.py -/lib/ansible/modules/extras/packaging/language/maven_artifact.py -/lib/ansible/modules/extras/packaging/os/dnf.py -/lib/ansible/modules/extras/packaging/os/layman.py -/lib/ansible/modules/extras/remote_management/ipmi/ -/lib/ansible/modules/extras/univention/ -/lib/ansible/modules/extras/web_infrastructure/letsencrypt.py +/lib/ansible/modules/cloud/[^/]+/(?!(ec2_facts.py|_ec2_ami_search.py)) +/lib/ansible/modules/clustering/consul.*.py +/lib/ansible/modules/clustering/znode.py +/lib/ansible/modules/database/influxdb/ +/lib/ansible/modules/database/mssql/ +/lib/ansible/modules/infrastructure/foreman/ +/lib/ansible/modules/monitoring/zabbix.*.py +/lib/ansible/modules/network/f5/ +/lib/ansible/modules/network/nmcli.py +/lib/ansible/modules/notification/pushbullet.py +/lib/ansible/modules/packaging/language/maven_artifact.py +/lib/ansible/modules/packaging/os/dnf.py +/lib/ansible/modules/packaging/os/layman.py +/lib/ansible/modules/remote_management/ipmi/ +/lib/ansible/modules/univention/ +/lib/ansible/modules/web_infrastructure/letsencrypt.py /lib/ansible/modules/__init__.py /lib/ansible/module_utils/a10.py /lib/ansible/module_utils/azure_rm_common.py diff --git a/test/sanity/code-smell/boilerplate.sh b/test/sanity/code-smell/boilerplate.sh index 213893901a..b9d67ed4ec 100755 --- a/test/sanity/code-smell/boilerplate.sh +++ b/test/sanity/code-smell/boilerplate.sh @@ -3,17 +3,15 @@ metaclass1=$(find ./bin -type f -exec grep -HL '__metaclass__ = type' '{}' '+') future1=$(find ./bin -type f -exec grep -HL 'from __future__ import (absolute_import, division, print_function)' '{}' '+') -metaclass2=$(find ./lib/ansible -path ./lib/ansible/modules/core -prune \ +metaclass2=$(find ./lib/ansible -path ./lib/ansible/modules -prune \ -o -path ./lib/ansible/modules/__init__.py \ - -o -path ./lib/ansible/modules/extras -prune \ -o -path ./lib/ansible/module_utils -prune \ -o -path ./lib/ansible/compat/six/_six.py -prune \ -o -path ./lib/ansible/utils/module_docs_fragments -prune \ -o -name '*.py' -exec grep -HL '__metaclass__ = type' '{}' '+') -future2=$(find ./lib/ansible -path ./lib/ansible/modules/core -prune \ +future2=$(find ./lib/ansible -path ./lib/ansible/modules -prune \ -o -path ./lib/ansible/modules/__init__.py \ - -o -path ./lib/ansible/modules/extras -prune \ -o -path ./lib/ansible/module_utils -prune \ -o -path ./lib/ansible/compat/six/_six.py -prune \ -o -path ./lib/ansible/utils/module_docs_fragments -prune \ diff --git a/test/sanity/code-smell/no-basestring.sh b/test/sanity/code-smell/no-basestring.sh index d1068a989b..c8d97e4910 100755 --- a/test/sanity/code-smell/no-basestring.sh +++ b/test/sanity/code-smell/no-basestring.sh @@ -8,8 +8,7 @@ BASESTRING_USERS=$(grep -r basestring . \ -e test/results/ \ -e lib/ansible/compat/six/_six.py \ -e lib/ansible/module_utils/six.py \ - -e lib/ansible/modules/core/ \ - -e lib/ansible/modules/extras/ \ + -e lib/ansible/modules/ \ -e '^[^:]*:#' ) diff --git a/test/sanity/code-smell/use-compat-six.sh b/test/sanity/code-smell/use-compat-six.sh index 0fa120e82a..c77ad7c7ec 100755 --- a/test/sanity/code-smell/use-compat-six.sh +++ b/test/sanity/code-smell/use-compat-six.sh @@ -6,7 +6,7 @@ BASEDIR=${1-"lib"} # digital_ocean is checking for six because dopy doesn't specify the # requirement on six so it needs to try importing six to give the correct error # message -WHITELIST='(lib/ansible/modules/core/cloud/digital_ocean/digital_ocean.py)' +WHITELIST='(lib/ansible/modules/cloud/digital_ocean/digital_ocean.py)' SIX_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -wH six '{}' '+' \ | grep import \ diff --git a/test/sanity/validate-modules/skip.txt b/test/sanity/validate-modules/skip.txt index 813b111d49..693a4aeada 100644 --- a/test/sanity/validate-modules/skip.txt +++ b/test/sanity/validate-modules/skip.txt @@ -1,7 +1,3 @@ -lib/ansible/modules/core/utilities/logic/async_status.py -lib/ansible/modules/core/utilities/helper/_fireball.py -lib/ansible/modules/core/utilities/helper/_accelerate.py -lib/ansible/modules/core/test -lib/ansible/modules/core/.github -lib/ansible/modules/extras/test -lib/ansible/modules/extras/.github +lib/ansible/modules/utilities/logic/async_status.py +lib/ansible/modules/utilities/helper/_fireball.py +lib/ansible/modules/utilities/helper/_accelerate.py diff --git a/test/units/modules/core/cloud/docker/test_docker.py b/test/units/modules/core/cloud/docker/test_docker.py index 2fc31e2771..0a40cfb8db 100644 --- a/test/units/modules/core/cloud/docker/test_docker.py +++ b/test/units/modules/core/cloud/docker/test_docker.py @@ -2,7 +2,7 @@ import collections import os import unittest -from ansible.modules.core.cloud.docker._docker import get_split_image_tag +from ansible.modules.cloud.docker._docker import get_split_image_tag class DockerSplitImageTagTestCase(unittest.TestCase): diff --git a/test/units/modules/core/cloud/openstack/test_os_server.py b/test/units/modules/core/cloud/openstack/test_os_server.py index a2c017edec..3ab3e40580 100644 --- a/test/units/modules/core/cloud/openstack/test_os_server.py +++ b/test/units/modules/core/cloud/openstack/test_os_server.py @@ -4,7 +4,7 @@ import yaml import inspect import collections -from ansible.modules.core.cloud.openstack import os_server +from ansible.modules.cloud.openstack import os_server class AnsibleFail(Exception): diff --git a/test/units/modules/core/packaging/os/test_apt.py b/test/units/modules/core/packaging/os/test_apt.py index 49f73be1d6..f1b6f170f0 100644 --- a/test/units/modules/core/packaging/os/test_apt.py +++ b/test/units/modules/core/packaging/os/test_apt.py @@ -6,7 +6,7 @@ from ansible.compat.tests import mock from ansible.compat.tests import unittest try: - from ansible.modules.core.packaging.os.apt import ( + from ansible.modules.packaging.os.apt import ( expand_pkgspec_from_fnmatches, ) except: diff --git a/test/units/modules/extras/cloud/amazon/test_ec2_vpc_nat_gateway.py b/test/units/modules/extras/cloud/amazon/test_ec2_vpc_nat_gateway.py index 104dbab5fa..f274b70114 100644 --- a/test/units/modules/extras/cloud/amazon/test_ec2_vpc_nat_gateway.py +++ b/test/units/modules/extras/cloud/amazon/test_ec2_vpc_nat_gateway.py @@ -19,7 +19,7 @@ from ansible.inventory import Inventory from ansible.playbook.play import Play from ansible.executor.task_queue_manager import TaskQueueManager -import ansible.modules.extras.cloud.amazon.ec2_vpc_nat_gateway as ng +import ansible.modules.cloud.amazon.ec2_vpc_nat_gateway as ng Options = ( namedtuple( diff --git a/test/units/modules/extras/cloud/amazon/test_kinesis_stream.py b/test/units/modules/extras/cloud/amazon/test_kinesis_stream.py index c06c0b5462..efddfece7c 100644 --- a/test/units/modules/extras/cloud/amazon/test_kinesis_stream.py +++ b/test/units/modules/extras/cloud/amazon/test_kinesis_stream.py @@ -12,7 +12,7 @@ if not HAS_BOTO3: import unittest -import ansible.modules.extras.cloud.amazon.kinesis_stream as kinesis_stream +import ansible.modules.cloud.amazon.kinesis_stream as kinesis_stream aws_region = 'us-west-2'