1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Prepare un-flatmapping (#5350)

* Add module name into fixtures directory name.

* Rename conftest.py to avoid collisions.

* Match filenames inside directories.
This commit is contained in:
Felix Fontein 2022-10-26 07:32:00 +02:00 committed by GitHub
parent 2830a3452d
commit fa924aae31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
368 changed files with 113 additions and 59 deletions

119
.github/BOTMETA.yml vendored
View file

@ -327,13 +327,13 @@ files:
$module_utils/xfconf.py: $module_utils/xfconf.py:
maintainers: russoz maintainers: russoz
labels: xfconf labels: xfconf
$modules/cloud/alicloud/: $modules/cloud/alicloud/ali_:
maintainers: xiaozhu36 maintainers: xiaozhu36
$modules/cloud/atomic/atomic_container.py: $modules/cloud/atomic/atomic_container.py:
maintainers: giuseppe krsacme maintainers: giuseppe krsacme
$modules/cloud/atomic/: $modules/cloud/atomic/atomic_:
maintainers: krsacme maintainers: krsacme
$modules/cloud/centurylink/: $modules/cloud/centurylink/clc_:
maintainers: clc-runner maintainers: clc-runner
$modules/cloud/dimensiondata/dimensiondata_network.py: $modules/cloud/dimensiondata/dimensiondata_network.py:
maintainers: aimonb tintoy maintainers: aimonb tintoy
@ -342,22 +342,22 @@ files:
maintainers: tintoy maintainers: tintoy
$modules/cloud/heroku/heroku_collaborator.py: $modules/cloud/heroku/heroku_collaborator.py:
maintainers: marns93 maintainers: marns93
$modules/cloud/huawei/: $modules/cloud/huawei/hwc_:
maintainers: $team_huawei huaweicloud maintainers: $team_huawei huaweicloud
keywords: cloud huawei hwc keywords: cloud huawei hwc
$modules/cloud/linode/: $modules/cloud/linode/linode:
maintainers: $team_linode maintainers: $team_linode
$modules/cloud/linode/linode.py: $modules/cloud/linode/linode.py:
maintainers: zbal maintainers: zbal
$modules/cloud/lxc/lxc_container.py: $modules/cloud/lxc/lxc_container.py:
maintainers: cloudnull maintainers: cloudnull
$modules/cloud/lxd/: $modules/cloud/lxd/lxd_:
ignore: hnakamur ignore: hnakamur
$modules/cloud/lxd/lxd_profile.py: $modules/cloud/lxd/lxd_profile.py:
maintainers: conloos maintainers: conloos
$modules/cloud/lxd/lxd_project.py: $modules/cloud/lxd/lxd_project.py:
maintainers: we10710aa maintainers: we10710aa
$modules/cloud/memset/: $modules/cloud/memset/memset_:
maintainers: glitchcrab maintainers: glitchcrab
$modules/cloud/misc/cloud_init_data_facts.py: $modules/cloud/misc/cloud_init_data_facts.py:
maintainers: resmo maintainers: resmo
@ -385,41 +385,42 @@ files:
labels: rhevm virt labels: rhevm virt
ignore: skvidal ignore: skvidal
keywords: kvm libvirt proxmox qemu keywords: kvm libvirt proxmox qemu
$modules/cloud/misc/: $modules/cloud/misc/serverless.py:
ignore: ryansb ignore: ryansb
$modules/cloud/misc/terraform.py: $modules/cloud/misc/terraform.py:
maintainers: m-yosefpor rainerleber maintainers: m-yosefpor rainerleber
ignore: ryansb
$modules/cloud/misc/xenserver_facts.py: $modules/cloud/misc/xenserver_facts.py:
maintainers: caphrim007 cheese maintainers: caphrim007 cheese
labels: xenserver_facts labels: xenserver_facts
ignore: andyhky ignore: andyhky ryansb
$modules/cloud/oneandone/: $modules/cloud/oneandone/oneandone_:
maintainers: aajdinov edevenport maintainers: aajdinov edevenport
$modules/cloud/online/: $modules/cloud/online/online_:
maintainers: remyleone maintainers: remyleone
$modules/cloud/opennebula/: $modules/cloud/opennebula/one_:
maintainers: $team_opennebula maintainers: $team_opennebula
$modules/cloud/opennebula/one_host.py: $modules/cloud/opennebula/one_host.py:
maintainers: rvalle maintainers: rvalle
$modules/cloud/oracle/oci_vcn.py: $modules/cloud/oracle/oci_vcn.py:
maintainers: $team_oracle rohitChaware maintainers: $team_oracle rohitChaware
$modules/cloud/ovh/: $modules/cloud/ovh/ovh_:
maintainers: pascalheraud maintainers: pascalheraud
$modules/cloud/ovh/ovh_monthly_billing.py: $modules/cloud/ovh/ovh_monthly_billing.py:
maintainers: fraff maintainers: fraff
$modules/cloud/packet/packet_device.py: $modules/cloud/packet/packet_device.py:
maintainers: baldwinSPC t0mk teebes maintainers: baldwinSPC t0mk teebes
$modules/cloud/packet/: $modules/cloud/packet/packet_:
maintainers: nurfet-becirevic t0mk maintainers: nurfet-becirevic t0mk
$modules/cloud/packet/packet_sshkey.py: $modules/cloud/packet/packet_sshkey.py:
maintainers: t0mk maintainers: t0mk
$modules/cloud/profitbricks/: $modules/cloud/profitbricks/profitbricks:
maintainers: baldwinSPC maintainers: baldwinSPC
$modules/cloud/pubnub/pubnub_blocks.py: $modules/cloud/pubnub/pubnub_blocks.py:
maintainers: parfeon pubnub maintainers: parfeon pubnub
$modules/cloud/rackspace/rax.py: $modules/cloud/rackspace/rax.py:
maintainers: omgjlk sivel maintainers: omgjlk sivel
$modules/cloud/rackspace/: $modules/cloud/rackspace/rax:
ignore: ryansb sivel ignore: ryansb sivel
$modules/cloud/rackspace/rax_cbs.py: $modules/cloud/rackspace/rax_cbs.py:
maintainers: claco maintainers: claco
@ -457,7 +458,7 @@ files:
maintainers: smashwilson maintainers: smashwilson
$modules/cloud/rackspace/rax_queue.py: $modules/cloud/rackspace/rax_queue.py:
maintainers: claco maintainers: claco
$modules/cloud/scaleway/: $modules/cloud/scaleway/scaleway_:
maintainers: $team_scaleway maintainers: $team_scaleway
$modules/cloud/scaleway/scaleway_compute_private_network.py: $modules/cloud/scaleway/scaleway_compute_private_network.py:
maintainers: pastral maintainers: pastral
@ -490,29 +491,39 @@ files:
ignore: hekonsek ignore: hekonsek
$modules/cloud/scaleway/scaleway_volume_info.py: $modules/cloud/scaleway/scaleway_volume_info.py:
maintainers: Spredzy maintainers: Spredzy
$modules/cloud/smartos/: $modules/cloud/smartos/imgadm.py:
maintainers: $team_solaris maintainers: $team_solaris
labels: solaris labels: solaris
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
$modules/cloud/smartos/nictagadm.py: $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: $modules/cloud/softlayer/sl_vm.py:
maintainers: mcltn maintainers: mcltn
$modules/cloud/spotinst/spotinst_aws_elastigroup.py: $modules/cloud/spotinst/spotinst_aws_elastigroup.py:
maintainers: talzur maintainers: talzur
$modules/cloud/univention/: $modules/cloud/univention/udm_:
maintainers: keachi maintainers: keachi
$modules/cloud/webfaction/: $modules/cloud/webfaction/webfaction_:
maintainers: quentinsf maintainers: quentinsf
$modules/cloud/xenserver/: $modules/cloud/xenserver/xenserver_:
maintainers: bvitnik maintainers: bvitnik
$modules/clustering/consul/: $modules/clustering/consul/consul:
maintainers: $team_consul maintainers: $team_consul
ignore: colin-nolan ignore: colin-nolan
$modules/clustering/etcd3.py: $modules/clustering/etcd3.py:
maintainers: evrardjp maintainers: evrardjp
ignore: vfauth ignore: vfauth
$modules/clustering/nomad/: $modules/clustering/nomad/nomad_:
maintainers: chris93111 maintainers: chris93111
$modules/clustering/pacemaker_cluster.py: $modules/clustering/pacemaker_cluster.py:
maintainers: matbu maintainers: matbu
@ -520,7 +531,7 @@ files:
maintainers: treyperry maintainers: treyperry
$modules/database/aerospike/aerospike_migrations.py: $modules/database/aerospike/aerospike_migrations.py:
maintainers: Alb0t maintainers: Alb0t
$modules/database/influxdb/: $modules/database/influxdb/influxdb_:
maintainers: kamsz maintainers: kamsz
$modules/database/influxdb/influxdb_query.py: $modules/database/influxdb/influxdb_query.py:
maintainers: resmo maintainers: resmo
@ -554,7 +565,7 @@ files:
labels: mssql_script labels: mssql_script
$modules/database/saphana/hana_query.py: $modules/database/saphana/hana_query.py:
maintainers: rainerleber maintainers: rainerleber
$modules/database/vertica/: $modules/database/vertica/vertica_:
maintainers: dareko maintainers: dareko
$modules/files/archive.py: $modules/files/archive.py:
maintainers: bendoh maintainers: bendoh
@ -579,7 +590,7 @@ files:
maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0 maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0
labels: m:xml xml labels: m:xml xml
ignore: magnus919 ignore: magnus919
$modules/identity/ipa/: $modules/identity/ipa/ipa_:
maintainers: $team_ipa maintainers: $team_ipa
$modules/identity/ipa/ipa_pwpolicy.py: $modules/identity/ipa/ipa_pwpolicy.py:
maintainers: adralioh maintainers: adralioh
@ -587,7 +598,7 @@ files:
maintainers: cprh maintainers: cprh
$modules/identity/ipa/ipa_vault.py: $modules/identity/ipa/ipa_vault.py:
maintainers: jparrill maintainers: jparrill
$modules/identity/keycloak/: $modules/identity/keycloak/keycloak_:
maintainers: $team_keycloak maintainers: $team_keycloak
$modules/identity/keycloak/keycloak_authentication.py: $modules/identity/keycloak/keycloak_authentication.py:
maintainers: elfelip Gaetan2907 maintainers: elfelip Gaetan2907
@ -665,10 +676,10 @@ files:
maintainers: thaumos maintainers: thaumos
$modules/monitoring/rollbar_deployment.py: $modules/monitoring/rollbar_deployment.py:
maintainers: kavu maintainers: kavu
$modules/monitoring/sensu/sensu_:
maintainers: dmsimard
$modules/monitoring/sensu/sensu_check.py: $modules/monitoring/sensu/sensu_check.py:
maintainers: andsens maintainers: andsens
$modules/monitoring/sensu/:
maintainers: dmsimard
$modules/monitoring/sensu/sensu_silence.py: $modules/monitoring/sensu/sensu_silence.py:
maintainers: smbambling maintainers: smbambling
$modules/monitoring/sensu/sensu_subscription.py: $modules/monitoring/sensu/sensu_subscription.py:
@ -725,7 +736,7 @@ files:
maintainers: nerzhul maintainers: nerzhul
$modules/net_tools/omapi_host.py: $modules/net_tools/omapi_host.py:
maintainers: amasolov nerzhul maintainers: amasolov nerzhul
$modules/net_tools/pritunl/: $modules/net_tools/pritunl/pritunl_:
maintainers: Lowess maintainers: Lowess
$modules/net_tools/nmcli.py: $modules/net_tools/nmcli.py:
maintainers: alcamie101 maintainers: alcamie101
@ -961,21 +972,24 @@ files:
maintainers: $team_suse maintainers: $team_suse
labels: zypper labels: zypper
ignore: matze ignore: matze
$modules/remote_management/cobbler/: $modules/remote_management/cobbler/cobbler_:
maintainers: dagwieers maintainers: dagwieers
$modules/remote_management/hpilo/: $modules/remote_management/hpilo/hpilo_:
maintainers: haad
ignore: dagwieers
$modules/remote_management/hpilo/hponcfg.py:
maintainers: haad maintainers: haad
ignore: dagwieers ignore: dagwieers
$modules/remote_management/imc/imc_rest.py: $modules/remote_management/imc/imc_rest.py:
maintainers: dagwieers maintainers: dagwieers
labels: cisco labels: cisco
$modules/remote_management/ipmi/: $modules/remote_management/ipmi/ipmi_:
maintainers: bgaifullin cloudnull maintainers: bgaifullin cloudnull
$modules/remote_management/lenovoxcc/: $modules/remote_management/lenovoxcc/xcc_:
maintainers: panyy3 renxulei maintainers: panyy3 renxulei
$modules/remote_management/lxca/: $modules/remote_management/lxca/lxca_:
maintainers: navalkp prabhosa maintainers: navalkp prabhosa
$modules/remote_management/manageiq/: $modules/remote_management/manageiq/manageiq_:
labels: manageiq labels: manageiq
maintainers: $team_manageiq maintainers: $team_manageiq
$modules/remote_management/manageiq/manageiq_alert_profiles.py: $modules/remote_management/manageiq/manageiq_alert_profiles.py:
@ -990,7 +1004,7 @@ files:
maintainers: russoz $team_manageiq maintainers: russoz $team_manageiq
$modules/remote_management/manageiq/manageiq_tenant.py: $modules/remote_management/manageiq/manageiq_tenant.py:
maintainers: evertmulder maintainers: evertmulder
$modules/remote_management/oneview/: $modules/remote_management/oneview/oneview_:
maintainers: adriane-cardozo fgbulsoni tmiotto maintainers: adriane-cardozo fgbulsoni tmiotto
$modules/remote_management/oneview/oneview_datacenter_info.py: $modules/remote_management/oneview/oneview_datacenter_info.py:
maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr
@ -998,7 +1012,16 @@ files:
maintainers: fgbulsoni maintainers: fgbulsoni
$modules/remote_management/oneview/oneview_fcoe_network.py: $modules/remote_management/oneview/oneview_fcoe_network.py:
maintainers: fgbulsoni 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 maintainers: $team_redfish
ignore: jose-delarosa ignore: jose-delarosa
$modules/remote_management/redfish/wdc_redfish_command.py: $modules/remote_management/redfish/wdc_redfish_command.py:
@ -1010,7 +1033,7 @@ files:
labels: stacki_host labels: stacki_host
$modules/remote_management/wakeonlan.py: $modules/remote_management/wakeonlan.py:
maintainers: dagwieers maintainers: dagwieers
$modules/source_control/bitbucket/: $modules/source_control/bitbucket/bitbucket_:
maintainers: catcombo maintainers: catcombo
$modules/source_control/bzr.py: $modules/source_control/bzr.py:
maintainers: andreparames maintainers: andreparames
@ -1028,9 +1051,9 @@ files:
maintainers: adrianmoisey maintainers: adrianmoisey
$modules/source_control/github/github_repo.py: $modules/source_control/github/github_repo.py:
maintainers: atorrescogollo maintainers: atorrescogollo
$modules/source_control/github/: $modules/source_control/github/github_:
maintainers: stpierre maintainers: stpierre
$modules/source_control/gitlab/: $modules/source_control/gitlab/gitlab_:
notify: jlozadad notify: jlozadad
maintainers: $team_gitlab maintainers: $team_gitlab
keywords: gitlab source_control keywords: gitlab source_control
@ -1048,13 +1071,13 @@ files:
maintainers: remixtj maintainers: remixtj
$modules/storage/hpe3par/ss_3par_cpg.py: $modules/storage/hpe3par/ss_3par_cpg.py:
maintainers: farhan7500 gautamphegde maintainers: farhan7500 gautamphegde
$modules/storage/ibm/: $modules/storage/ibm/ibm_sa_:
maintainers: tzure maintainers: tzure
$modules/storage/pmem/pmem.py: $modules/storage/pmem/pmem.py:
maintainers: mizumm maintainers: mizumm
$modules/storage/vexata/: $modules/storage/vexata/vexata_:
maintainers: vexata maintainers: vexata
$modules/storage/zfs/: $modules/storage/zfs/zfs:
maintainers: $team_solaris maintainers: $team_solaris
labels: solaris labels: solaris
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
@ -1062,6 +1085,10 @@ files:
maintainers: johanwiren maintainers: johanwiren
$modules/storage/zfs/zfs_delegate_admin.py: $modules/storage/zfs/zfs_delegate_admin.py:
maintainers: natefoo 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: $modules/system/aix:
maintainers: $team_aix maintainers: $team_aix
labels: aix labels: aix
@ -1259,7 +1286,7 @@ files:
maintainers: phsmith maintainers: phsmith
$modules/web_infrastructure/rundeck_job_executions_info.py: $modules/web_infrastructure/rundeck_job_executions_info.py:
maintainers: phsmith maintainers: phsmith
$modules/web_infrastructure/sophos_utm/: $modules/web_infrastructure/sophos_utm/utm_:
maintainers: $team_e_spirit maintainers: $team_e_spirit
keywords: sophos utm keywords: sophos utm
$modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py: $modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py:

View file

@ -10,6 +10,8 @@ import pytest
from ansible_collections.community.general.plugins.modules.cloud.linode import linode 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 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: if not linode.HAS_LINODE:
pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module') pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module')

