Commit Graph

9174 Commits (59f33cde8be9595e29010ab7ffab0642106dc4a7)

Author SHA1 Message Date
Matt Clay ec841a086c [stable-2.9] Redact sensitive values by default in ansible-test
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Trishna Guha b9e8a6a170 gather_facts action plugin: Fix loading network facts modules for smart gathering (#59856)
* fix smart gathering for network_os in gather_facts action plugin

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix detection of network_os for smart gathering

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* make pep8 happy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 5cd3be9129)
5 years ago
Mike Wiebe d4e577bd6d nxos_telemetry replaced state (#62368)
(cherry picked from commit b0668e17ed)
5 years ago
Sumit Jaiswal 7a668dab06 Backport PR for Check Point Unit tests for the following module from PR 62338 (#62390)
* Network and address range tests (#62338)

* commit network and address_range

* remove test_cp_mgmt_network from ignore.txt

(cherry picked from commit b4dcd7c835)

* changelog

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Sumit Jaiswal bcd63a6c92 Backport PR for Check Point Unit tests for the following module from PR 62214 (#62405)
* Add unit tests for check_point ansible modules (#62214)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 271825cfaf)

* changelog
5 years ago
Sumit Jaiswal fed6c0ace6 Backport PR for Check Point Unit tests for the following module from PR 62213 (#62386)
* Add unit tests for check_point ansible modules (#62213)

* Update test_cp_mgmt_network.py

* 17 tests

(cherry picked from commit c7f9c3f27e)

* changelog
5 years ago
Egor Zaitsev a48f8f229e routeros_facts: fix for error when there's more than 10 interfaces (#62346)
* routeros_facts: fix for error when there's more than 10 interfaces (#61376)

* fix: proper regex for preprocessing routeros output

* test: regression test

* test: fix nondeterministic unit test

* changelog
5 years ago
Sumit Jaiswal 4df7faa213 Backport PR for Check Point Unit tests for the following module from PR 62216 (#62389)
* changelog

* Forth pr 18 tests (#62216)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit ebdf78d6e4)

* fix eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Sumit Jaiswal 347c10c5ff Backport PR for Check Point Unit tests for the following module from PR 62215 (#62388)
* Third pr 18 tests (#62215)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 3a5c68205c)

* changelog
5 years ago
Sumit Jaiswal 1148e68049 Backport PR for Check Point Unit tests for the following module from PR 62322 (#62385)
* Commands tests (#62322)

* commands tests

* add space in order to delete it and tun shipable tests again

* delete space in order to run shipable tests again

(cherry picked from commit 47cf4e6565)

* changelog
5 years ago
chkp-orso e2aaf72d6a unique tests (#62328)
(cherry picked from commit 6bb8861b0e)
5 years ago
Ganesh Nalawade e9a16d381d Change enable to enabled for junos_interfaces module (#62321)
Fixes #62319

Change `enable` option to `enabled` in junos_interfaces
and junos_lldp_interfaces
data model to be in sync with other network platform
resource modules added in 2.9 version.

(cherry picked from commit a9a5f4e40d)
5 years ago
Matt Clay 54ea1353b3 [stable-2.9] Mark AWS credentials in ansible-test as sensitive.
This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
(cherry picked from commit b73e7721df)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 7f2ba1aaf8 [stable-2.9] 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.
(cherry picked from commit 32d965e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein 34a48dc2ca Re-enable some docker_swarm tests. (#61875)
(cherry picked from commit 098a13dff4)
5 years ago
Matt Martz 20fee691e3 [stable-2.9] Don't treat no checksum as a checksum match (#62146)
Fixes #61978
* moar tests for get_url fetch behavior with existing file
* add changelog fragment
(cherry picked from commit 7d51cac)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Ganesh Nalawade f7fed1dacc Fix for junos cli_config replace option (#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

(cherry picked from commit 200ed25648)
5 years ago
Mario Lenz 9812e52682 [stable-2.9] VMware: Fix issue with order of changes in vmware_vcenter_statistics (61345) (#62088)
* VMware: Fix issue with order of changes in vmware_vcenter_statistics

* [WIP] VMware: Fix fragile sort order in vmware_vcenter_statistics (#62288)

* vmware_vcenter_statistics: Fix fragile sort order

* vmware_vcenter_statistics: Python 2.6 compatibility

(cherry picked from commit 3e4d5aeee3)
5 years ago
Mike Wiebe 54f23c7ef7 Add proper hostname cleanup for nxos tests (#61810)
(cherry picked from commit c5a4086ed7)
5 years ago
Mike Wiebe dc2dd97e7d [stable-2.9] fix nxos_config tests for httpapi (#62082)
* fix nxos_config tests for httpapi

* Remove become parameter

(cherry picked from commit c4894b512d)
5 years ago
Mike Wiebe 8df2541983 Fix bfd cmd order and test issues (#61943)
(cherry picked from commit f582d74f7c)
5 years ago
Chris Van Heuveln 6377e6c9e8 nxos_lacp_interfaces: fix integration test dependencies (#61947)
* nxos_lacp_interfaces: fix integration test dependencies

* Add conditional mode test to m/d/r tests

(cherry picked from commit 6e72893d78)
5 years ago
Chris Van Heuveln 0b771869ea nxos_l2_interfaces: fix for integration tests failing to setup layer2 (#61887)
(cherry picked from commit c0f3777fe2)
5 years ago
Andrey Klychkov 01eef82ed9 hall: remove the module for supporting nonexistent messenger (#62152)
(cherry picked from commit 8b42de29fa)
5 years ago
Matt Clay e424b1b847 [stable-2.9] 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.
(cherry picked from commit cd4882e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay c59cf1d148 [stable-2.9] Fix ansible-test collections requirements installation. (#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.
(cherry picked from commit cdc4926)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Martz 7dff7b916b [stable-2.9] Ensure we don't erase unsafe context in TaskExecutor.run on bytes (#62287)
* Ensure we don't erase unsafe context in TaskExecutor.run on bytes. Fixes #62237

* Remove unused import

* Add missing import

* use args splatting for to_unsafe_text/bytes

* Add security issue to changelog

* fix yaml linting issue
(cherry picked from commit 5be0668)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Nathaniel Case 9d6282e633 [stable-2.9] Standardize eos resource modules (#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
(cherry picked from commit 7917d4def7)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
5 years ago
Andrey Klychkov b6335a72f1 fix typos in cloud modules (#62194) (#62274)
* fix typos in cloud modules

* fix typos in cloud modules, fix ci tests

(cherry picked from commit 7e91998049)
5 years ago
Andrey Klychkov 6137cddce2 fix typos in modules (#62135) (#62169)
(cherry picked from commit 5eb5f74083)
5 years ago
Andrey Klychkov 80c39bd85b Fix typos in database modules and their integration tests (#62125) (#62172)
(cherry picked from commit bcc3620182)
5 years ago
Sandra McCann 5bcc1b6855 [backport][docs] Backportapalooza docs #2 (#62104)
* docs: Update apt_key.py, add requirements of gpg (#61552)

(cherry picked from commit 5d7d4a93c8)

* Proposals aren't really used much, delete reference from docs (#61800)

(cherry picked from commit 41055b5dc8)

* Update gitlab_hooks docs (#61837)

(cherry picked from commit 223dab99ea)

* Unify ios_logging and eos_logging documentation with accepted options (#61777)

(cherry picked from commit cc9adf7f1a)

* don't set default:None in documentation when there is no default (#61111), otherwise "None" will be rendered as a string on docsite

(cherry picked from commit 1aca1f86b6)

* Update mso_schema_template_deploy.py (#61849), correct module name in examples

(cherry picked from commit 394a05108d)

* Update hashi_vault.py documentation  with kv V2 example (#61221)

(cherry picked from commit 70f501d5c8)
5 years ago
Kevin Breit 7e3d322b54 Removed absent parameter from state due to risk 5 years ago
Matt Clay 77c2139f7e [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) (#62120)
* [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 https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.

(cherry picked from commit 6c78f02121)
5 years ago
Gonéri Le Bouder e616ce1091 [stable-2.9] bump hcloud version to 1.4.1 (#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: 8bff356efb
Bumping the dependency will resolve the issue.
(cherry picked from commit 0f52b18)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
5 years ago
Ganesh Nalawade 6ecf17ee4d Return commands key instead of xml in result for junos rm (#62041)
Fixes https://github.com/ansible/ansible/issues/61773

*  Change `xml` key name to `commands` key to be in sync with
   other platform resource modules.

(cherry picked from commit ff53ca76b8)
5 years ago
Simon Legner fba6fbb4b9 Fix typesetting of "GitLab" (#61702)
(cherry picked from commit 7dbd6116d8)
5 years ago
Jordan Borean 886843807f Fix ansible-test coverage --all (#62115)
(cherry picked from commit 6fb1d56fdc)
5 years ago
Matt Clay d9d8d55861 [stable-2.9] Work around virtualenv/venv issue in ansible-test. (#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.
(cherry picked from commit a7bc11c)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay c2387536ab [stable-2.9] Properly exclude tests/output/ from code coverage.
(cherry picked from commit 983f0ad)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 4f51852b5e [stable-2.9] Fix ansible-test to ignore `tests/output/`. (#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.
(cherry picked from commit f110abb)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sumit Jaiswal df4f0e4ec2 To fix IOSXR L3 Interfaces idempotency failures (#61860)
* fix zuul idemptency failures

* adding eol

(cherry picked from commit 1425d23513)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Matt Clay b3fbc3c156 [stable-2.9] Fix issues with ansible-test --venv option. (#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.
(cherry picked from commit c77ab11051)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Davis e628c87b29 allow external collections under the ansible NS (#61908)
* fixes #59988

(cherry picked from commit 7f4328ad12)
5 years ago
Gonéri Le Bouder 071201bf4f ansible-test: vcenter+Worldstream: hide password
Hide the temporary password when `ansible-test` is called with the
`--redact` parameter.

(cherry picked from commit 8e22a60f97)
5 years ago
Chris Trufan 1cb40e1aed Fixes to ecs_certificate cert chain for #61738 (#61858)
* Fixes to ecs_certificate cert chain for #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

(cherry picked from commit 943888b955)
5 years ago
Gonéri Le Bouder 1e32aa4354 VMware: not ssl.SSLContext if validate_certs false (#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: #57072
(cherry picked from commit 3ea8e0a144)
5 years ago
Sumit Jaiswal d2b5a08eb8 To fix and rename checkpoint to check_point due to legal reasons (#61872)
* Rename checkpoint to check_point due to legal reasons, fix #61145 (#61172)

* Fix #61145

* Fix type keyword

* Removed file fragment

(cherry picked from commit 9744ce1e1d)

* add changelogs

* adding eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Gonéri Le Bouder 124036337e azure_rm_iothub: disable the functional test (#61854)
The test fails with: Operation failed with status: 'Unauthorized'
This commit disable the test until the situation is resolved.

See: https://github.com/ansible/ansible/issues/61852
(cherry picked from commit 08e01380e6)
5 years ago
Sam Doran 622f5a248d [stable-2.9] Rebalance Azure tests groups
(cherry picked from commit 173d47d1f4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Gonéri Le Bouder ec48f1d35b [stable-2.9] test: disable the docker swarm tests (#61816)
`docker_swarm` tests tend to hang during the creation of the Swarn
cluster.

See: https://github.com/ansible/ansible/issues/61815
(cherry picked from commit 7132466327)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
5 years ago
kucharskim 4cc9ee950f [stable-2.9] Allow 13 asterisk characters in password field without warning (#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.
(cherry picked from commit 1dea661ce8)

Co-authored-by: kucharskim <mikolaj@kucharski.name>
5 years ago
Sumit Jaiswal 8141aa9a55 To fix iosxr_l3_interfaces module zuul tests (#61592)
* fix 61540

* fix utils

(cherry picked from commit 24ad1dffc9)
5 years ago
Sumit Jaiswal 58fda1632f Fixes IOS L3 intermittent zuul failure (#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>
(cherry picked from commit 2672dc9694)
5 years ago
Sam Doran 187f85f4d2 [stable-2.9] aws_codebuild tests - add retries and delay instead of a pause task (#61731) (#61771)
* [stable-2.9] aws_codebuild tests - add retries and delay instead of a pause task (#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
(cherry picked from commit 9ee0deea24)

Co-authored-by: Sloane Hertel <shertel@redhat.com>

* codebuild/codepipeline - fix regex for shippable resource_prefix (#61783)

* Fix bad assumption about shippable resource_prefix for codebuild and codepipeline tests
* Update test/integration/targets/aws_codepipeline/defaults/main.yml

(cherry picked from commit d5c8d325e4)
5 years ago
Jordan Borean 682c3674b8 Set win_pagefile as unstable as thats what it is (#61732)
(cherry picked from commit 00add5b668)
5 years ago
Sam Doran 23ea477734 [stable-2.9] Increase unit test timeout to account for long image download times (#61717)
(cherry picked from commit c9e7a2122d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 53db5020b6 Update Fedora 29 test image
(cherry picked from commit 3d78dad84b)
5 years ago
Felix Fontein e9e8d2b5d6 Make sure postgresql tests are run for all postgres_* modules (#61647)
(cherry picked from commit 4d057e0331)
5 years ago
René Moser bbf268c451 [stable-2.9] apt: honor cache_update=false on auto-install deps (#56549)
* apt: honor cache_update=false on auto-install deps
* add porting guide
(cherry picked from commit fd4ff54580)

Co-authored-by: Rene Moser <mail@renemoser.net>
5 years ago
Sam Doran dc5f369245 [stable-2.9] ansible-test - Continue if the git command returns an error (#61605)
* ansible-test - Contiune if the git command returns an error

* Just return stdout

* Use to_text() when displaying exception

* Add a message property to SubprocessError
(cherry picked from commit e218c98)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Matt Clay e9310c1a44 [stable-2.9] Fix ansible-test coverage path handling. (#61528) (#61593)
* [stable-2.9] Fix ansible-test coverage path handling. (#61528)

* Fix ansible-test coverage path handling.
* Split CI unit tests into two groups.
(cherry picked from commit e4e5005640)

Co-authored-by: Matt Clay <matt@mystile.com>

* Add changelog fragment.
5 years ago
Matt Clay 72d93259e7 [stable-2.9] Use relative submodule status in ansible-test.
The `git submodule status` command is relative to the current git repository by default.
When running from a repository subdirectory paths can be returned above the current directory.
Specifying the current directory with `git submodule status` avoids listing submodules above that directory.

This will fix issues when testing a collection that is rooted below the repository root when that repository uses submodules.
(cherry picked from commit 4063d58339)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Jordan Borean c6996727ba Skip certain tests on 2016 (#61585)
(cherry picked from commit 3bd69a47ec)
5 years ago
Jordan Borean a271cb6136 Azure fix _info/_facts return values for some modules (#61584)
* Azure fix _info/_facts return values for some modules

* Further test fixes

* securitygroup fixes after the move to _info module

(cherry picked from commit 951dac7691)
5 years ago
Jordan Borean a8023c52d9 Galaxy refactory 2.9 (#61581)
* Refactor galaxy collection API for v3 support (#61510)

* Refactor galaxy collection API for v3 support

* Added unit tests for GalaxyAPI and starting to fix other failures

* finalise tests

* more unit test fixes

(cherry picked from commit a7fd6e99d9)

* Added changelog fragment
5 years ago
Mike Wiebe 02572cb9ec Rewrite nxos_file_copy as an action plugin (#60643)
* Initial nxos_file_copy action plugin work
* Remove code from nxos_file_copy module
* Add file_push and file_pull support
* Additional refactoring and shipable updates
* Simplify outcomes and update doc header
* Add more error data information for easier debugging
* Reorder outcomes and add additional tests
* Capture more data for permission denied outcome
5 years ago
Matt Clay 2215a62057 Fix ansible-test handling of submodules.
Resolves https://github.com/ansible/ansible/issues/61550
5 years ago
Ganesh Nalawade b03fc093b4
Rename junos_lldp_global enable option to enabled (#61551)
*  Change `enable` option to `enabled` option to be in
   sync with other platforms
5 years ago
Toshio Kuratomi 68fa03138c Revert "New Module: NetApp Account (#59939)"
This reverts commit 6a8dcb8fcb.

Reverting this as it breaks CI for azure (more permissions would be
needed for our account)
5 years ago
Paul Belanger f23bb6f7bd Properly load module_prefix for collections in task_executor.py (#60420)
* Properly load module_prefix for collections

Now that we are using collections for tasks, we need to properly split
the name and load the prefix properly.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>

* Add unit tests for task_executor

This commit adds missing unit tests for action handler in test_task_executor.

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
5 years ago
Chris Archibald 6a8dcb8fcb New Module: NetApp Account (#59939)
* netapp account module for azure

* netapp account module for azure

* fixes

* fixes

* add requirements

* add requirements

* fix issues

* add units

* add units

* updates

* updates

* fixes

* fixes

* fies

* fixes
5 years ago
Diane Wang 54b108175b VMware: add support for multiple CD-ROMs (#51120)
Add support for create or re-configure VM with multiple CD-ROMs attaching to IDE controller now, will implement SATA controller support later.
parameters can be set as below:

    cdrom:
    - controller_type: ide
      controller_number: 0
      unit_number: 0
      type: client
5 years ago
Felix Fontein 0c592c8225
CloudStack modules: rename _facts -> _info (#61090)
* Rename cloudstack _facts -> _info

* Add changelog.

* Fix errors due to overloaded get_result having different parameter names.

* Fix examples.

* Change debug tasks.

* Remove unneeded code.

* Change from rename -> deprecate+new module.

* Make cs_zone_info return a list.

* Make cs_instance_info return a list.

* Fix return value docs.

* Fix typo.

* Improve tests.

* Fix cs_zone_info.

* Linting.

* Fix alias/option switch.

* Fix version numbers.

* Extend docs.
5 years ago
René Moser 9b5528ab8e
cloudscale_volume: refactor to implement tags support (#61531) 5 years ago
Nathaniel Case 41e4ece44b
Defer passlib dependency from plugins/filter/network.py (#59304)
* Defer passlib dependency from plugins/filter/network.py to what utils/encrypt.py provides.

* Revert test changes now that passlib is optional
5 years ago
Sumit Jaiswal 4d73c7b397
Resource module for iosxr_l3_interfaces (#60464)
* iosxr_l3_interfaces module
5 years ago
Zim Kalinowski 68f34351fc
Rename remaining facts -> info (#61516)
* rename remaining stuff

* links

* fixed link

* sanity fixes

* too many lines

* fixed link

* fixed link again

* delete mistake

* fixed ignore

* fixed ltl

* fixed trailing whitespace
5 years ago
Matt Clay f90587069c
Update collections integration targets path. (#61523)
* Update collections integration targets path.

* Fix integration path handling.

* Add collections test target fallback.

Also add warnings and errors for common path mistakes.

* Improve role target detection.
5 years ago
Matt Clay 032bd3a030 Move the ansible-test output_dir.
This directory is currently a fixed location to make troubleshooting easier.
It is cleared before each test target runs, but is preserved when a test target finishes.
This allows the contents to be inspected when a test fails.

The previous location was `~/ansible_testing/`.
The new location is within the content root:

- `test/results/.tmp/output_dir` for Ansible
- `tests/output/.tmp/output_dir` for Ansible Collections

Moving the directory reduces the number of places on the filesystem where tests create output.
It also enables the results to be returned from delegated systems.
5 years ago
Matt Davis d81ae27a4a
Collection role relative deps (#61517)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* disable default collection test under Windows

* enable collection search for role dependencies

* unqualified role deps in collection-hosted roles will first search the containing collection
* if the calling role has specified a collections search list in metadata, it will be appended to the search order for unqualified role deps

* disable cycle detection unit test

* failing on 3.7+, needs proper cycle detection
* see #61527
5 years ago
smile37773 7bb0556334 Rename Azure modules: facts -> info (#61505)
* rename

* add symlink

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename
5 years ago
ndclt 649d612d64 keycloak: improve testability of authentification (#57611) 5 years ago
Sam Doran 48a67f4465 Fix race condition in test_sunos_get_uptime_facts
Mock time.time() to return consistent time value.
5 years ago
Sam Doran e5b24a68cc Add additional group for sanity tests
Put validate-modules in its own group
5 years ago
Zim Kalinowski 35c76ae0d3
Rename dtl and db _facts --> _info (#61496)
* rename modules

* created links

* fixed sanity

* removed unnecessary ignore rules

* added depreciation warning

* update ignore.txt to match

* removed unnecessary ignore rules

* update ignore.txt to match

* make ignore.txt same as in devel

* cr

* additional sanity
5 years ago
Matt Clay d92e2a6b0e
Simplify ansible-test target processing. (#61506)
* Clean up layout paths for integration tests.

* Remove "special" integration test target type.

* Remove unnecessary role detection logic.

* Remove support for non-sh runme scripts.

* Simplify reading of aliases.
5 years ago
Chris Archibald 799b0fac52 New module: cvs snapshots for aws (#61023)
* New module: cvs snapshots for aws

* fixeS
5 years ago
Chris Archibald 53b2a261de new module: Cloud Volumes for AWS, active Directory (#61342)
* new module

* fixes

* update
5 years ago
Chris Van Heuveln f890c9692f nxos_bfd_interfaces: new module (#61407)
* bfd_interfaces: initial commit

* fix state methods, add more UT

* Add integration tests, support for N6K

* minor comment cleanups

* lint 1

* lint 2

* lint 3

* lint 4

* lint 5

* retrigger shippable

* retrigger shippable

* PR review updates: /bfd_echo/echo/, updated tests

* fix overridden logic and integration test
5 years ago
Chris Archibald 9f006dd8c7 new module netapp csv pools for aws (#61340)
* new module cvs pools

* fixes

* updates

* fixes

* fixes

* fixes
5 years ago
Matt Clay ed46f83905 Fix paths in sanity tests. 5 years ago
Chris Archibald 4879cf8fff new module: Cloud Volume for AWS FileSystems (#61343)
* new module"

* fixes

* updates
5 years ago
Matt Clay 81ca44b7e5 Change location of collections tests.
The directories used for collections tests are changing as follows:

`test/` -> `tests/`
`test/results/` -> `tests/output/`

This is a breaking change for collections tests executed by ansible-test.
All collections will need to be updated to use the new directory.

The `tests/output/` directory should be added to the `.gitignore` or equivalent in each collection.

This change is being made before the first pre-release of Ansible 2.9 since ansible-test has not yet been shipped.
Using the `tests/` directory matches the other collections directories `plugins/` and `roles/`.

This resolves https://github.com/ansible/ansible/issues/60218
5 years ago
Matt Clay 460b583dff Improve ansible-test --venv error handling.
This allows it to fall back to virtualenv when venv is broken.
5 years ago
James Cammarata 51b33b79c0
T woerner max concurrent (#60702)
* play, block, task: New attribute forks

With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.

The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.

A warning has been added because of the conflict with run_once. forks will
be ignored in this case.

The forks limitation in StrategyBase._queue_task is not used for the free
strategy.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Handle forks in free strategy

The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Test cases for forks with linear and free strategy

With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Changing forks keyword to throttle and adding some more docs
5 years ago
Matt Davis 7d1a981b61
default collection support (#61415)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* ignore bogus sanity error

* filed #61460

* fixed task unit test failure

* don't append an empty collections list to the ds

* ignore leftover local_action in mod_args ds action parsing

* fix async_extra_data test to not require ssh and bogus locale

* disable default collection test under Windows

* ensure collection location FS code is always bytes

* add changelog
5 years ago
robertchung caa5abdfc9 Fix TypeError in ec2_group.py for Python3 when sorting dictionary list (#59844)
* Fix TypeError in ec2_group.py for Python3 when sorting dictionary list

* Using json.loads() and dumps() to replace sorting

* Bug fixes for ec2_group.py

* Dictionaries cannot be compared/sorted in Python3

* Diff will occur when the IpPermissions have the same IpRanges but have different ordering

* 'before' will be sorted by 'Type' with high priority than 'IP', but 'boto3.describe_security_groups()' function cannot get 'Type' from Amazon

* Add some basic diff mode testing to exercise the rule-sorting code
5 years ago
Sam Doran 8dd79fbbd2 Show doc URL for sanity test failures 5 years ago
Matt Clay 4afe757f93
More ansible-test path handling updates. (#61484)
* Move test results vars into layout.

* Add test_path to layout.

* Add sanity_path to layout.

* Clean up layout.

* Update change classification.

* Improve classification layout.

* Relocate common classification code.

* Use is_subdir for relocated code.

* Relocate ansible test/units/compat/ hack.

* Fix variable shadowing.

* Remove unused code.

* Fix ordering of path tests.

* Clean up ansible classification.

* Fix hard-coded plugin paths in classification.

* Relocate more common classification.

* Fix logic.

* Fix pylint issue.

* Add missing licenses classification.
5 years ago