-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ansible-test pytest plugin loading. #62119
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins. This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests).
The ansible-test pytest plugins need to load and run earlier than conftest modules. To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded. A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process.
The -p command line option loads plugins before conftest, but only during collection. The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution.
mattclay
added a commit
to mattclay/ansible
that referenced
this pull request
Sep 11, 2019
* Avoid assertion rewriting in pytest plugins. Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins. This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests). * Run ansible-test pytest plugins early. The ansible-test pytest plugins need to load and run earlier than conftest modules. To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded. A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process. * Load pytest plugins using an env var. The -p command line option loads plugins before conftest, but only during collection. The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution. (cherry picked from commit aaa6d2e) Co-authored-by: Matt Clay <matt@mystile.com>
mattclay
added a commit
to mattclay/ansible
that referenced
this pull request
Sep 11, 2019
PR ansible#62119 was missing a changelog entry.
mattclay
added a commit
that referenced
this pull request
Sep 11, 2019
PR #62119 was missing a changelog entry.
mattclay
added a commit
to mattclay/ansible
that referenced
this pull request
Sep 11, 2019
PR ansible#62119 was missing a changelog entry. (cherry picked from commit 6c78f02)
abadger
pushed a commit
that referenced
this pull request
Sep 11, 2019
* [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) * Avoid assertion rewriting in pytest plugins. Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins. This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests). * Run ansible-test pytest plugins early. The ansible-test pytest plugins need to load and run earlier than conftest modules. To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded. A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process. * Load pytest plugins using an env var. The -p command line option loads plugins before conftest, but only during collection. The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution. (cherry picked from commit aaa6d2e) Co-authored-by: Matt Clay <matt@mystile.com> * Add missing changelog entry for ansible-test fix. PR #62119 was missing a changelog entry. (cherry picked from commit 6c78f02)
bcoca
pushed a commit
to ansible-community/collection_migration
that referenced
this pull request
Sep 13, 2019
It's been fixed upstream via ansible/ansible#62119
vasilyprokopov
pushed a commit
to vasilyprokopov/ansible
that referenced
this pull request
Sep 15, 2019
PR ansible#62119 was missing a changelog entry.
kaypeter87
added a commit
to kaypeter87/ansible
that referenced
this pull request
Sep 16, 2019
* add option to define keysize at luks partition creation (ansible#61522) * add option to define keysize at luks partition creation * Bump version_added. * Extend tests. * Remove unused import for iosxr l3_interfaces (ansible#61563) This was caught by our ansible network collections migration script. Signed-off-by: Paul Belanger <pabelanger@redhat.com> * kubevirt: also add wait_sleep (ansible#61020) * ansible#59096 Fix for not working azure_rm_aks (ansible#59097) * Set the default value for the managed_disk_type (ansible#60749) * os_server - add "tag" to instance nics (ansible#61119) A custom "tag" could be passed to the instance metadata with the nics. Add support for the "tag" to the module. * Disable Automerge (ansible#61674) A few PRs have been automerged since devel became 2.10 even though they still had `version_added: 2.9` Lets disable automerge till: a) We find a proper fix (automerge should so `rebuild_merge`?) b) We wait 7 days since devel became 1.10 to cause stale_ci * perf: reduce getting handler variables (ansible#59969) * perf: reduce getting handler variables ci_complete * Do not re-create templar * influxdb: Add support for 'path' parameter (ansible#61173) While it's possible to host InfluxDB on a different path prefix (through a reverse proxy such as nginx or traefik), the Ansible influxdb_* modules did't support that use case. The patch adds a 'path' parameter, which is passed to the influxdb Python client. Example for connecting to InfluxDB running on http://localhost/influxdb - hosts: all tasks: - influxdb_database: database_name: test path: influxdb port: 80 * Ansible FTD Module improvements and tests update. (ansible#60640) * Ansible FTD Module improvements and tests update. * Fix sanity tests * Fix formatting * luks_device.py: Allow manipulate LUKS containers with label or UUID (ansible#61603) * luks_device.py: Allow manipulate LUKS containers with label or UUID - Allow create a LUKS2 container format with label support - Allow manipulate (open, close, modify) an LUKS container based on both label (LUKS2 format) or UUID instead of using devices only. Fixes: ansible#58973 Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * test_luks_device.py: organizing tests to support labels - Add label on some tests and fix errors reported by Shippable Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * luks_device.py: adjusting versions and messages - Modifying version_added from 2.9 to 2.10 - Fixing some messages - Created a changelog fragment - Moving blkid from scope Fixes ansible#58973 Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * VMware: Fix get_tags_for_vm API in vmware_vm_info module (ansible#61697) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * feat: support postgres 11 in azure_rm_postgresqlserver (ansible#58727) * Update homebrew_cask example docs (ansible#61637) Changed homebrew_cask module flag from "allow_external_apps" to "accept_external_apps" in example section * Avoid infinite recursion on login (ansible#61617) * Remove willthames from AWS and Openshift notifications (ansible#61670) I no longer desire to be mentioned on most AWS changes. If there are modules I'm on the authors list then I'll remain notified. Also remove me from openshift and kubectl plugins, I don't use those. * Fix network resource module wording and typographical errors (ansible#61613) * Rename checkpoint to check_point due to legal reasons, fix ansible#61145 (ansible#61172) * Fix ansible#61145 * Fix type keyword * Removed file fragment * Fix missing pass of IPXe params to API client call, fixes ansible#32910 (ansible#32912) * Fix typesetting of "GitLab" (ansible#61702) * ansible-test: vcenter+Worldstream: hide password Hide the temporary password when `ansible-test` is called with the `--redact` parameter. * Clarity on mutual exclusion of Username and Token (ansible#61668) ##### SUMMARY Although there is an example showing that username is not required with personal access token, it will be nice to more clearly state in options description. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr * Remove unnecessary information (ansible#61657) * Update unit tests requirements/units.txt path (ansible#61656) * botmeta: unmaintain resmo from cloudstack (ansible#61561) * net_user documentation typo configured_password (ansible#61556) password -> configured_password in the last example * Remove duplicated word We print "%s success", so there's too much success going on. * Docs - Add Meraki to platform option list (ansible#61651) * Correct indentation of the code in the example (ansible#61622) * Fix examples for bigip_file_copy (ansible#61686) * Fix required_together statement - access_logs_s3_prefix is not required as per the documentation (ansible#52017) * adding a collection local try section (ansible#61626) * datadog_monitor: Add process alert support (ansible#60325) * grafana_plugin: update documentation (ansible#60600) * Increase unit test timeout to account for long image download times (ansible#61717) * Ecs taskdefinition secrets (ansible#60112) * adding specific examples for using environment and secrets in the container definition * version_added: '2.10' for post branch commits (ansible#61678) Due to bot automerge a few PRs were merged before version_added had been updated. ansible#61674 * docs: Update apt_key.py add requirements of gpg (ansible#61552) * docs: Update apt_key.py add requirements of gpg. The module needs to have gpg installed, otherwise it will end up with error {"changed": false, "msg": "Failed to find required executable gpg in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Co-Authored-By: John R Barker <john@johnrbarker.com> * Fixes ansible#59613 (ansible#60041) * postgresql: Move PgMembership to module_utils (ansible#61598) * postgresql: move PgMembership to module_utils * postgresql: move PgMembership to module_utils, optimize logic * Issue ansible#41447 - support AWS Aurora S3 privileges in mysql_user module (ansible#59663) * ovirt search name with space (ansible#59184) * init ovirt_search_name_with_space * add search_by_name with whitespace * add comments * Removed additional fetch from config context because it is now available in the host from Netbox v2.6 onwards (ansible#59028) * Removed additional fetch and config context as an option as it is now available in the host from Netbox v2.6 * Added config-context as an option * Fix Python 2.7 compat (ansible#58816) * Add example of "parent_group" usage in aws_ec2.py (ansible#60430) ##### SUMMARY Looks like the "parent_group" option in "keyed_groups" is a very recent feature that is not being documented. This pull request just adds a simple example of the usage of this useful feature. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr * Fix Decode Bug in Py3 (ansible#61691) * Fix Decode Bug in Py3 * Update fortios.py * Remove special char from name * Ensure full compatibility when ansible is install from Py2 * Update the rpm spec file to include ansible-test * Include ansible-test in a subpackage * Sync with the ansible engine spec file * Addresses ansible#60380 to the extent that we're likely to fix that. * Fix documentation to reflect CLI usage for collections-path (ansible#60164) * osx_defaults - doc tweaks (ansible#60881) * [osx_default] We are looking for the "defaults" executable, not "osx_defaults" * [osx_default] Add example for setting system wide default * Add ucs_query (ansible#60607) * Add ucs_query * fix sanity erros * Change version_added to 2.10 * Fix KeyError exceptions in GetLogs command (ansible#59877) * fix KeyError exceptions in GetLogs command * add changelog fragment * refine the list of LogEntry properties to collect * Fix issues and limitations in account mgmt commands (ansible#58441) * fix issues and limitations in account mgmt commands * fix pep8 and example yaml errors * remove new option and update option aliases * find next empty slot when adding user via PATCH * Read update file as utf-8 (ansible#55253) * Set win_pagefile as unstable as thats what it is (ansible#61732) * Migrate ec2_eip module to boto3 (ansible#61575) * Migrate ec2_eip module to boto3 This patch is a step towards the integration of several PRs that have attempted to migrate this code closes ansible#55190 closes ansible#45478 Follow-up PRs will address the outstanding changes made in ansible#55190 * debian: prepare the ansible-test package - Generate an extra package for `ansible-test`. - Manually install the files because CDBS get confused by our two Python packages - Refresh the package descriptions to match what is done with the RPM * Fix creation of DigitalOcean droplets using digital_ocean_droplet module (ansible#61655) * Omit disallowed 'id' attribute in request body to create a droplet * Add changelog fragment for PR ansible#61655 * Fixes IOS L3 intermittent zuul failure (ansible#61682) * fix ios l3 intermittent failure * fix self * dict to ordered dict * fix diff_again fn Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * remove orderdict as its expensive Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * update verify fn Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * Remove choices from gather_network_resources facts and fix negated all, min (ansible#61362) * remove choices from gather_network_resources facts and allow negating subset without needing to add a new subset specific for negation Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * negated all, min should not return any fact Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * add trustcacerts option for JAVA keytool (ansible#61750) * add trustcacerts option for JAVA keytool * fixed whitespace * added type in documentation * aws_s3 - wait for the bucket before setting ACLs (ansible#61735) * Wait for the bucket to become available if possible before setting ACLs * aws_codebuild tests - add retries and delay instead of a pause task (ansible#61731) - Add retries instead of a pause task - Shorten the IAM role name length - Put the IAM role name in defaults/main.yml instead - Fix the aws_codepipeline tests too * Make *_bgp modules collection safe (ansible#61761) Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix systemd start state with deactivating service state * aluvenko isn't reviewing anymore (ansible#61764) * aluvenko isn't reviewing anymore aluvenko hasn't been around for a while, so remove them * Update BOTMETA.yml * Minify theme (ansible#61734) * moved most ansible edits out of theme.css * remove unnecessary edit to theme.css * replace with upstream minified theme.css for 0.4.3 * Allow 13 asterisk characters in password field without warning (ansible#54893) On OpenBSD, 13 asterisk characters as a password hash, marks the account as disabled. Otherwise daily(8) script which executes security(8) will email operator about not properly locked accounts. Before the diff, we see following warning: > [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly. After the diff, warning is gone. * codebuild/codepipeline - fix regex for shippable resource_prefix (ansible#61783) * Fix bad assumption about shippable resource_prefix for codebuild and codepipeline tests * Update test/integration/targets/aws_codepipeline/defaults/main.yml * fix erroneous failures in docker_compose due to deprecation warnings … (ansible#61650) * fix erroneous failures in docker_compose due to deprecation warnings from docker (ansible#60961) * Update error handling to work with new method of capturing output Co-Authored-By: Felix Fontein <felix@fontein.de> * update error handling * fix syntax error * fix indentation * fix indentation (again) * remove erroneous line * Remove unused import for vyos facts (ansible#61784) This is no longer needed and can be removed. Signed-off-by: Paul Belanger <pabelanger@redhat.com> * Minify ansible (ansible#61792) * make all comments special to survive minify * minified css * Remove unused import for cisco ios facts (ansible#61790) Signed-off-by: Paul Belanger <pabelanger@redhat.com> * Fix documentation and facts_from_proxy value in the netapp_e_facts module. (ansible#61072) * s3 - improve waiting for the bucket (ansible#61802) * Proposals aren't really used much, delete it (ansible#61800) * Remove unsed import for junos facts (ansible#61787) This is no longer needed. Signed-off-by: Paul Belanger <pabelanger@redhat.com> * ec2_launch_template: Fix integration tests (ansible#61260) * ec2_launch_template: (integration tests) make sure security_token is optional * ec2_launch_template: (integration tests) add dependencies at the top level so they're pulled into the docker containers * Update Hacking Compute Policies for Launch Templates * Don't truncate the last character from galaxy urls. Fixes ansible#61624 (ansible#61775) * Remove unsed import for eos facts module (ansible#61795) Signed-off-by: Paul Belanger <pabelanger@redhat.com> * ansible-galaxy fix --server option for roles (ansible#61820) * Remove unused import from iosxr facts (ansible#61785) This is no longer needed and can be removed. Signed-off-by: Paul Belanger <pabelanger@redhat.com> * ovirt: Fix API calls in ovirt_storage_domain (ansible#61825) * Fixed argument in _attached_sds_service API * Fixed argument in _maintenance API Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Fix power command ResetType mapping logic (ansible#59927) * fix power command ResetType mapping logic * add changelog fragment * Azure _info modules: fix returned ansible_facts when called as _info (ansible#61805) * Fix Azure _info modules which still returned ansible_facts. * Adjust PR #. * Fix wrong assignment. * Reorganize code for clarity. * gitlab_hook: Update documentation (ansible#61837) * Update docs for note_events Fixes: ansible#61833 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Fix bug preventing wait_condition from being respected when using apply (ansible#61493) * Unify ios_logging documentation with accepted options (ansible#61777) * Unify ios_logging documentation with accepted options * Apply suggestions from code review Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com> * Copy suggestion over to eos_logging * documentation: modify the link to the docker.txt listing all images (ansible#61838) The file was moved. * Rebalance Azure tests groups * Fix galaxy server reference in the docs (ansible#61823) * test: disable the docker swarm tests (ansible#61816) `docker_swarm` tests tend to hang during the creation of the Swarn cluster. See: ansible#61815 * azure_rm_iothub: disable the functional test (ansible#61854) The test fails with: Operation failed with status: 'Unauthorized' This commit disable the test until the situation is resolved. See: ansible#61852 * Update hashi_vault.py documentation with kv V2 example (ansible#61221) * don't set default:None in documentation when there is no default (ansible#61111) otherwise "None" will be rendered as a string on docsite * VMware: Add disk_mode parameter in vmware_guest_disk (ansible#60406) * Solve issue 58592 Added support to select disk_mode. * Update mso_schema_template_deploy.py (ansible#61849) module names are incorrect in EXAMPLES: changed module names from 'mso_schema_template' to 'mso_schema_template_deploy' * Connect before reading the prompt? (ansible#61797) * Typo 'state:' net_lldp (ansible#61543) 'state:' should be "absent" not "lldp" * Add caution about handlers & import to Pitfalls (ansible#61060) * Add caution about handlers & import to Pitfalls on the playbooks_reuse page. The fact that handlers lose their name: when using import_tasks:, while logical, is not intuitive and should be noted. Co-Authored-By: Sandra McCann <samccann@redhat.com> * To fix IOSXR L3 Interfaces idempotency failures (ansible#61860) * fix zuul idemptency failures * adding eol Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * meraki_organization - Add warning about organization deletion (ansible#61886) * meraki_organization - Add warning about organization deletion The documentation is now more explicit about the ramifications of using `state: absent` in a task. * Fix rpm dependencies for ansible-test Needs to require ansible = version rather than ansible-version * Add tests for new alias deprecation functionality (ansible#61476) * Add tests for the alias deprecation added in ansible#61245 * ec2_vpc_subnet test cleanup (ansible#61663) * aws_vpc_subnet: (integration tests) migrate to module_defaults * aws_vpc_subnet: (integration tests) remove hard coded assumption that AZ A exists. While Amazon now tends to enable all AZs in a region, new customers in us-west-1 are only assigned 2 out of the 3 AZs, which might not include AZ a * ec2_vpc_subnet: (integration tests) General cleanup - use "is changed" rather than .changed - clean up labelling of a couple of assertions (C&P fail) * Fixup iam_group integration tests and return value documentation (ansible#61243) * iam_group: (integration tests) migrate tests to module_defaults * iam_group: (integration tests) migrate to using temporary user and group with {{ resource_prefix }} * iam_group: (integration tests) fix test, checking the return values * iam_group: (integration tests) Add some more tests around the behaviour of 'changed' * iam_group: (docs) Update documentation of iam_group return value * Update AWS testing policies to enable group/user management * Update release name for 2.10 Add a list of previously used release names to make it easy to tell what release names are no longer usable. Add a test that new release names have been added to the used list. Fixes ansible#61616 * allow external collections under the ansible NS (ansible#61908) * fixes ansible#59988 * Update os_security_group_rule.py (ansible#61262) Currently, this module does not support to add 132 SCTP rule in security group rule of openstack. Could we add this support in this module? Thanks~ * Fix ansible-connection persist after playbook run complete issue (ansible#61591) * Fix ansible-connection persist after playbook run issue * PR ansible#59153 to add support for delaying the ansible-connection added an old issue of ansible-connection persisting even after playbook run is finished till either command timeout or connect timeout is triggered. ansible-connection persist after playbook execution is done and also delays the connection initilization untill a method in invoked from module side on the connection object. * Add chanegelog * Fix mysql.py logic related to 53326 (ansible#61832) * User - correct group removal description in docs (ansible#61936) * Properly hide limit and list-hosts args from ansible-inventory (ansible#61618) * Properly hide limit and list-hosts args from ansible-inventory. Fixes ansible#61604 * Add changelog fragment * Consolidate limit * Fix positional argument with --graph * Properly error for hidden arguments * linting issue * host pattern changelog * Update the number of contributors in README: 4600+ (ansible#61949) * aws_asg: Fix idempotency when using tags and metrics (ansible#61284) * Update AWS hacking policy to enable ASG Tagging management * aws_asg: Add tests for ASG Tagging (including idempotency) * aws_asg: ignore sort order when comparing tags on the ASG (fix idempotency) * ec2_asg: (integration tests) test for idempotency when managing metrics collection * ec2_asg: sort list of enabled metrics to ensure clean comparisons. * os_port allowed_address_pairs and extra_dhcp_opts list of dicts comparison fix (ansible#56577) * compare list of dicts * update example for dhcp_server_opts to include ip_version which is automatically added by openstack * add note about dhcp_server_opts * add changelog fragment * fix forgotten exception+pass * no need to excplicitly check for None * fix oops * fix import error * missed missing_required_lib * changelog fragment formatting and grammar fixes * update requirements in documentation and fix spelling * Fixes to ecs_certificate cert chain for ansible#61738 (ansible#61858) * Fixes to ecs_certificate cert chain for ansible#61738 * Added changelog fragment * Fixes to ecs_certificate for cleaner join, and better integration test * Fix integration test formatting * End cert chain with a \n * Update changelogs/fragments/61738-ecs-certificate-invalid-chain.yaml Co-Authored-By: Felix Fontein <felix@fontein.de> * Update main.yml * docker_container: improve port range parsing error behavior (ansible#61740) * Improve port range parsing. * Add changelog. * test_cp_mgmt_address_range module (ansible#61867) * test_cp_mgmt_address_range module * fix test issues - file location - api_call is missing from facts - metclass and import items * Clean up unused imports for nxos related code (ansible#61856) Signed-off-by: Paul Belanger <pabelanger@redhat.com> * Remove unnecessary pass statement (ansible#61749) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * purefa_info: Fix failure due to API version check (ansible#61925) * atomic_image: Fix absent state (ansible#61827) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * VMware: Add new module VMware vSAN health infos (ansible#58636) * Allow junos_config changes the candidate configuration only (ansible#61969) This allows junos_config to changes the candidate configuration only and does not commit it as the active configuration at once w/ the 'check_commit' option. * fix: adds prefix length error to eos cli plugin (ansible#61747) * for capability/exchange/1.0 (ansible#60630) * for capability/exchange/1.0 * for capability/exchange/1.0 * update for shippable * Update ce.py * Update ce.py * Add collections ticket stub (ansible#62001) * Add collections ticket stub * typo Co-Authored-By: John R Barker <john@johnrbarker.com> * Debug location of ansible-connection when found (ansible#61998) * Add missed eos modules to porting guide (ansible#61994) * Fix behaviour of module_utils/ec2 compare_policies when dealing with bare bools and ints. (ansible#61115) * module_utils/ec2: (unit tests) Move unit tests for module_utils/ec2.py into test/units/module_utils - compare_policies was refactored from s3_bucket - "ec2_utils" doesn't seem to have ever existed * module_utils/ec2: (unit tests) Add unit test for comparing quoted and unquoted bools and numbers within policies As per https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html "Values are enclosed in quotation marks. Quotation marks are optional for numeric and Boolean values." * module_utils/ec2: Explicitly convert bools and ints to strings when comparing policies See also: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html * VMware: not ssl.SSLContext if validate_certs false (ansible#57185) Python < 2.7.9 does not have the ssl.SSLContext attribute. ssl.SSLContext is only required when we want to validate the SSL connection. If `validate_certs` is false, we don't initialize the `ssl_context` variable. Add unit-test coverage and a little refactoring: - avoid the use of `mocker`, when we can push `monkeypatch` which is `pytest`'s default. - use `mock.Mocker()` when possible closes: ansible#57072 * Include version_added in report.py (ansible#61857) * New module for AWS Step Functions state machines (ansible#59116) * add new module: aws_stepfunctions_state_machine * add integration tests for new module: aws_stepfunctions_state_machine * fix sanity checks * use files/ folder instead for integration test * rename role name in integration test * attempt further permissions * iam states prefix * iam integration test prefix * add iam policy for running step functions state machine actions * slightly increase iam permission scope * rename integration test folder to proper name * move main() method to end of file * move contents of integration-policy.json for state machines to compute-policy.json * make check_mode return proper changed value + add check_mode integration tests * rename module to aws_step_functions_state_machine * fix missed rename in integration test variable * add purge_tags option * bump to version 2.10 * Fix ec2_vpc_vgw broken tests (ansible#60981) * Fix ec2_vpc_vgw broken tests Add waiter function to wait for API to report detached vgw is available. Also catch extra error code in attach retry as EC2 sometimes reports that the vgw is available several seconds before permitting the attachment. Fixes: ansible#53185 * Re-enable ec2_vgc_vgw test target * VMware: Fix issue with order of changes in vmware_vcenter_statistics * win_become - don't dispose logon token until end (ansible#61905) * Allow the use of _paramiko_conn even if the connection hasn't been started. (ansible#61570) * Allow the use of _paramiko_conn even if the connection hasn't been started. I'm not sure what the benefit is of Noneing paramiko_conn on close, but will keep for now * Fix test * Try to fix up net_put & net_get * Add changelog * Fixup aws_secret integration tests (ansible#61241) * aws_secret: (integration tests) Move tests to using module_defaults * Update hacking aws security policy to enable management of secrets * aws_secret: (integration tests) Fixup integration tests - Update tests to use resource_prefix as a prefix rather than a suffix - Pause after role creation to cope with AWS being slow (and returning before the role it ready) * create-deprecated-issues script can now add to a specified project (ansible#61901) * create-deprecated-issues script can now add to a specified project * Migrate the create deprecated issues script into a subcommand of build-ansible * Remove deprecated-issue script from ignore list * Revert "shippable: temporary bump the timeout for Azure jobs" The Azure timeout should not accure anymore since 173d47d. This reverts commit aaa8835. * Update playbooks_prompts.rst (ansible#62003) Fixed typo: "wierd" > "weird" * Fix issues with ansible-test --venv option. (ansible#62033) * Fix ansible-test venv activation. When using the ansible-test --venv option, an execv wrapper for each python interpreter is now used instead of a symbolic link. * Fix ansible-test execv wrapper generation. Use the currently running Python interpreter for the shebang in the execv wrapper instead of the selected interpreter. This allows the wrapper to work when the selected interpreter is a script instead of a binary. * Fix ansible-test sanity requirements install. When running sanity tests on multiple Python versions, install requirements for all versions used instead of only the default version. * Fix ansible-test --venv when installed. When running ansible-test from an install, the --venv delegation option needs to make sure the ansible-test code is available in the created virtual environment. Exposing system site packages does not work because the virtual environment may be for a different Python version than the one on which ansible-test is installed. * openssh_keypair: make sure public key has same permissions as private key (ansible#61658) * Make sure public key has same permissions as private key. * Add changelog. * Text, not binary. * fix ci (ansible#57216) * Fix ansible-doc traceback and sanity test. (ansible#62040) * Fix ansible-doc traceback for removed modules. This avoids tracebacks with errors like the following when a module has been removed: module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment * Fix ansible-doc sanity test warning handling. Warnings about removed modules/plugins on stderr are now properly ignored. Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored. * fix(azure_rm_containerregistry): Fixed sku idempostency (ansible#61009) * issue ansible#61672: make jenkins_plugin module work in a session when CSRF … (ansible#61673) * issue ansible#61672: make jenkins_plugin module work in a session when CSRF enabled This commit modifies the signature of `fetch_url` so that a cookie jar can be specified allowing multiple calls to operate with the same session. It uses a similar construct to the `Request` class to initialise the cookie jar if it is not provided. The jenkins_plugin module is modified to create a cookie jar if CSRF is enabled. This cookie jar is then submitted with every call to fetch_url. Also changed is to submit the crumb in the request headers rather than in the data field. This has been tested with Jenkins 2.176. * issue ansible#61672: fix jenkins_script module This commit modifies the jenkins_script module to use the authorization crumb in a session in a similar fashion to the jenkins_plugin change for the same issue. * postgresql: fix typos in modules (ansible#62065) * mysql_info: fix typo (ansible#62067) * Update my handle (ansible#61966) * Update ovirt_vm.py (ansible#62072) Typo fix: "IDE" is not an acceptable choice for disk type, "ide" is a valid choice * mount: Check if src exists before mounted (ansible#61752) Fixes: ansible#59183 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * bump hcloud version to 1.4.1 (ansible#62097) * bump hcloud version to 1.4.1 `hcloud`<=1.4.0 has requirement `requests==2.20.0`. This prevents the installation of the Vcenter Automation SDK which depends on `requests>=2.22.0`. `hcloud` 1.4.1 does not have the problem: hetznercloud/hcloud-python@8bff356 Bumping the dependency will resolve the issue. * Fix ansible-test to ignore `tests/output/`. (ansible#62084) The `test/results/` directory for Ansible test output was already ignored when not using git. When Ansible Collections were switched to `tests/output/` the ignore entry was previously overlooked. * Properly exclude tests/output/ from code coverage. * AWS ec2_vpc_net: Enable ipv6 CIDR assignment (ansible#60983) * AWS ec2_vpc_net: Enable ipv6 CIDR assignment Enable IPv6 CIDRs in ec2_vpc_net, and fix ec2_vpc_subnet tests that were depending on the aws cli for CIDR assignment. Related to: ansible#27800 * hostname: Add support for Kylin linux (ansible#62053) * Add support for Kylin linux to hostname module * Work around virtualenv/venv issue in ansible-test. (ansible#62111) Creating a virtual environment using `venv` when running in a virtual environment created by `virtualenv` results in a copy of the original virtual environment instead of creation of a new one. To work around this, `ansible-test` now identifies when it is running in a `virtualenv` created virtual environment and uses the real Python interpreter to create the `venv` virtual environment. * hostname: Add support for Astra Linux Common Edition (ansible#59607) Add support Astra Linux Common Edition in hostname module * hostname: Use hostnamectl for Systemd strategy (ansible#59974) Use hostnamectl command to get current hostname for host while using systemd strategy. Fixes: ansible#59438 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Fix ansible-test coverage --all (ansible#62115) * Return commands key instead of xml in result for junos rm (ansible#62041) Fixes ansible#61773 * Change `xml` key name to `commands` key to be in sync with other platform resource modules. * lookup_rabbitmq pika > 1.0.0 is_closing bug fix (ansible#61959) * In pika v1.0.0 BlockingChannel.is_closing was removed. Updating plugin accordingly. Ref: pika/pika#1034 * Adding change fragment for is_closing bug. * Updated change fragment description. * Fix ansible-test pytest plugin loading. (ansible#62119) * Avoid assertion rewriting in pytest plugins. Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins. This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests). * Run ansible-test pytest plugins early. The ansible-test pytest plugins need to load and run earlier than conftest modules. To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded. A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process. * Load pytest plugins using an env var. The -p command line option loads plugins before conftest, but only during collection. The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution. * fix regex in plugins/terminal/iosxr.py (ansible#54817) Fixes situations where iosxr terminals that do not contain new line "/r/n" at the beginning of CLI timeouts due to regex error. Just make "/r/n" optional including "*" character in the regex * New module: zabbix_valuemap (ansible#60132) * Adding zabbix_valuemap module * Minor corrections * Fixing typos Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com> * Sorting mappings based on the 'value' field * Updating Co-Authored-By: John R Barker <john@johnrbarker.com> * Fixing "version_added" * Fix typos in database modules and their integration tests (ansible#62125) * Elaborate on note that docker-priv only works with integration (ansible#62035) * Fix test_cp_mgmt flake8 issues (ansible#62129) This commit deletes unused imports for the check_point cp_mgmt tests. * Clean up more linting errors for nxos modules (ansible#62069) This removes a few unused variables and duplicate functions being defined. Signed-off-by: Paul Belanger <pabelanger@redhat.com> * Call get_capabilities to initiate device connection (ansible#62103) * Add proper hostname cleanup for nxos tests (ansible#61810) * routeros_facts: fix for error when there's more than 10 interfaces (ansible#61376) * fix: proper regex for preprocessing routeros output * test: regression test * test: fix nondeterministic unit test * Several enhancements for Radware modules and their unit testing (ansible#61467) * Adding support for Plugin runnable type Adding support for device arrays in vdirect_runnable module. Adding "output" dictionary to the vdirect_runnable module result dictionary. * Adding support for Plugin runnable type Adding support for device arrays in vdirect_runnable module. Adding "output" dictionary to the vdirect_runnable module result dictionary. * Added zabbix module zabbix_user_info [update] Fix zabbix_user_info module to use missing_required_lib helper and add zabbix logout processing. Fixed the following issue. * ansible#58002 * ansible#58459 change version_added 2.9 to 2.10 * Added zabbix module zabbix_user (ansible#56815) This pull request adds a module to manage Zabbix users. Tested with Zabbix Server(3.0, 4.0, 4.2). * docs: avoid confusing double negation (ansible#62143) Avoid "no backward incompatible interface" term which uses a double negation and replaces it with easier "backward compatible interface" contruct. * Allow tower inventory plugin to accept integer inventory_id (ansible#61338) * Added AWS SAML Federation Module (ansible#55821) * Added AWS SAML Federation Module * iam_saml_federation: (integration tests) initial integration tests * rabbitmq_publish fix for incorrectly stating message was not published to the queue (ansible#61960) * Pika v1.0.0 and above were causing issues for publish_message. Updated to ensure publish_message works with pika 0.13.1 and 1.0.0 and above. * Adding changelog fragment for rabbitmq_publish fix. * Updating return value. * fix typos in modules (ansible#62135) * luks_device.py: allows user explicity define luks format version (ansible#61812) * luks_device.py: allow the user create LUKS based on specific versions - Allow user pass an option 'type' that explicits define the version of LUKS container that will be created. It should be 'luks1' or 'luks2' format. - If 'label' option is defined the 'type' option will be 'luks2' independently of the option 'type' informed by user. (labels NEED luks2 format) Fixes: ansible#58973 Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * added the changelog fragment Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * luks_device.py: make it fail in certain conditions - Not allow user especify luks1 type and label at the same playbook Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net> * hall: remove the module for supporting nonexistent messenger (ansible#62152) * Remove deleted file from sanity ignore list. * Add missing changelog entry for ansible-test fix. PR ansible#62119 was missing a changelog entry. * Docs formatting: recursively preprocess suboptions (ansible#61900) * Simplify code, move option massaging code into own function. * Process suboptions recursively. * Fix ansible-test collections requirements installation. (ansible#62181) * Fix location of unit test requirements. * Preserve ansible-test unit test requirements. * Remove redundant unit test requirements. * Fix location of network test requirements. * Preserve ansible-test network test requirements. * Remove redundant network test requirements. * Add missing ordereddict requirements. * Load collection requirements correctly. * Add changelog fragment. * Fix ansible-test vcenter test filtering. The default behavior of the ansible-test vcenter plugin is to use the govcsim container to run tests. However, unless the govcsim mode was specified using the VMWARE_TEST_PLATFORM environment variable, the filter code would skip the tests unless the tests ran on Shippable or the user had an ansible-core-ci key. Now the filter correctly recognizes that govcsim is the default. * Set no_log to True for junos_user encrypted_password (ansible#62184) Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Handle cases where normal commit operation throws a prompt (ansible#62132) Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * elasticache_info: fix a typo (ansible#62204) * fix typos in clustering modules (ansible#62196) * fix typos in net_tools_modules (ansible#62201) * added version support to aws_ssm lookup (ansible#61045) * fix typos in cloud modules (ansible#62194) * fix typos in cloud modules * fix typos in cloud modules, fix ci tests * Add exception handling when retrieving k8s client (ansible#60726) * svc: fix a typo (ansible#62174) * fix typos in web_infrastructure modules (ansible#62202) * fix typos in identity modules (ansible#62200) * fix typos in commands modules (ansible#62197) * Don't fail if exos can't configure cli columns (ansible#51364) * Don't fail if exos can't configure cli columns Signed-off-by: Misha Komarovskiy <zombah@gmail.com> * Revert "svc: fix a typo (ansible#62174)" (ansible#62212) This reverts commit d838a90. was not a typo, 'ed' is added later on and 'stop' goes to 'stopped' * nxos_lacp_interfaces: fix integration test dependencies (ansible#61947) * nxos_lacp_interfaces: fix integration test dependencies * Add conditional mode test to m/d/r tests * Fix bfd cmd order and test issues (ansible#61943) * [stable-2.9] fix nxos_config tests for httpapi (ansible#62082) * fix nxos_config tests for httpapi * Remove become parameter * nxos_l2_interfaces: fix for integration tests failing to setup layer2 (ansible#61887) * Add guidelines for when to use a doc_fragment (ansible#61828) * explicited RouterOS does not support connection: local (ansible#62203) * Always specify header of connection keep-alive regardless of python v… (ansible#62218) * Always specify header of connection keep-alive regardless of python version. * Add chgangelog fragment * Fixes to changelog fragment * Fixes ansible#56832: Remove warning when falling back to apt-get if aptitude is missing. (ansible#61782) * core: Handle empty extra vars in cli (ansible#61831) Fixes: ansible#61497 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * fix fact caching plugin name from json to jsonfile (ansible#62198) * typo: missing-subption-docs → missing-suboption-docs (ansible#62180) updates the name of the test and all ignore.txt entries * sanity ignores for a collection need to go to tests/sanity/ (ansible#62182) collections use tests/ not test/ as the folder for tests * document suboptions for type:list options too (ansible#62177) * openssh_keypair file permissions/ownership: add porting guide entry (ansible#62176) * Add porting guide entry for 2.9. * Add some details to any_errors_fatal documentation (ansible#62029) * Updating link for guest_id info (ansible#61988) * nxos_bfd_global - add missing import of re (ansible#62226) * ansible-galaxy - add config to control the display wheel (ansible#61902) * ansible-galaxy - add config to control the display wheel * Fix changelog and make test more stable * Don't use display thread at all if progress wheel isn't being shown * Improve documentation on doc fragments Add information and examples on how to use additional properites from a doc fragment * Remove suggestion to go caving * Add info about layering properties * VMware: Change return key `results` from VMware modules (ansible#62161) Following module used internal results key as part of return json, this commit changes this to appropriate values - * vmware_datastore_maintenancemode.py * vmware_host_kernel_manager.py * vmware_host_ntp.py * vmware_host_service_manager.py * vmware_tag.py Fixes: ansible#62083 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Update junos_config.py (ansible#62221) Add the commands alias to match UX of IOS, EOS etc. * Update BOTMETA.yml (ansible#62123) * Update junos_user.py (ansible#60459) * Add unit tests for check_point ansible modules (ansible#62213) * Update test_cp_mgmt_network.py * 17 tests * remove undefined YAML anchor (ansible#62273) * Update mitogen link (ansible#62247) * Fix for junos cli_config replace option (ansible#62131) * Fix for junos cli_config replace option * For device that support replace option by loading configuration from a file on device `config` option is not required and value of `replace` option is the path of configuration file on device. This fix allows invoking run() function in cli_config if `config` option is None and `replace` option is not boolean * The command to replace running config on junos device is `load override <filename>` and not `load replace <filename>` This is fixed in the junos cliconf plugin. * Add integration test * Standardize eos resource modules (ansible#61736) * Fix eos_l3_interfaces case sensitivity * Unify EOS module notes * Add normalize_interfaces to eos_l2_interfaces * Pull normalize_interface into eos_interfaces * Add normalize_interface to lag_interfaces * Add normalize_interface to lldp_interfaces * Add normalize_interface to lacp_interfaces * more module cleanup * Add changelog * Re-enable some docker_swarm tests. (ansible#61875) * Update default test container with Python 3.8b4 (ansible#62100) * Don't treat no checksum as a checksum match (ansible#62146) Fixes ansible#61978 * moar tests for get_url fetch behavior with existing file * add changelog fragment * Ensure we don't erase unsafe context in TaskExecutor.run on bytes (ansible#62287) * Ensure we don't erase unsafe context in TaskExecutor.run on bytes. Fixes ansible#62237 * Remove unused import * Add missing import * use args splatting for to_unsafe_text/bytes * Add security issue to changelog * fix yaml linting issue * Add httpapi VMware REST VmwareRestModule (ansible#60914) * Initial commit of VMware HttpApi REST New directory structure created for httpapi-based modules. These will live in the 'vmware_httpapi' directory under 'modules/cloud'. The AnsibleModule class was extended to create the VmwareRestModule class that lives in the 'vmware_httpapi' directory under 'module_utils'. It implements comms with the httpapi plugin, and also provides debugging output, url and filtering generation by object, and support for multiple VMware REST APIs. It also provides dynamic handling of HTTP return codes that can be tailored to each module's needs. * Add version 2.14 to the removed_in list (ansible#62298) devel is now 2.10, so this needs to be bumped as well. * revert back to contiguous (ansible#62301) * azure: re-balance tests to avoid timeout - azure_rm_azurefirewall currently takes more than 25m to run: ansible#62307 - azure_rm_manageddisk takes around 2 minutes * Add unit tests for check_point ansible modules (ansible#62214) * Update test_cp_mgmt_network.py * 18 tests * Third pr 18 tests (ansible#62215) * Update test_cp_mgmt_network.py * 18 tests * Fix display of sanity test doc links. The documentation links are now displayed when running from an install. Previously the links were only displayed when running from source. This was due to ansible-test checking for the presence of documentation files locally, which are only present when running from source. The check is no longer necessary since there is a sanity test in place to enforce the presence of documentation for all sanity tests. * Add ecs_domain module (ansible#62007) * Add ecs_domain module * Fixes to integration tests and module * Fixes to tests and module * Corrections to revalidation behavior, cna only revalidate domains in expiring. * Remove debugs for final test run, fix sanity check test fails. * Add checks for domain status * Add changelog fragment for new module. * Removed extra space in backtick * Minor fixes to make behavior more consistent and correct documentation. * Update lib/ansible/modules/crypto/entrust/ecs_domain.py Co-Authored-By: Felix Fontein <felix@fontein.de> * Update lib/ansible/modules/crypto/entrust/ecs_domain.py Co-Authored-By: Felix Fontein <felix@fontein.de> * Update lib/ansible/modules/crypto/entrust/ecs_domain.py Co-Authored-By: Felix Fontein <felix@fontein.de> * Apply suggestions from code review Co-Authored-By: Felix Fontein <felix@fontein.de> * Change casing of verification method enum, remove redundant changelog fragment * Return ov_eligible and ev_eligible fields even if false, as long as they're returned by ECS API * Remove deprecated letsencrypt alias of acme_certificate (ansible#61648) * Fix check mode support in win_group (ansible#61977) * Fix check mode support in win_group * Fix copy/paste error * Support large folder size comparisons for win_find (ansible#58466) * Support large folder size comparisons for win_find Changed [int] to [int64] to support larger folders. Otherwise module fails as soon as a large folder is encountered. * Create 58466-FIX_win_find-Bug-Get-FileStat_fails_on_large_files.yml * win_find - Fix deduped files mistaken for directories (ansible#58680) * win_find - Fix deduped files mistaken for directories * Update win_find.ps1 * Update win_find.py * Update win_find.ps1 * correct behaviour of win_iis_webapplication when no applicationpool is specified (ansible#61227) * correct behaviour of win_iis_webapplication when no applicationpool is specified * documentation for win_iis_webapplication apppool change * win_format - Idem not working if file exist but same fs (ansible#59819) * win_format - Idem not working if file exist but same fs * Test fix * Fix test assertion syntax * Update tests.yml
anas-shami
pushed a commit
to anas-shami/ansible
that referenced
this pull request
Sep 23, 2019
* Avoid assertion rewriting in pytest plugins. Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins. This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests). * Run ansible-test pytest plugins early. The ansible-test pytest plugins need to load and run earlier than conftest modules. To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded. A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process. * Load pytest plugins using an env var. The -p command line option loads plugins before conftest, but only during collection. The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution.
anas-shami
pushed a commit
to anas-shami/ansible
that referenced
this pull request
Sep 23, 2019
PR ansible#62119 was missing a changelog entry.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.10
This issue/PR affects Ansible v2.10
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
test
This PR relates to tests.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Fix ansible-test pytest plugin loading:
Resolves #62113
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
ansible-test