mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Add module name into fixtures directory name.
* Rename conftest.py to avoid collisions.
* Match filenames inside directories.
(cherry picked from commit fa924aae31
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
1f0361a1c6
commit
833530ab47
368 changed files with 113 additions and 59 deletions
119
.github/BOTMETA.yml
vendored
119
.github/BOTMETA.yml
vendored
|
@ -327,13 +327,13 @@ files:
|
|||
$module_utils/xfconf.py:
|
||||
maintainers: russoz
|
||||
labels: xfconf
|
||||
$modules/cloud/alicloud/:
|
||||
$modules/cloud/alicloud/ali_:
|
||||
maintainers: xiaozhu36
|
||||
$modules/cloud/atomic/atomic_container.py:
|
||||
maintainers: giuseppe krsacme
|
||||
$modules/cloud/atomic/:
|
||||
$modules/cloud/atomic/atomic_:
|
||||
maintainers: krsacme
|
||||
$modules/cloud/centurylink/:
|
||||
$modules/cloud/centurylink/clc_:
|
||||
maintainers: clc-runner
|
||||
$modules/cloud/dimensiondata/dimensiondata_network.py:
|
||||
maintainers: aimonb tintoy
|
||||
|
@ -342,22 +342,22 @@ files:
|
|||
maintainers: tintoy
|
||||
$modules/cloud/heroku/heroku_collaborator.py:
|
||||
maintainers: marns93
|
||||
$modules/cloud/huawei/:
|
||||
$modules/cloud/huawei/hwc_:
|
||||
maintainers: $team_huawei huaweicloud
|
||||
keywords: cloud huawei hwc
|
||||
$modules/cloud/linode/:
|
||||
$modules/cloud/linode/linode:
|
||||
maintainers: $team_linode
|
||||
$modules/cloud/linode/linode.py:
|
||||
maintainers: zbal
|
||||
$modules/cloud/lxc/lxc_container.py:
|
||||
maintainers: cloudnull
|
||||
$modules/cloud/lxd/:
|
||||
$modules/cloud/lxd/lxd_:
|
||||
ignore: hnakamur
|
||||
$modules/cloud/lxd/lxd_profile.py:
|
||||
maintainers: conloos
|
||||
$modules/cloud/lxd/lxd_project.py:
|
||||
maintainers: we10710aa
|
||||
$modules/cloud/memset/:
|
||||
$modules/cloud/memset/memset_:
|
||||
maintainers: glitchcrab
|
||||
$modules/cloud/misc/cloud_init_data_facts.py:
|
||||
maintainers: resmo
|
||||
|
@ -385,41 +385,42 @@ files:
|
|||
labels: rhevm virt
|
||||
ignore: skvidal
|
||||
keywords: kvm libvirt proxmox qemu
|
||||
$modules/cloud/misc/:
|
||||
$modules/cloud/misc/serverless.py:
|
||||
ignore: ryansb
|
||||
$modules/cloud/misc/terraform.py:
|
||||
maintainers: m-yosefpor rainerleber
|
||||
ignore: ryansb
|
||||
$modules/cloud/misc/xenserver_facts.py:
|
||||
maintainers: caphrim007 cheese
|
||||
labels: xenserver_facts
|
||||
ignore: andyhky
|
||||
$modules/cloud/oneandone/:
|
||||
ignore: andyhky ryansb
|
||||
$modules/cloud/oneandone/oneandone_:
|
||||
maintainers: aajdinov edevenport
|
||||
$modules/cloud/online/:
|
||||
$modules/cloud/online/online_:
|
||||
maintainers: remyleone
|
||||
$modules/cloud/opennebula/:
|
||||
$modules/cloud/opennebula/one_:
|
||||
maintainers: $team_opennebula
|
||||
$modules/cloud/opennebula/one_host.py:
|
||||
maintainers: rvalle
|
||||
$modules/cloud/oracle/oci_vcn.py:
|
||||
maintainers: $team_oracle rohitChaware
|
||||
$modules/cloud/ovh/:
|
||||
$modules/cloud/ovh/ovh_:
|
||||
maintainers: pascalheraud
|
||||
$modules/cloud/ovh/ovh_monthly_billing.py:
|
||||
maintainers: fraff
|
||||
$modules/cloud/packet/packet_device.py:
|
||||
maintainers: baldwinSPC t0mk teebes
|
||||
$modules/cloud/packet/:
|
||||
$modules/cloud/packet/packet_:
|
||||
maintainers: nurfet-becirevic t0mk
|
||||
$modules/cloud/packet/packet_sshkey.py:
|
||||
maintainers: t0mk
|
||||
$modules/cloud/profitbricks/:
|
||||
$modules/cloud/profitbricks/profitbricks:
|
||||
maintainers: baldwinSPC
|
||||
$modules/cloud/pubnub/pubnub_blocks.py:
|
||||
maintainers: parfeon pubnub
|
||||
$modules/cloud/rackspace/rax.py:
|
||||
maintainers: omgjlk sivel
|
||||
$modules/cloud/rackspace/:
|
||||
$modules/cloud/rackspace/rax:
|
||||
ignore: ryansb sivel
|
||||
$modules/cloud/rackspace/rax_cbs.py:
|
||||
maintainers: claco
|
||||
|
@ -457,7 +458,7 @@ files:
|
|||
maintainers: smashwilson
|
||||
$modules/cloud/rackspace/rax_queue.py:
|
||||
maintainers: claco
|
||||
$modules/cloud/scaleway/:
|
||||
$modules/cloud/scaleway/scaleway_:
|
||||
maintainers: $team_scaleway
|
||||
$modules/cloud/scaleway/scaleway_compute_private_network.py:
|
||||
maintainers: pastral
|
||||
|
@ -490,29 +491,39 @@ files:
|
|||
ignore: hekonsek
|
||||
$modules/cloud/scaleway/scaleway_volume_info.py:
|
||||
maintainers: Spredzy
|
||||
$modules/cloud/smartos/:
|
||||
$modules/cloud/smartos/imgadm.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/nictagadm.py:
|
||||
maintainers: SmithX10
|
||||
maintainers: $team_solaris SmithX10
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/smartos_image_info.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/vmadm.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/softlayer/sl_vm.py:
|
||||
maintainers: mcltn
|
||||
$modules/cloud/spotinst/spotinst_aws_elastigroup.py:
|
||||
maintainers: talzur
|
||||
$modules/cloud/univention/:
|
||||
$modules/cloud/univention/udm_:
|
||||
maintainers: keachi
|
||||
$modules/cloud/webfaction/:
|
||||
$modules/cloud/webfaction/webfaction_:
|
||||
maintainers: quentinsf
|
||||
$modules/cloud/xenserver/:
|
||||
$modules/cloud/xenserver/xenserver_:
|
||||
maintainers: bvitnik
|
||||
$modules/clustering/consul/:
|
||||
$modules/clustering/consul/consul:
|
||||
maintainers: $team_consul
|
||||
ignore: colin-nolan
|
||||
$modules/clustering/etcd3.py:
|
||||
maintainers: evrardjp
|
||||
ignore: vfauth
|
||||
$modules/clustering/nomad/:
|
||||
$modules/clustering/nomad/nomad_:
|
||||
maintainers: chris93111
|
||||
$modules/clustering/pacemaker_cluster.py:
|
||||
maintainers: matbu
|
||||
|
@ -520,7 +531,7 @@ files:
|
|||
maintainers: treyperry
|
||||
$modules/database/aerospike/aerospike_migrations.py:
|
||||
maintainers: Alb0t
|
||||
$modules/database/influxdb/:
|
||||
$modules/database/influxdb/influxdb_:
|
||||
maintainers: kamsz
|
||||
$modules/database/influxdb/influxdb_query.py:
|
||||
maintainers: resmo
|
||||
|
@ -554,7 +565,7 @@ files:
|
|||
labels: mssql_script
|
||||
$modules/database/saphana/hana_query.py:
|
||||
maintainers: rainerleber
|
||||
$modules/database/vertica/:
|
||||
$modules/database/vertica/vertica_:
|
||||
maintainers: dareko
|
||||
$modules/files/archive.py:
|
||||
maintainers: bendoh
|
||||
|
@ -579,7 +590,7 @@ files:
|
|||
maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0
|
||||
labels: m:xml xml
|
||||
ignore: magnus919
|
||||
$modules/identity/ipa/:
|
||||
$modules/identity/ipa/ipa_:
|
||||
maintainers: $team_ipa
|
||||
$modules/identity/ipa/ipa_pwpolicy.py:
|
||||
maintainers: adralioh
|
||||
|
@ -587,7 +598,7 @@ files:
|
|||
maintainers: cprh
|
||||
$modules/identity/ipa/ipa_vault.py:
|
||||
maintainers: jparrill
|
||||
$modules/identity/keycloak/:
|
||||
$modules/identity/keycloak/keycloak_:
|
||||
maintainers: $team_keycloak
|
||||
$modules/identity/keycloak/keycloak_authentication.py:
|
||||
maintainers: elfelip Gaetan2907
|
||||
|
@ -665,10 +676,10 @@ files:
|
|||
maintainers: thaumos
|
||||
$modules/monitoring/rollbar_deployment.py:
|
||||
maintainers: kavu
|
||||
$modules/monitoring/sensu/sensu_:
|
||||
maintainers: dmsimard
|
||||
$modules/monitoring/sensu/sensu_check.py:
|
||||
maintainers: andsens
|
||||
$modules/monitoring/sensu/:
|
||||
maintainers: dmsimard
|
||||
$modules/monitoring/sensu/sensu_silence.py:
|
||||
maintainers: smbambling
|
||||
$modules/monitoring/sensu/sensu_subscription.py:
|
||||
|
@ -725,7 +736,7 @@ files:
|
|||
maintainers: nerzhul
|
||||
$modules/net_tools/omapi_host.py:
|
||||
maintainers: amasolov nerzhul
|
||||
$modules/net_tools/pritunl/:
|
||||
$modules/net_tools/pritunl/pritunl_:
|
||||
maintainers: Lowess
|
||||
$modules/net_tools/nmcli.py:
|
||||
maintainers: alcamie101
|
||||
|
@ -961,21 +972,24 @@ files:
|
|||
maintainers: $team_suse
|
||||
labels: zypper
|
||||
ignore: matze
|
||||
$modules/remote_management/cobbler/:
|
||||
$modules/remote_management/cobbler/cobbler_:
|
||||
maintainers: dagwieers
|
||||
$modules/remote_management/hpilo/:
|
||||
$modules/remote_management/hpilo/hpilo_:
|
||||
maintainers: haad
|
||||
ignore: dagwieers
|
||||
$modules/remote_management/hpilo/hponcfg.py:
|
||||
maintainers: haad
|
||||
ignore: dagwieers
|
||||
$modules/remote_management/imc/imc_rest.py:
|
||||
maintainers: dagwieers
|
||||
labels: cisco
|
||||
$modules/remote_management/ipmi/:
|
||||
$modules/remote_management/ipmi/ipmi_:
|
||||
maintainers: bgaifullin cloudnull
|
||||
$modules/remote_management/lenovoxcc/:
|
||||
$modules/remote_management/lenovoxcc/xcc_:
|
||||
maintainers: panyy3 renxulei
|
||||
$modules/remote_management/lxca/:
|
||||
$modules/remote_management/lxca/lxca_:
|
||||
maintainers: navalkp prabhosa
|
||||
$modules/remote_management/manageiq/:
|
||||
$modules/remote_management/manageiq/manageiq_:
|
||||
labels: manageiq
|
||||
maintainers: $team_manageiq
|
||||
$modules/remote_management/manageiq/manageiq_alert_profiles.py:
|
||||
|
@ -990,7 +1004,7 @@ files:
|
|||
maintainers: russoz $team_manageiq
|
||||
$modules/remote_management/manageiq/manageiq_tenant.py:
|
||||
maintainers: evertmulder
|
||||
$modules/remote_management/oneview/:
|
||||
$modules/remote_management/oneview/oneview_:
|
||||
maintainers: adriane-cardozo fgbulsoni tmiotto
|
||||
$modules/remote_management/oneview/oneview_datacenter_info.py:
|
||||
maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr
|
||||
|
@ -998,7 +1012,16 @@ files:
|
|||
maintainers: fgbulsoni
|
||||
$modules/remote_management/oneview/oneview_fcoe_network.py:
|
||||
maintainers: fgbulsoni
|
||||
$modules/remote_management/redfish/:
|
||||
$modules/remote_management/redfish/idrac_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/ilo_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/redfish_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/wdc_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/wdc_redfish_command.py:
|
||||
|
@ -1010,7 +1033,7 @@ files:
|
|||
labels: stacki_host
|
||||
$modules/remote_management/wakeonlan.py:
|
||||
maintainers: dagwieers
|
||||
$modules/source_control/bitbucket/:
|
||||
$modules/source_control/bitbucket/bitbucket_:
|
||||
maintainers: catcombo
|
||||
$modules/source_control/bzr.py:
|
||||
maintainers: andreparames
|
||||
|
@ -1028,9 +1051,9 @@ files:
|
|||
maintainers: adrianmoisey
|
||||
$modules/source_control/github/github_repo.py:
|
||||
maintainers: atorrescogollo
|
||||
$modules/source_control/github/:
|
||||
$modules/source_control/github/github_:
|
||||
maintainers: stpierre
|
||||
$modules/source_control/gitlab/:
|
||||
$modules/source_control/gitlab/gitlab_:
|
||||
notify: jlozadad
|
||||
maintainers: $team_gitlab
|
||||
keywords: gitlab source_control
|
||||
|
@ -1048,13 +1071,13 @@ files:
|
|||
maintainers: remixtj
|
||||
$modules/storage/hpe3par/ss_3par_cpg.py:
|
||||
maintainers: farhan7500 gautamphegde
|
||||
$modules/storage/ibm/:
|
||||
$modules/storage/ibm/ibm_sa_:
|
||||
maintainers: tzure
|
||||
$modules/storage/pmem/pmem.py:
|
||||
maintainers: mizumm
|
||||
$modules/storage/vexata/:
|
||||
$modules/storage/vexata/vexata_:
|
||||
maintainers: vexata
|
||||
$modules/storage/zfs/:
|
||||
$modules/storage/zfs/zfs:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
|
@ -1062,6 +1085,10 @@ files:
|
|||
maintainers: johanwiren
|
||||
$modules/storage/zfs/zfs_delegate_admin.py:
|
||||
maintainers: natefoo
|
||||
$modules/storage/zfs/zpool_facts:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/system/aix:
|
||||
maintainers: $team_aix
|
||||
labels: aix
|
||||
|
@ -1259,7 +1286,7 @@ files:
|
|||
maintainers: phsmith
|
||||
$modules/web_infrastructure/rundeck_job_executions_info.py:
|
||||
maintainers: phsmith
|
||||
$modules/web_infrastructure/sophos_utm/:
|
||||
$modules/web_infrastructure/sophos_utm/utm_:
|
||||
maintainers: $team_e_spirit
|
||||
keywords: sophos utm
|
||||
$modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py:
|
||||
|
|
|
@ -10,6 +10,8 @@ import pytest
|
|||
from ansible_collections.community.general.plugins.modules.cloud.linode import linode
|
||||
from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args
|
||||
|
||||
from .linode_conftest import api_key, auth
|
||||
|
||||
if not linode.HAS_LINODE:
|
||||
pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module')
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ from ansible_collections.community.general.plugins.module_utils.linode import ge
|
|||
from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args
|
||||
from ansible_collections.community.general.tests.unit.compat import mock
|
||||
|
||||
from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode
|
||||
|
||||
|
||||
def test_mandatory_state_is_validated(capfd):
|
||||
with pytest.raises(SystemExit):
|
||||
|
|
|
@ -11,7 +11,8 @@ __metaclass__ = type
|
|||
import json
|
||||
import pytest
|
||||
|
||||
from .common import fake_xenapi_ref
|
||||
from .xenserver_common import fake_xenapi_ref
|
||||
from .xenserver_conftest import XenAPI, xenserver_guest_info
|
||||
|
||||
pytestmark = pytest.mark.usefixtures('patch_ansible_module')
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ __metaclass__ = type
|
|||
import json
|
||||
import pytest
|
||||
|
||||
from .common import fake_xenapi_ref
|
||||
from .xenserver_common import fake_xenapi_ref
|
||||
from .xenserver_conftest import fake_ansible_module, XenAPI, xenserver_guest_powerstate
|
||||
|
||||
|
||||
testcase_set_powerstate = {
|
||||
|
|
|
@ -10,6 +10,8 @@ import json
|
|||
|
||||
from ansible_collections.community.general.plugins.modules.packaging.os import rhn_channel
|
||||
|
||||
from .rhn_conftest import mock_request
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ import ansible.module_utils.six
|
|||
from ansible.module_utils.six.moves import xmlrpc_client
|
||||
from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register
|
||||
|
||||
from .rhn_conftest import mock_request
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import yaml
|
|||
|
||||
from mock import Mock, patch
|
||||
from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from hpOneView.oneview_client import OneViewClient
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import Mock
|
|||
|
||||
# FIXME: These should be done inside of a fixture so that they're only mocked during
|
||||
# these unittests
|
||||
if 'hpOneView' not in sys.modules:
|
||||
sys.modules['hpOneView'] = Mock()
|
||||
sys.modules['hpOneView.oneview_client'] = Mock()
|
||||
|
||||
|
|
|
@ -7,8 +7,10 @@ __metaclass__ = type
|
|||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule
|
||||
from .hpe_test_utils import FactsParamsTest
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule
|
||||
|
||||
PARAMS_GET_CONNECTED = dict(
|
||||
config='config.json',
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_enclosure_info import EnclosureInfoModule
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -11,6 +11,7 @@ import yaml
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest, mock
|
||||
from .oneview_module_loader import EthernetNetworkModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
|
||||
FAKE_MSG_ERROR = 'Fake message error'
|
||||
|
|
|
@ -8,6 +8,7 @@ __metaclass__ = type
|
|||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
|
||||
from .oneview_module_loader import EthernetNetworkInfoModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -9,6 +9,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .oneview_module_loader import FcNetworkModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
|
||||
FAKE_MSG_ERROR = 'Fake message error'
|
||||
|
|
|
@ -7,6 +7,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .oneview_module_loader import FcNetworkInfoModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -9,6 +9,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .oneview_module_loader import FcoeNetworkModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
|
||||
FAKE_MSG_ERROR = 'Fake message error'
|
||||
|
|
|
@ -8,7 +8,7 @@ __metaclass__ = type
|
|||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
|
||||
from .oneview_module_loader import FcoeNetworkInfoModule
|
||||
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -8,8 +8,9 @@ __metaclass__ = type
|
|||
from copy import deepcopy
|
||||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest, mock
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule
|
||||
|
||||
|
||||
FAKE_MSG_ERROR = 'Fake message error'
|
||||
|
|
|
@ -6,10 +6,11 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group_info import (
|
||||
LogicalInterconnectGroupInfoModule
|
||||
)
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -8,6 +8,7 @@ __metaclass__ = type
|
|||
from ansible_collections.community.general.tests.unit.compat import unittest, mock
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_module_loader import NetworkSetModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
|
||||
FAKE_MSG_ERROR = 'Fake message error'
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .oneview_module_loader import NetworkSetInfoModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
ERROR_MSG = 'Fake message error'
|
||||
|
|
|
@ -7,6 +7,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest, mock
|
||||
from .oneview_module_loader import SanManagerModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from copy import deepcopy
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ __metaclass__ = type
|
|||
|
||||
from ansible_collections.community.general.tests.unit.compat import unittest
|
||||
from .oneview_module_loader import SanManagerInfoModule
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
1. Clone project to `ansible_collections/community/general`
|
||||
2. Change directory to the project one `cd ansible_collections/community/general`
|
||||
3. Run `ansible-test units --docker -v --python 3.6 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
|
||||
3. Run `ansible-test units --docker -v --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
|
||||
|
||||
## Adding tests
|
||||
|
||||
|
@ -23,5 +23,5 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
2. New test cases should be defined in `test_interfaces_file.py`. Same for new test functions if needed
|
||||
3. On first test run for a new combination of a test case and an interface configuration new set of golden files will be generated. In case of docker-based test approach that's going to fail due to RO mount option. The workaround is to run tests locally with Python 3 (3.7 in this example):
|
||||
1. Install required modules with `pip3.7 install pytest-xdist pytest-mock mock`
|
||||
3. Run tests with `ansible-test units --python 3.7 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
|
||||
3. Run tests with `ansible-test units --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
|
||||
4. Carefully verify newly created golden output files!
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue