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
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
..
compile Docs how to test (2nd) (#24094) 2017-04-28 09:08:26 +01:00
integration Add missing provider on disable eapi tasks (#26928) 2017-07-18 00:55:56 +02:00
results Create bot friendly sanity output. (#22381) 2017-03-07 14:59:50 -08:00
runner Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
sanity cloudstack: remove CloudStackException dep for several modules (#26874) 2017-07-16 22:05:14 +02:00
units Add unit tests for parted module (#24164) 2017-07-17 21:11:10 -07:00
utils Optimize running of CI cloud integration tests. 2017-07-14 22:28:14 -07:00