summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix inventory source parse error handling (#73160)Brian Coca2021-01-181-0/+12
| | | | | fixes #51025 added test cases
* Allow restricting config values to enumerated list (#73162)Brian Coca2021-01-141-1/+1
| | | | | | | * Allow restricting config values to enumerated list * dont document internal entries * also ignore private defs for ansible-config * remove invalid value from tests * added porting entry
* update rstcheck and sphinx versions in contraints (#73176)Sandra McCann2021-01-141-1/+2
| | | | * update rstceck and sphinx versions in contraints * fix test error
* Add integration tests to ansible-galaxy-collection for 'ansible-galaxy ↵Sloane Hertel2021-01-143-0/+278
| | | | collection verify' (#73229)
* facts - properly report virtualization facts for Linux guests on bhyve (#73204)Sam Doran2021-01-142-0/+28
|
* pause - adjust warning when run in background (#73182)Sam Doran2021-01-141-6/+19
| | | | | | | | When the pause module is run in the background and seconds parameter is provided, do not warn. * Add tests * Fix existing tests The test wasn't failing when it should have.
* [facts] Differentiate CentOS vs CentOS Stream (#73034)Rick Elrod2021-01-132-0/+100
| | | | | | | | | | | | | | | | | | | Change: - On CentOS Stream, make distribution_release be "Stream" - On CentOS Core, it continues to be "Core" - Implement custom distribution file parser for CentOS, so we can look for "CentOS Linux" and "CentOS Stream" - Two new fixtures introduced (CentOS Linux 8.1 and CentOS Stream 8) - Removed two dicts from `Distribution` class that were seemingly not used anywhere. Test Plan: - ci_complete - New test fixtures Tickets: - Fixes #73027 Signed-off-by: Rick Elrod <rick@elrod.me>
* Remove obsolete `tower` plugin from ansible-test.Matt Clay2021-01-133-274/+0
|
* Make `test_adhoc` succeed from within a git checkoutAlexander Sowitzki2021-01-131-1/+1
| | | | | | | | | The test currently only expects the literal `ansible` followed by a semver in the first output line of `ansible --version`. When running from within a git checkout, additional information like the currently checkout branch are attached, which lets the test fail. This commit allows arbitrary information to follow the semver.
* Make `test_prepare_multipart` succeed on non Debian distrosAlexander Sowitzki2021-01-132-1/+2
| | | | | | | | | `test_prepare_multipart` fails in non Debian environments since Debian installations map the file ending `.key` to the MIME type `application/pgp-keys`, which is not IANA conformant. This commit explicitly sets the corresponding file type to `application/octet-stream` and adjusts the expected serialized result.
* Cleanup provisioning code in ansible-test. (#73207)Matt Clay2021-01-139-169/+75
| | | | | | | | | | | * Remove unused code in ansible-test. * Remove obsolete endpoint logic from ansible-test. * Remove obsolete region selection in ansible-test. * Remove obsolete port logic in ansible-test. * Clean up ansible-test remote providers.
* Add tests for merging and replacing vars from inventory sources (#73181)Sloane Hertel2021-01-114-0/+62
|
* iptables: Added set module/match_set support (#72984)Martin Zimmermann2021-01-111-0/+63
|
* Add macOS 11 to CI (#72622)Sam Doran2021-01-115-0/+3
| | | | | * Fix connection_paramiko_ssh test for macOS 11 * Update Azure Pipelines config * Add changelog
* user - properly handle password and password lock when used together (#73016)Sam Doran2021-01-1117-1117/+1207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do the right thing on Linux when password lock and a password hash are provided by writing out the password hash prepended by the appropriate lock string rather than using -U and -L. This is the correct way to set and lock the account in one command. On BSD, run separate commands as appropriate since locking and setting the password cannot be done in a single action. FreeBSD requires running several commands to get the account in the desired state. As a result, the rc, output, and error from all commands need to be combined and evaluated so an accurate and complete summary can be given at the end of module execution. * Improve integration tests to cover this scenario. * Break up user integration tests into smaller files * Properly lock account when creating a new account and password is supplied * Simplify rc collection in FreeBSD class Since the _handle_lock() method was added, the rc would be set to None, which could make task change reporting incorrect. My first attempt to solve this used a set and was a bit too complicated. Simplify it my comparing the rc from _handle_lock() and the current value of rc. * Improve the Linux password hash and locking behavior If password lock and hash are provided, set the hash and lock the account by using a password hash since -L cannot be used with -p. * Ensure -U and -L are not combined with -p since they are mutually exclusive to usermod. * Clarify password_lock behavior.
* Document install_python_apt option of apt_repository (#72959)Felix Fontein2021-01-081-3/+0
| | | | | | | | * Update lib/ansible/modules/apt_repository.py * Remove unnecessary ignored sanity tests Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> Co-authored-by: Amin Vakil <info@aminvakil.com>
* Update pip integration test to use venv on py3.Matt Clay2021-01-082-14/+24
|
* ansible-test - No virtualenv install on Python 3Matt Clay2021-01-081-3/+11
| | | | | | | Tests should use the Python built-in ``venv`` module on Python 3 instead of the standalone ``virtualenv`` module. On Python 2 the ``virtualenv`` module continues to be the only option. The version installed is either the OS packaged version or the last release to support Python 2, which is version 16.7.10.
* [dnf] Make "remove" filtering closer to dnf CLI (#73033)Rick Elrod2021-01-072-0/+69
| | | | | | | | | | | | | | | Change: - Internally, use dnf.subject.Subject#get_best_query for state: absent - Add a bunch of tests for removing packages, given a bunch of different pkg specs (nv, nvr, nvra, wildcard, etc.) Test Plan: - New tests - Local experiments with DNF API via PDB. Tickets: - Fixes #72809 Signed-off-by: Rick Elrod <rick@elrod.me>
* Refactor ansible-test cryptography install code.Matt Clay2021-01-071-15/+25
|
* Add support for argument_specs attribute to RoleMetadata class (#73120)David Shrewsbury2021-01-071-0/+2
|
* galaxy: handle plus sign in user token appearing in role url (#73057)Abhijeet Kasurde2021-01-061-0/+88
| | | | | Fixes: #45475 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* [ansible-test] Add Fedora 33 support and drop F31Rick Elrod2021-01-065-32/+42
| | | | | | | | | | | | Change: - Changes to make F33 work with current tests - Add F33 to docker.txt - Add F33 to AZP config Test Plan: - ci_complete Signed-off-by: Rick Elrod <rick@elrod.me>
* Add ansible-galaxy-collection-scm tests for requirements.yml (#73029)Sloane Hertel2021-01-059-0/+125
| | | | | | | * Add ansible-galaxy-collection-scm tests for requirements.yml format * Add a test for --no-deps Fix assertion
* [facts] fix version facts on FreeBSD RC/PRERELEASE (#73020)Rick Elrod2021-01-051-0/+39
| | | | | | | | | | | | | | Change: - The FreeBSD release can contain -RC or -PRERELEASE in addition to -RELEASE, -STABLE, or -CURRENT. Test Plan: - Added new fixed from an RC version of TrueNAS which uses a -PRERELEASE version of FreeBSD. Tickets: - Fixes #72331 Signed-off-by: Rick Elrod <rick@elrod.me>
* Constrain pexpect and ptyprocess (#73109)Sam Doooran2021-01-045-3/+13
| | | | | | The recent update of ptyprocess to 0.7.0 is incompatible with Python 2.6 and is causing test failures. * Add setup_pexpect role to expect test
* [get_url] skip checksum during --check (#66700)pva2020-12-221-0/+9
| | | | | | | | Fix get_url failure in check mode (--check) when using the checksum format <algorithm>:<url>. Regression introduced in (#20532) Fixes: #61369
* ensure unsafe writes fallback (#70722)Brian Coca2020-12-214-0/+65
| | | | | | | * Ensure we actually fallback to unsafe_writes when set to true add integration test add fix for get_url not passing the parameter from args
* arg_spec - move validator lookup method to a function (#72667)Sam Doooran2020-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arg_spec - move type checking lookup method to a function * Change get_wanted_type name and behavior Change the name to get_validator to bette describe what it is doing. Change the interface to always return a value. This lines up with the behavior of get_* functions always returning something or None and check_* functions raising an Exception if something went wrong during the check. * Add param to check_type_str() Not meant to be a long term fix, but gets tests passing. More work is needed to figure out how to solve this cleanly. * Remove private attribute mapping types to validator Since the function that needs it has moved to parameters.py, there is no need to have it as a attribute of AnsibleModule. Update tests that were referencing the private attribute. * Use private method for 'str' type To avoid having to put the string conversion warning behavior in the check_type_str() method, use the private _check_type_str() method for 'str' type. Import CHECK_ARGUMENT_TYPES_DISPATCHER for backwards compalitibility and store it as a private attribute. Revert changes to support plugins that are referencing serf._CHECK_ARGUMENT_TYPES_DISPATCHER. * Add changelog * Change function name to better reflect its... function * Change dict name to better reflect its contents CHECK_ARGUMENT_TYPES_DISPATCHER --> DEFAULT_TYPE_VALIDATORS * Fix changelog
* systemd - do not overwrite unit name when searching (#72985)Sam Doooran2020-12-176-64/+135
| | | | | | | | | | | | | | | | | | | | * systemd - do not overwrite unit name when searching PR #72702 introduced a bug that changed the unit name when splitting it up for the purpose of searching for the unit. This only happens on unit file templates on systems that have a 5.8 or newer kernel and a version of systemd that does not contain a bugfix that causes systmed to fail to parse dbus. * Use facts rather than a manual probe to determine if systmed is present * Remov unnecessary block * Use vars files instead of set_fact * Add tests for using a templated unit file * Update changelog fragment * Use template to get correct path to sleep binary
* import_playbook - change additional params to deprecation (#72987)Sam Doooran2020-12-172-2/+2
| | | | | | | * import_playbook - change additional params to deprecation I incorrectly recommended this be set as a warning when it should have been a deprecation. * Fix deprecation sanity test to not required a collection name when not inside a collection
* Allow key None to prevent errors with import test.Felix Fontein2020-12-171-1/+1
|
* ansible-test - prefer venv over virtualenv on Python 3 (#73000)Sam Doooran2020-12-173-11/+15
| | | | | | | Also pin virtualenv to 16.7.10 for older Mac OS X systems. This was the version being installed anway with the previous constraint (<20). On systems with Python 3, now prefer venv over virtualenv. Test to see if venv is functional since some systems have a non-functional venv installation (such as Debian).
* Update ansible-test pylint Python support. (#72972)Matt Clay2020-12-156-4/+35
| | | | | | | * Update ansible-test pylint Python support. * Python 3.8 is now officially supported. * Python 3.9 is now skipped with a warning.
* Compare removal and deprecation dates and versions in runtime metadata ↵Felix Fontein2020-12-151-35/+117
| | | | | | | | | against current version and today (#72625) * Check deprecation and removal versions w.r.t. current version. * Check removal dates from tombstones w.r.t. today. * Add changelog.
* Add test for ansible-galaxy collection installSloane Hertel2020-12-151-0/+20
| | | Test installing a collection to a directory containing other collections without any metadata (#72971)
* saner path dir management (#72648)Brian Coca2020-12-152-11/+20
| | | | | | | | | * saner path dir management fixes #72628 ensure we always store paths w/o a_c Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Remove exit code from traps in testsSam Doran2020-12-141-1/+0
| | | | | | Having the trap exit with a specific code will override the exit code that caused the trap to run, which could mask errors
* Change role argspec file used by ansible-doc (#72927)David Shrewsbury2020-12-146-59/+71
| | | | | | | | | * Change role argspec file used by ansible-doc This changes the file used for role argument specs from meta/argument_specs.yml to meta/main.yml. The argument specs are expected to be in that file under the top-level entry of `argument_spec`. * Switch to argument_specs
* iptables: Adding multiport module support (#72928)Martin Zimmermann2020-12-141-0/+36
|
* Collection list site packages (#70173)Toshio Kuratomi2020-12-111-0/+11
| | | | | | | | | | | | | | * ansible-galaxy collection list and verify now utilize collections in site-packages. This is a short term fix for #70147. The long term fix needs to handle install (but that discussion is also bound up in how upgrade is going to work and where things can get installed so it's deferred for 2.11.) * Add test for ansible-galaxy collection list with site-packages * Fix sanity issue Co-authored-by: David Moreau Simard <moi@dmsimard.com> Co-authored-by: Jordan Borean <jborean93@gmail.com>
* Add a couple more tests to ansible-galaxy-collection (#72931)Sloane Hertel2020-12-103-5/+50
| | | | | | | * Test installing a dependency compatible with multiple collection requirements Test downloading a collection without dependencies * Move cleanup to the end of the test suite
* Fix reset_connection paramiko, winrm, psrp (#72688)Matt Martz2020-12-092-0/+7
| | | | | | | | | * Ensure we only reset the connection when one has been previously established. Fixes #65812 * Ensure psrp doesn't trace * winrm too * Indentation fix
* Fix cryptography constraints in ansible-test. (#72914)Matt Clay2020-12-095-4/+71
|
* Fix async interpreter parsing (#72636)Matt Martz2020-12-094-0/+21
| | | | | | | | | * Fix async interpreter parsing. Fixes #70690 * Target localhost instead of remote host * Don't forget inventory * Address shellcheck issue
* Add implicit role_complete block instead of role._eor (#72208)Martin Krizek2020-12-097-0/+32
| | | | | Co-authored-by: Matt Martz <matt@sivel.net> Fixes #69848
* vault: Read stdin data as binary on python3 (#52229)Sven Wegener2020-12-091-0/+17
| | | | | | | | On python3 sys.stdin is an encoded file object that does not support reading raw binary data. Use the supplied buffer object to do so. Signed-off-by: Sven Wegener <sven.wegener@inovex.de> Co-authored-by: Sven Wegener <sven.wegener@inovex.de>
* Address additional ansible_core rename issues (#72906)Matt Martz2020-12-082-2/+3
| | | | | * Update __requires__ to reference the correct ansible_core package name * ansible-test updates to handle the correct egg_info for ansible_core
* Fix fileglob parameter order bug (#72879)David Shrewsbury2020-12-082-0/+34
|
* Extract embedded function to RoleMixin method and add tests (#72754)David Shrewsbury2020-12-071-1/+74
| | | | * Add changelog * Simplify return