summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [stable-2.9] Remove obsolete Shippable specific scripts.Matt Clay2021-05-045-230/+2
| | | | | | | Also remove some other unncessary code from CI scripts.. (cherry picked from commit be7de9844e8299fa529a4ffed0d293373e92b44e) Co-authored-by: Matt Clay <matt@mystile.com>
* shift a few CI groups [2.9] (#74553)v2.9.21Rick Elrod2021-05-0311-11/+11
| | | | | ci_complete Signed-off-by: Rick Elrod <rick@elrod.me>
* [stable-2.9] incidental_setup_rabbitmq test - Use official repo for ↵Sam Doran2021-05-031-2/+2
| | | | | | | | | rabbitmq-erlang (#74453) Previously it was hosted on bintray, but that service is shutting down on May 1. Using the new repository also required using a newer version of RabbitMQ.. (cherry picked from commit 62cba4a6adc666f1e0100c385de20744002e4c42) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.9] Fix pypi-test-container port conflict.Matt Clay2021-04-261-1/+0
| | | | | | (cherry picked from commit cb7f4f19717e91930f695fe0be5adc6cacf5162f) Co-authored-by: Matt Clay <matt@mystile.com>
* [ansible-test] Sync opensuse containers with 2.10 (#74436)Rick Elrod2021-04-266-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ansible-test] Sync opensuse containers with 2.10 Change: - OpenSuSE 15.1 is now EOL - Switch containers to use what 2.10 uses, which has 15.2. Test Plan: - ci_complete Signed-off-by: Rick Elrod <rick@elrod.me> * docker version Signed-off-by: Rick Elrod <rick@elrod.me> * needs p7zip-full, otherwise we only get 7zr Signed-off-by: Rick Elrod <rick@elrod.me> * Make sure py2 stays py2 Signed-off-by: Rick Elrod <rick@elrod.me> * no wildcard? Signed-off-by: Rick Elrod <rick@elrod.me> * -x instead of --xml Signed-off-by: Rick Elrod <rick@elrod.me>
* Actually run blocks/finalized_task test (#74291) (#74310)Martin Krizek2021-04-261-0/+2
| | | (cherry picked from commit 7fecb7ccc381ef61cadc2702b3df0fc73393077a)
* [stable-2.9] Fix ansible-test docker container IP detection. (#74390)Matt Clay2021-04-261-1/+7
| | | | | (cherry picked from commit 14ff5e213cd084480d628ec0562200b174b6fa79) Co-authored-by: Matt Clay <matt@mystile.com>
* Disable failing hcloud_server testSam Doran2021-04-231-0/+1
|
* [stable-2.9] Switch to hashlib.sha256() for ansible-test (#72411) (#74170)Matt Clay2021-04-121-1/+1
| | | | | | | | | | | When FIPs mode is enable on centos-8, we are not able to load md5 functions. Signed-off-by: Paul Belanger <pabelanger@redhat.com> (cherry picked from commit a95213d2f521bc281f2be102a1b7008bc6762a7c) Co-authored-by: Paul Belanger <pabelanger@redhat.com> Co-authored-by: Paul Belanger <pabelanger@redhat.com>
* [stable-2.9] validate_modules: fails with .id attribute not found (#73322) ↵Gonéri Le Bouder2021-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (#74179) * validate_modules: fails with .id attribute not found This patch addresses a problem in the `found_try_except_import` test. This module tries to identify lines like: `HAS_FOO = True` In this case, the target (`HAS_FOO`) is of type `ast.Name` and has a `id` attribute which provide the name. In my case, I've a line that set a module attribute`. In this case, the target (`module.var`) has the type `ast.Attribute` and no `id` attribute. The code trigger an `AttributeError` exception. This patch ensures we compare a `ast.Name`. * Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py (cherry picked from commit 7cf80f50d16b7a7a2ba9f1318bdca5df53936369)
* [stable-2.9] ansible-test - ensure trailing separator is added for ↵Sam Doran2021-04-121-1/+1
| | | | | | | | | connection unit test target (#74176) (#74182) For connection units tests, if the `__init__.py` file is modified, the trailing separator was not added, making the target invalid. (cherry picked from commit 7b79b69369) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.9] Add PyPI proxy container for tests on Python 2.6.. (#74206)Matt Clay2021-04-125-1/+164
| | | | | (cherry picked from commit becf9416736dc911d3411b92f09512b4dae2955c) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.9] find - set proper default based on use_regex (#73961) (#73966)Sam Doran2021-04-051-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: #50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>. (cherry picked from commit 089d0a0508a470799d099d95fc371e66756a00b3) Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> * Update fix_find_default.yml Co-authored-by: Rick Elrod <rick@elrod.me>
* add optional module_utils import support (#73832) (#73916)Matt Davis2021-04-044-6/+103
| | | | | | | | | Treat core and collections module_utils imports nested within any Python block statement (eg, `try`, `if`) as optional. This allows Ansible modules to implement runtime fallback behavior for missing module_utils (eg from a newer version of ansible-core), where previously, the module payload builder would always fail when unable to locate a module_util (regardless of any runtime behavior the module may implement). * sanity test fixes ci_complete (cherry-picked from 3e1f6484d77f2d7546952cfa22a8534d74ed3dc6)
* [stable-2.9] Ensure task from the worker is finalized/squashed (#73881) (#73929)Matt Martz2021-04-042-0/+20
| | | | | | * Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942 (cherry picked from commit 832631b) Co-authored-by: Matt Martz <matt@sivel.net>
* [security] Add more missing no_logs (#74115)Rick Elrod2021-04-041-2/+0
| | | | | | | Change: - Add missing no_log on fields and subfields which should have it. - Update several changelogs with CVE id. Signed-off-by: Rick Elrod <rick@elrod.me>
* [stable-2.9] Fix ansible-test coverage exporting.Matt Clay2021-03-302-3/+11
| | | | (cherry picked from commit b75844af4579e9f96c7a19b5e9e18d0d7cbdb684)
* Ensure unit test paths for connection and inventory plugins are based on the ↵Mark Chappell2021-03-191-3/+5
| | | | context (#73877)
* Move file needed by cs_volume test to S3Sam Doran2021-03-171-1/+1
| | | | There is a bad mirror missing the file and it is causing tests to fail.
* Update mongodb replicaset check_compatibility function (#72299)Rhys2021-03-082-1/+2
| | | * Update check_compatibility function
* Backport of https://github.com/ansible-collections/community.docker/pull/88 ↵Felix Fontein2021-03-081-4/+20
| | | | to stable-1. (#73816)
* [stable-2.9] Add AlmaLinux to the family of Red Hat-like operating systems ↵Sam Doran2021-03-081-0/+53
| | | | | | | | | | (#73541) (#73544) * Add changelog and fixtures for AlmaLinux support Co-authored-by: Christoph Schug <com+github@schug.net>. (cherry picked from commit 2f5c83dfb1855342389436e72d64cf7afe9698e6) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.9] Don't treat host_pinned as lockstep (#73484) (#73513)Matt Martz2021-03-085-0/+86
| | | | | | | | | | | | | | * [stable-2.9] Don't treat host_pinned as lockstep (#73484) * Don't treat host_pinned as lockstep. Fixes #73364 * Add intg tests. (cherry picked from commit d3f3784b86789b7b55782b0af4fba6d6bb935f19) Co-authored-by: Matt Martz <matt@sivel.net> * Make non-lockstep callback tests more deterministic (#73511) (cherry picked from commit 125c220343deb60ad64f4a412e6f670ddb511f4c)
* Backport of ↵Felix Fontein2021-03-081-0/+10
| | | | https://github.com/ansible-collections/community.docker/commit/8702713ac3cca15f8b92804e0a40f7a1ae833b7b (#73638)
* [ansible-test] attempt to work around podman (#72096) (#73570)Gonéri Le Bouder2021-03-072-3/+144
| | | | | | | | | | | | | Change: - podman > 2 && < 2.2 does not support "images --format {{json .}}" - podman also now outputs images JSON differently than docker - Work around both of the above. Test Plan: - Tested with podman 2.0.6 in Fedora 31. Signed-off-by: Rick Elrod <rick@elrod.me> Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> (cherry picked from commit 03320466995a91f8a4d311e66cdf3eaee3f44934)
* ansible-test: yamllint, check the assigment (#73584)Gonéri Le Bouder2021-03-071-1/+1
| | | | | | | | Ensure `yamllint`'s `check_assignment()` correctly ignore the attribute assignment. Those don't have any `.id` attribute and will trigger an `AttributeError` exception. See: https://github.com/ansible/ansible/pull/73322 (cherry picked from commit 0a8d5c098367a58eaff10fd5b3868f099c1e17a7)
* [stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715) ↵Matt Martz2021-03-072-4/+9
| | | | | | | | | | | | | | (#73724) * [stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715) * Normalize config parser between py2 and py3 * Add tests and changelog * Use different config entry, since we supply certain env vars. (cherry picked from commit 950ab74758a6014639236612594118b2b6f4751e) Co-authored-by: Matt Martz <matt@sivel.net>
* Move win_uri to a group that does not reboot the test instanceSam Doran2021-03-011-1/+1
| | | | | | | Another test in group3 reboots the test instance, killing the ssh connections needed for access to the httptest container. ci_complete
* Rebalance Windows test groups to avoid timeoutsSam Doran2021-02-242-2/+2
|
* Update signing key used in incidental_setup_flatpak_remote testsSam Doran2021-02-221-0/+0
| | | | | The original key was created using the default expiration time of two years. Signed the repo again using a key that expires in twenty years.
* [stable-2.9]:Fix IOSXR integration test (#73607)Ashwini Mhatre2021-02-221-1/+1
| | | * Fix integration testcase in netconf_config for iosxr
* [mongodb tests] Wait for ports in TIME_WAIT (#73655)Rick Elrod2021-02-185-69/+25
| | | | | | | | | | | | | Change: - The latest mongodb we install causes processes to not die correctly (they end up as zombies), and this causes the ports they listen on to be held in TIME_WAIT. We need to wait for them to fall out of TIME_WAIT before we can continue and use them again. Test Plan: - CI - Local playing in containers Signed-off-by: Rick Elrod <rick@elrod.me>
* Fix cryptography install in ansible-test.Matt Clay2021-02-181-0/+1
| | | | This fix is based on https://github.com/ansible/ansible/pull/73530/
* postgresql_query: fix datetime.timedelta type handling (#73520)Andrew Klychkov2021-02-071-0/+34
|
* no_log mask suboption fallback values and defaults CVE-2021-20228 (#73487) ↵Jordan Borean2021-02-075-0/+106
| | | | | (#73493) (cherry picked from commit 0cdc410dce6658e93c06fa27e0100ddbb11e7015)
* [setup_rpm_repo test] Ensure rpm-build is present (#73516) (#73515)Rick Elrod2021-02-053-0/+3
| | | | | | | | | | | | | | Change: - Other targets might remove rpm-build as they clean up after themselves. Ensure that it's present in setup_rpm_repo because rpmfluff needs it. Test Plan: - Local experimentation with yum_repository and mysql_db (the latter of which depends on a handler which was removing rpm-build) on stable-2.9. Signed-off-by: Rick Elrod <rick@elrod.me> (cherry picked from commit aca5b0e43be4d7bd067abc6631978b1cdfa75d84)
* [stable-2.9] pause - adjust warning when run in background (#73182) (#73230)Sam Doran2021-02-051-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. (cherry picked from commit 0e6c334115) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.9] facts - properly report virtualization facts for Linux guests ↵Sam Doran2021-02-052-0/+26
| | | | | | | on bhyve (#73204). (#73234) (cherry picked from commit df451636e74fe6f0021a5555392f84c2bf194432) Co-authored-by: Sam Doran <sdoran@redhat.com>
* postgresql_set: Return a message when a passed parameter has not been found ↵Andrew Klychkov2021-02-051-0/+16
| | | | | (#73286) Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
* [stable-2.9] Fix YAML error message when error is at the end of the file ↵Sam Doran2021-02-051-8/+38
| | | | | | | | | | | | | | | | | (#73241) (#73297) If a YAML file fails to load due to a syntax error in a file, or there is an error in the last line of a file, PyYAML reports the last line number of the file as the index where the error occurred. When reading the file lines, we use that index to the get the relevant line. If the index value is out of range, the relevant line is lost for error reporting. Subtract one from the index value to avoid the IndexError in this specific scenario. It is possible to still get an IndexError, which will be handled as it is currently. * Update existing tests and add new tests (cherry picked from commit e8d4b62b41) Co-authored-by: Sam Doran <sdoran@redhat.com>
* Local vars should have highest precedence in AnsibleJ2Vars (#72830) (#73369)Martin Krizek2021-02-0512-0/+77
| | | | | | | | | | | | | | | | | | | | Ability to add local variables into AnsibleJ2Vars was added in 18a9eff11f0a6e51b17405ce596bd9ff7e676320 to fix #6653. Local variables are added using ``AnsibleJ2Vars.add_locals()`` method when creating a new context - typically when including/importing a template with context. For that use case local template variables created using ``set`` should override variables from higher contexts - either from the play or any parent template, or both; Jinja behaves the same way. Also removes AnsibleJ2Vars.extras instance variable which is not used. Also adds missing test for #6653. Fixes #72262 Fixes #72615 ci_complete (cherry picked from commit a2af8432f36ec8cc5368a747f1211d2b9ba01f2e)
* postgresql_query: fix decimal handling (#73414)Andrew Klychkov2021-02-051-0/+31
| | | Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
* [2.9] Fix warning for nonexistent inventory cache (#72840) (#73444)Sloane Hertel2021-02-055-0/+84
| | | | | * Fix inventory cache warning by checking if the key exists before loading it (cherry picked from commit 840bdc1e10f1f0d3c8c0ce4109e9724b466202c0)
* [stable-2.9] Make yum_repository test more reliable (#73467)Sam Doran2021-02-0313-74/+138
| | | | | | | | | | | | | * Improve setup_rpm_repo - add handlers to remove repos - add variable to control whethere or not repos are created * Use local repo for all distros * Change repo creation script to module. (cherry picked from commit 997b2d2a1955ccb4e70f805c18dc3e227e86c678) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.9] Use a versioned pip bootstrapper in ansible-test. (#73360)Matt Clay2021-01-251-4/+1
| | | | | (cherry picked from commit fc590aeb2104c2c4e6a3aacba53852da1d7a26d9) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.9] Update ansible-test pylint Python support. (#72972) (#73355)Matt Clay2021-01-252-4/+4
| | | | | | | | * [stable-2.9] Update ansible-test pylint Python support. (#72972) * Update ansible-test pylint Python support. * Python 3.8 is now officially supported. (cherry picked from commit 37d09f24882c1f03be9900e610d53587cfa6bbd6)
* [stable-2.9] Handle get-pip.py breaking change on Python 2.7.Matt Clay2021-01-231-1/+9
| | | | | | (cherry picked from commit 484e4af4d0b0f8ba88f73c20f592bb107eb9396a) Co-authored-by: Matt Clay <matt@mystile.com>
* [2.9] Pass the top level dictionaries to combine_vars (#72979) (#73147)Sloane Hertel2021-01-114-0/+62
| | | | | | | | | combine_vars uses dict.update() to replace keys (cherry picked from commit 5e03e322de5b43b69c8aad5c0cb92e82ce0f3d17) * Add tests for merging and replacing vars from inventory sources (#73181) (cherry picked from commit 9de2da8a7ee1c0219b804b6afc7b090101106743)
* Ensure that data within a tuple is marked as unsafe (#65918) (#73044)Felix Fontein2021-01-111-2/+25
| | | | | | | | | | * Use is_sequence, and Mapping throughout, add support for tuples. Fixes #65722 * Address tests * Remove unused import * Add changelog * Add docstring for clarity (cherry picked from commit f8654de851a841d33d2d2e76942c68a758535e56) Co-authored-by: Matt Martz <matt@sivel.net>
* [stable-2.9] user - properly handle password and password lock when used ↵Sam Doran2021-01-1117-1067/+1177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | together (#73016) (#73178) 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.. (cherry picked from commit 264e08f21a15213a4db76339888d3dfa2f2d6abb) Co-authored-by: Sam Doran <sdoran@redhat.com>