summaryrefslogtreecommitdiff
path: root/hacking/tests
Commit message (Collapse)AuthorAgeFilesLines
* Port from plaform.dist to ansible.module_utils.distro.linux_distributionToshio Kuratomi2018-12-171-4/+7
| | | | ci_complete
* Update bare exceptions to specify Exception.Toshio Kuratomi2018-12-161-1/+1
| | | | | This will keep us from accidentally catching program-exiting exceptions like KeyboardInterupt and SystemExit.
* Facts distribution clear linux 31501 (#32453)Adrian Likins2018-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | The search string used to look for Clear Linux was changed in 45a9f967749ec68e2077fe1d1d32dd37660ab376 to be more specific, but was too specific. Now finding a substring match for 'Clear Linux' in /usr/lib/os-release is enough to consider a match. Since the details of the full name in os-release varies ('Clear Linux Software for Intel Architecture', 'Clear Linux OS for Intel Architecture', etc) the search string match was failing and would fall back to the 'first word in the release file' method resulting in ansible_distribution='NAME="Clear' Also add a meta fact indicating which search string was matched. Test case info from: https://github.com/ansible/ansible/issues/31501#issuecomment-340861535 Fixes #31501
* hacking/: PEP8 compliancy (#24683)Dag Wieers2017-05-161-2/+1
| | | - Make PEP8 compliant
* PEP 8 indent cleanup. (#20800)Matt Clay2017-01-291-17/+17
| | | | | | | | * PEP 8 E121 cleanup. * PEP 8 E126 cleanup. * PEP 8 E122 cleanup.
* gen_distribution_version_testcase.py should fail if ansible run fails (#17693)cinerama702016-09-261-1/+10
| | | | | | Currently, "ansible localhost -m setup" can fail silently during the run of gen_distribution_version_testcase.py, resulting in incorrect output. Use check_output() rather than communicate() and handle the exception if we get a nonzero return value.
* Add os_family to test_distribution_version (#17620)cinerama702016-09-171-1/+1
| | | | | | | | | | | As suggested in feedback on https://github.com/ansible/ansible/pull/17575, add os_family to test_distribution_version. Add the correct os_family to the existing testcase data entries. Also add os_family to the output of gen_distribution_version_testcase.py so any new generated entries will contain this data.
* Dist version fix for Red Hat and more tests (#15663)Robin Roth2016-04-291-2/+5
| | | | | | | | | | | | * add tests for centos6, rhel6 and rhel7 * gen_distribution_version_testcase with python2.6 * remove unused imports * fix redhat/vmware/... parsing * add centos7 test case
* move gen_testcase to hacking/testsRobin Roth2016-04-151-0/+65
* also use json instead of pprint