1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units/modules
Guillaume Coré 42ca1ef040 Add unit tests for parted module (#24164)
* Add unit tests for parted module

Test the current expected behavior of the module:
- mock parted() and get_device_info()
- Use some of the examples and test the 'script' passed to parted.
- mock check_parted_label() to return false, as if parted version is > 3.1
- assert get_device_info output is correct

Current implementation of the module runs parted several time while going
through all parameters (flags, name, ...). Between calls it uses get_device_info
to update the dictionary. Use check_mode for some of the tests to force module
to go through all the parameters even is dictionary is not updated.

* test_parted.py: add "name" param into expected results

since 78fff751ab, parse_partition_info
fetch the partition name. This commit adds 'name' key and value into
the expected results.
2017-07-17 21:11:10 -07:00
..
cloud [cloud] New module: AWS API Gageway module (#20230) 2017-06-05 10:25:56 -04:00
network New module: access Cisco ACI (network/aci/aci_rest) (#26029) 2017-07-17 16:32:12 +01:00
packaging test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
system Add unit tests for parted module (#24164) 2017-07-17 21:11:10 -07:00
web_infrastructure Test for _get_url_data in jenkins_plugin.py (#24905) 2017-05-22 14:40:13 -07:00
__init__.py Some algorithmic unittests for the apt and docker modules 2016-04-27 07:23:31 -07:00