View file

@ -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.plugins.modules.utils import set_module_args
from ansible_collections.community.general.tests.unit.compat import mock 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): def test_mandatory_state_is_validated(capfd):
with pytest.raises(SystemExit): with pytest.raises(SystemExit):

View file

@ -11,7 +11,8 @@ __metaclass__ = type
import json import json
import pytest 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') pytestmark = pytest.mark.usefixtures('patch_ansible_module')

View file

@ -10,7 +10,8 @@ __metaclass__ = type
import json import json
import pytest 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 = { testcase_set_powerstate = {

View file

@ -10,6 +10,8 @@ import json
from ansible_collections.community.general.plugins.modules.packaging.os import rhn_channel from ansible_collections.community.general.plugins.modules.packaging.os import rhn_channel
from .rhn_conftest import mock_request
import pytest import pytest

View file

@ -15,6 +15,8 @@ import ansible.module_utils.six
from ansible.module_utils.six.moves import xmlrpc_client from ansible.module_utils.six.moves import xmlrpc_client
from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register from ansible_collections.community.general.plugins.modules.packaging.os import rhn_register
from .rhn_conftest import mock_request
import pytest import pytest

View file

@ -13,6 +13,7 @@ import yaml
from mock import Mock, patch from mock import Mock, patch
from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH 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 from hpOneView.oneview_client import OneViewClient

View file

@ -10,8 +10,9 @@ 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 # FIXME: These should be done inside of a fixture so that they're only mocked during
# these unittests # these unittests
sys.modules['hpOneView'] = Mock() if 'hpOneView' not in sys.modules:
sys.modules['hpOneView.oneview_client'] = Mock() sys.modules['hpOneView'] = Mock()
sys.modules['hpOneView.oneview_client'] = Mock()
ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview' ONEVIEW_MODULE_UTILS_PATH = 'ansible_collections.community.general.plugins.module_utils.oneview'
from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException, from ansible_collections.community.general.plugins.module_utils.oneview import (OneViewModuleException,

View file

@ -7,8 +7,10 @@ __metaclass__ = type
import pytest import pytest
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_datacenter_info import DatacenterInfoModule
from .hpe_test_utils import FactsParamsTest 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( PARAMS_GET_CONNECTED = dict(
config='config.json', config='config.json',

View file

@ -5,9 +5,11 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __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.tests.unit.compat import unittest
from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_enclosure_info import EnclosureInfoModule 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' ERROR_MSG = 'Fake message error'

View file

@ -11,6 +11,7 @@ import yaml
from ansible_collections.community.general.tests.unit.compat import unittest, mock from ansible_collections.community.general.tests.unit.compat import unittest, mock
from .oneview_module_loader import EthernetNetworkModule from .oneview_module_loader import EthernetNetworkModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import OneViewBaseTestCase from .hpe_test_utils import OneViewBaseTestCase
FAKE_MSG_ERROR = 'Fake message error' FAKE_MSG_ERROR = 'Fake message error'

View file

@ -8,6 +8,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import EthernetNetworkInfoModule from .oneview_module_loader import EthernetNetworkInfoModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import FactsParamsTestCase from .hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake message error' ERROR_MSG = 'Fake message error'

View file

@ -9,6 +9,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import FcNetworkModule from .oneview_module_loader import FcNetworkModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import OneViewBaseTestCase from .hpe_test_utils import OneViewBaseTestCase
FAKE_MSG_ERROR = 'Fake message error' FAKE_MSG_ERROR = 'Fake message error'

View file

@ -7,6 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import FcNetworkInfoModule from .oneview_module_loader import FcNetworkInfoModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import FactsParamsTestCase from .hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake message error' ERROR_MSG = 'Fake message error'

View file

@ -9,6 +9,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import FcoeNetworkModule from .oneview_module_loader import FcoeNetworkModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import OneViewBaseTestCase from .hpe_test_utils import OneViewBaseTestCase
FAKE_MSG_ERROR = 'Fake message error' FAKE_MSG_ERROR = 'Fake message error'

View file

@ -8,7 +8,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import FcoeNetworkInfoModule from .oneview_module_loader import FcoeNetworkInfoModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import FactsParamsTestCase from .hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake message error' ERROR_MSG = 'Fake message error'

View file

@ -8,8 +8,9 @@ __metaclass__ = type
from copy import deepcopy from copy import deepcopy
from ansible_collections.community.general.tests.unit.compat import unittest, mock 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 .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' FAKE_MSG_ERROR = 'Fake message error'

View file

@ -6,10 +6,11 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest 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 ( from ansible_collections.community.general.plugins.modules.remote_management.oneview.oneview_logical_interconnect_group_info import (
LogicalInterconnectGroupInfoModule LogicalInterconnectGroupInfoModule
) )
from .hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake message error' ERROR_MSG = 'Fake message error'

View file

@ -8,6 +8,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest, mock from ansible_collections.community.general.tests.unit.compat import unittest, mock
from .hpe_test_utils import OneViewBaseTestCase from .hpe_test_utils import OneViewBaseTestCase
from .oneview_module_loader import NetworkSetModule from .oneview_module_loader import NetworkSetModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
FAKE_MSG_ERROR = 'Fake message error' FAKE_MSG_ERROR = 'Fake message error'

View file

@ -7,6 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import NetworkSetInfoModule from .oneview_module_loader import NetworkSetInfoModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import FactsParamsTestCase from .hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake message error' ERROR_MSG = 'Fake message error'

View file

@ -7,6 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest, mock from ansible_collections.community.general.tests.unit.compat import unittest, mock
from .oneview_module_loader import SanManagerModule from .oneview_module_loader import SanManagerModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import OneViewBaseTestCase from .hpe_test_utils import OneViewBaseTestCase
from copy import deepcopy from copy import deepcopy

View file

@ -7,6 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.tests.unit.compat import unittest
from .oneview_module_loader import SanManagerInfoModule from .oneview_module_loader import SanManagerInfoModule
from .oneview_conftest import mock_ov_client, mock_ansible_module
from .hpe_test_utils import FactsParamsTestCase from .hpe_test_utils import FactsParamsTestCase

View file

@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
1. Clone project to `ansible_collections/community/general` 1. Clone project to `ansible_collections/community/general`
2. Change directory to the project one `cd 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 ## 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 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): 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` 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! 4. Carefully verify newly created golden output files!

Some files were not shown because too many files have changed in this diff Show more