Sanity test fixups - AWS related tests (#64093)

* AWS tests Sanity Test fixups (add boilerplate)

* Remove sanity ignore.txt entries
pull/62087/head
Mark Chappell 5 years ago committed by Jill R
parent e9f8a34dce
commit e6607d611a

@ -1,5 +1,8 @@
#!/usr/bin/env python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import sys

@ -1,2 +1,5 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import boto.exceptions as exceptions # pylint: disable=useless-import-alias
import boto.session as session # pylint: disable=useless-import-alias

@ -1,5 +1,8 @@
# boto2
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from boto.mocks.instances import BotoInstance, Reservation

@ -1,3 +1,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class Connection(object):
def __init__(self):
pass

@ -1,3 +1,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class BotoServerError(Exception):
pass

@ -1,3 +1,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class BotoServerError(Exception):
pass

@ -1,3 +1,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.module_utils.common._collections_compat import MutableMapping
import datetime

@ -1,6 +1,9 @@
#!/usr/bin/env python
# boto3
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from boto.mocks.instances import Boto3Instance

@ -4,6 +4,9 @@ Find and delete AWS resources matching the provided --match string. Unless
Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure.
'''
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import boto
import boto.ec2.elb
import optparse

@ -5803,22 +5803,6 @@ test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py future-i
test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py metaclass-boilerplate
test/integration/targets/ignore_unreachable/fake_connectors/bad_put_file.py future-import-boilerplate
test/integration/targets/ignore_unreachable/fake_connectors/bad_put_file.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/inventory_diff.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/inventory_diff.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/exception.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py metaclass-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/session.py future-import-boilerplate
test/integration/targets/inventory_aws_conformance/lib/boto/session.py metaclass-boilerplate
test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py future-import-boilerplate
test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py metaclass-boilerplate
test/integration/targets/inventory_kubevirt_conformance/server.py future-import-boilerplate
@ -5923,8 +5907,6 @@ test/integration/targets/win_script/files/test_script_with_splatting.ps1 pslint:
test/integration/targets/win_stat/library/test_symlink_file.ps1 pslint:PSCustomUseLiteralPath
test/integration/targets/win_template/files/foo.dos.txt line-endings
test/integration/targets/win_user_right/library/test_get_right.ps1 pslint:PSCustomUseLiteralPath
test/legacy/cleanup_ec2.py future-import-boilerplate
test/legacy/cleanup_ec2.py metaclass-boilerplate
test/legacy/cleanup_gce.py future-import-boilerplate
test/legacy/cleanup_gce.py metaclass-boilerplate
test/legacy/cleanup_gce.py pylint:blacklisted-name
@ -5968,8 +5950,6 @@ test/units/module_utils/common/test_dict_transformations.py future-import-boiler
test/units/module_utils/common/test_dict_transformations.py metaclass-boilerplate
test/units/module_utils/conftest.py future-import-boilerplate
test/units/module_utils/conftest.py metaclass-boilerplate
test/units/module_utils/ec2/test_aws.py future-import-boilerplate
test/units/module_utils/ec2/test_aws.py metaclass-boilerplate
test/units/module_utils/facts/base.py future-import-boilerplate
test/units/module_utils/facts/hardware/test_sunos_get_uptime_facts.py future-import-boilerplate
test/units/module_utils/facts/hardware/test_sunos_get_uptime_facts.py metaclass-boilerplate
@ -6022,8 +6002,6 @@ test/units/module_utils/test_database.py future-import-boilerplate
test/units/module_utils/test_database.py metaclass-boilerplate
test/units/module_utils/test_distro.py future-import-boilerplate
test/units/module_utils/test_distro.py metaclass-boilerplate
test/units/module_utils/test_ec2.py future-import-boilerplate
test/units/module_utils/test_ec2.py metaclass-boilerplate
test/units/module_utils/test_hetzner.py future-import-boilerplate
test/units/module_utils/test_hetzner.py metaclass-boilerplate
test/units/module_utils/test_kubevirt.py future-import-boilerplate
@ -6038,37 +6016,12 @@ test/units/module_utils/xenserver/FakeAnsibleModule.py future-import-boilerplate
test/units/module_utils/xenserver/FakeAnsibleModule.py metaclass-boilerplate
test/units/module_utils/xenserver/FakeXenAPI.py future-import-boilerplate
test/units/module_utils/xenserver/FakeXenAPI.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_aws_api_gateway.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py future-import-boilerplate
test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py future-import-boilerplate
test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_aws_s3.py future-import-boilerplate
test/units/modules/cloud/amazon/test_aws_s3.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_cloudformation.py future-import-boilerplate
test/units/modules/cloud/amazon/test_cloudformation.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_data_pipeline.py future-import-boilerplate
test/units/modules/cloud/amazon/test_data_pipeline.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_ec2_group.py future-import-boilerplate
test/units/modules/cloud/amazon/test_ec2_group.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py future-import-boilerplate
test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py pylint:blacklisted-name
test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py future-import-boilerplate
test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py pylint:blacklisted-name
test/units/modules/cloud/amazon/test_iam_password_policy.py future-import-boilerplate
test/units/modules/cloud/amazon/test_iam_password_policy.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_kinesis_stream.py future-import-boilerplate
test/units/modules/cloud/amazon/test_kinesis_stream.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_lambda.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_lambda_policy.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py future-import-boilerplate
test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_route53_zone.py future-import-boilerplate
test/units/modules/cloud/amazon/test_route53_zone.py metaclass-boilerplate
test/units/modules/cloud/amazon/test_s3_bucket_notification.py future-import-boilerplate
test/units/modules/cloud/amazon/test_s3_bucket_notification.py metaclass-boilerplate
test/units/modules/cloud/google/test_gce_tag.py future-import-boilerplate
test/units/modules/cloud/google/test_gce_tag.py metaclass-boilerplate
test/units/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate

@ -2,19 +2,10 @@
# (c) 2015, Allen Sanabria <asanabria@linuxdynasty.org>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
try:
import boto3

@ -1,21 +1,11 @@
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# (c) 2017 Red Hat Inc.
import unittest
from ansible.module_utils.ec2 import map_complex_type, compare_policies

@ -2,23 +2,11 @@
# (c) 2016 Michael De La Rue
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys

@ -1,19 +1,11 @@
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.utils.amazon_placebo_fixtures import placeboify, maybe_sleep
from ansible.modules.cloud.amazon import aws_direct_connect_connection

@ -1,19 +1,11 @@
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
import os

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
import unittest

@ -1,19 +1,11 @@
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest

@ -1,19 +1,11 @@
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.modules.cloud.amazon import ec2_group as group_module

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
from units.modules.utils import set_module_args

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
import unittest

@ -2,22 +2,11 @@
# (c) 2017 Michael De La Rue
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import copy
import pytest

@ -2,22 +2,11 @@
# (c) 2017 Michael De La Rue
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import copy

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.modules.cloud.amazon import redshift_cross_region_snapshots as rcrs
mock_status_enabled = {

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import functools
from ansible.modules.cloud.amazon import route53_zone

@ -1,3 +1,7 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
from units.compat.mock import MagicMock, patch

Loading…
Cancel
Save