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
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
..
cli fixed issue with paths separator and others 2017-06-15 14:53:54 -04:00
contrib test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
errors test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
executor Return code is not very useful to assume a task failed 2017-06-27 15:40:27 -04:00
inventory INI inventory plugin: add documentation about variable types (#25798) 2017-07-13 12:04:20 -07:00
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock mock_unfrackpath_noop: handle follow parameter (#26662) 2017-07-12 10:13:25 -05:00
module_utils Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
modules Add unit tests for parted module (#24164) 2017-07-17 21:11:10 -07:00
parsing metadata and doc generator optimization and fixes 2017-07-04 01:12:43 -07:00
playbook Divided test methods of TestExtendValue class (#22574) 2017-07-17 17:47:50 -07:00
plugins Kc update ip filter (#26566) 2017-07-12 17:17:58 +01:00
template test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
utils test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
vars Fix spelling mistakes (comments only) (#25564) 2017-06-12 07:55:19 +01:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
conftest.py Fix bugs in ansible-test units command. (#24044) 2017-04-27 11:21:11 +08:00
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 2017-06-14 11:08:34 -04:00