Commit graph

9186 commits

Author SHA1 Message Date
Will Thames
a684bb9f5b Ensure k8s apply works with check mode (#60572)
* Ensure k8s apply works with check mode

Update the new predicted object with fields from the previous object
before applying in check mode

Don't log output of `file` with `state: absent` on huge virtualenvs!

Fixes #60510

* Use openshift client fix to improve apply for check mode

Use new apply_object method to get a better approximation
of the expected object in check mode.

Requires released upgrade to openshift

* Add changelog fragment for k8s apply check mode fix

* Update changelogs/fragments/60510-k8s-apply-check-mode.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-09-19 05:30:31 +02:00
Rohit
978def38d8
error message updated (#62536)
* error message updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* error message updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-09-19 08:34:31 +05:30
Matt Clay
1c64dba3c9 Fix plugin names for collection plugins. (#60317)
* Fix plugin names for collection plugins.

Add an integration test to verify plugin __name__ is correct for collection plugins.

* Fix collection loader PEP 302 compliance.

The `find_module` function now returns `None` if the module cannot be found. Previously it would return `self` for modules which did not exist.

Returning a loader from `find_module` which cannot find the module will result in import errors on Python 2.x when using implicit relative imports.

* add changelog

* sanity/units/merge fixes
2019-09-18 17:47:56 -07:00
Rohit
b24f7d2800
vyosnoconfig tracebackfix (#62518)
* vyosnoconfig tracebackfix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* vyos noconfig tracebackfix test cases added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml
2019-09-18 21:58:39 +05:30
Andrey Klychkov
b87b359df5 postgresql: move CI tests of *_owner, *_info, *_ping, *_query to separate targets (#62500) 2019-09-18 14:22:13 +01:00
Lukas Kämmerling
d5449eed11 tests: hcloud: Enable hcloud_floating_ip_info tests (#62494) 2019-09-18 13:55:05 +02:00
Mike Wiebe
97b15e9f0c [stable-2.9] Stabilize nxos initiated copy for nxos_file_copy plugin (#62355)
* Retry spawn connection on failure

* Add debug logs

* Additional debug logs

* Close session before respawn attempt

* More debug info and increase loops

* Remove debug info and reset error dict on reconnect

* Add epdb debuger

* Add epdb debuger

* Add epdb debuger

* Wait before sending password and close pexpect session

* Fix comment typo

* Scrub error logs

* Scrub error logs

* Add more specific initial connect pattern

* Fix shippable errors

* Dont make remote_scp_server_password a hard requirement

* Add saftey check
2019-09-18 17:07:50 +05:30
Lukas Kämmerling
fd7e156ccd Add hcloud_floating_ip module (#62409) 2019-09-18 11:26:53 +02:00
Matt Clay
3b86dc3e12
WIP - Fix ansible-doc bugs and add integration tests. (#62461)
* Add integration tests for ansible-doc.

* Enable tests that now pass

* Cleanup processing of plugin docs

* Mostly separate the steps of processing plugin docs

  1) Acquire source data
  2) Transform and calculate additonal data
  3) Format data for output
  4) Output data

  format_plugin_doc() is still mixing transformation and formatting but
  that should be fixed in a devel-only change

* Raise exceptions in _get_plugin_doc() on errors.

* Remove check to exclude on blacklisted extensions.  We already request
  only .py files

* If there is no DOCUMENTATION entry in the plugin, raise an exception
  from _get_plugin_doc().  Everywhere we use _get_plugin_doc(), this is
  treated as an error

* If there is no ANSIBLE_METADATA raise an exception as well as
  displaying of docs assumes that this has been set.

* If there is neither DOCUMENTATION nor ANSIBLE_METADATA, warn about the
  lack of METADATA and error on the lack of DOCUMENTATION.  Lack of
  DOCUMENTATION is more important so it is what the user should see.

* Add a few special cases for backwards compat.  These should probably
  be made errors in 2.10:
  * no docs but has metadata shows no documentation rather than an error
  * empty plugin file shows no doumentation rather than an error

* Simplify backwards compatibility logic.
2019-09-17 15:45:30 -07:00
Gonéri Le Bouder
b68f5b406a test: bump default-test-container
VMware VSphere SDK needs an up to date version of `pip` for the
installation step. With the current image, we face the following error:

```
(...)
02:27 Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2))
02:27   Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-pm27t16b
02:33 Requirement already satisfied: pyvmomi in /usr/local/lib/python3.6/dist-packages (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 1)) (6.7.1.2018.12)
02:33 Requirement already satisfied: lxml>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from vSphere-Automation-SDK==1.4.0->-r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2)) (4.4.0)
02:33 Processing ./\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl
02:33 Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/root/ansible/\\\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl'
```

Bump default-test-container to 1.9.3 to get an up to date release of
`pip` (was 19.0.2, is now 19.2.3).
2019-09-17 17:35:57 -04:00
Gonéri Le Bouder
459677877a hcloud_networ_info: be more resilient is network already exists
We may already have an existing network or subnet. This commit ensures
we don't raise an error in this case.
e.g: https://app.shippable.com/github/ansible/ansible/runs/143559/145/tests
2019-09-17 16:20:38 -04:00
Matt Clay
9f7b124a6f Mark ansible-test cloud credentials as sensitive. 2019-09-17 13:08:14 -07:00
Christian Clauss
23c7bf6481 Fix access to exception using Python 3 scoping rules (#62268) 2019-09-17 13:28:37 -04:00
Gonéri Le Bouder
edf15b346f test: disable hcloud_floating_ip_info
Temporarily disable `hcloud_floating_ip_info`, this until #62414 is
resolved.
2019-09-17 13:19:40 -04:00
Sumit Jaiswal
9addad0f4a
fix ios_lldp_global (#62420) 2019-09-17 22:11:20 +05:30
Matt Clay
0631e057e9 Redact sensitive values by default in ansible-test 2019-09-17 08:09:17 -07:00
Trishna Guha
5cd3be9129
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>
2019-09-17 18:35:44 +05:30
Andrey Klychkov
98415dec86 postgresql_copy: move ci tests to a separate target (#62398) 2019-09-17 13:32:45 +01:00
Mike Wiebe
b0668e17ed nxos_telemetry replaced state (#62368) 2019-09-17 16:49:30 +05:30
Felix Fontein
d8d3790d6a Bump acme-test-container version. (#62381) 2019-09-17 13:06:33 +02:00
krisvasudevan
8bc397c229 Bug fixes to the Infoblox NIOS modules (#58521)
* Update nios_ptr_record to fix bug #58378

* Update to api.py to fix bug #58378 and #56856

* Update test_nios_ptr_record.py to fix bug #58378

* Update nios_ptr_record_idempotence.yml to fix bug #58378

*  Update test_nios_ptr_record.py to fix bug ansible#58378
2019-09-17 09:45:50 +05:30
Matt Clay
b73e7721df Mark AWS credentials in ansible-test as sensitive.
This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
2019-09-16 20:21:23 -07:00
Gonéri Le Bouder
6d8743d5f1 test: temp disable azure_rm_azurefirewall
Disabled `azure_rm_azurefirewall` until #62307 is fixed.
2019-09-16 21:24:30 -04:00
Gonéri Le Bouder
d4738596ce test: cleanup sanity/ignore.txt to avoid A100
See: https://app.shippable.com/github/ansible/ansible/runs/143332/5/console
```
21:30 ERROR: Found 1 validate-modules issue(s) which need to be resolved:
21:30 ERROR: test/sanity/ignore.txt:1608:1: A100: Ignoring 'option-incorrect-version-added' on 'lib/ansible/modules/cloud/openstack/os_keystone_endpoint.py' is unnecessary (75%)
21:30 See documentation for help: https://docs.ansible.com/ansible/devel/dev_guide/testing/sanity/validate-modules.html
21:30 ERROR: The 1 sanity test(s) listed below (out of 1) failed.
```
2019-09-16 12:10:14 -07:00
Mark Goddard
448a8c4e5f Fix os_keystone_endpoint endpoint_interface docs (#62283)
The os_keystone_endpoint module has two interface arguments -
'interface' for authentication, and 'endpoint_interface' for the
endpoint being registered. Currently the module documentation only
covers 'interface', when in fact it should cover 'endpoint_interface'
and pick up 'interface' from the standard OpenStack module parameter
documentation.
2019-09-16 11:02:43 -05:00
chkp-orso
b4dcd7c835 Network and address range tests (#62338)
* commit network and address_range

* remove test_cp_mgmt_network from ignore.txt
2019-09-16 11:03:03 +02:00
chkp-orso
6bb8861b0e unique tests (#62328) 2019-09-16 11:00:28 +02:00
chkp-orso
47cf4e6565 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
2019-09-16 13:51:21 +05:30
chkp-orso
ebdf78d6e4 Forth pr 18 tests (#62216)
* Update test_cp_mgmt_network.py

* 18 tests
2019-09-16 13:32:27 +05:30
Ganesh Nalawade
a9a5f4e40d
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.
2019-09-16 12:17:27 +05:30
Shachaf92
74a3eec1d9 win_format - Idem not working if file exist but same fs (#59819)
* win_format - Idem not working if file exist but same fs

* Test fix

* Fix test assertion syntax

* Update tests.yml
2019-09-15 22:45:44 -04:00
Chris Trufan
14bccef2c2 Add ecs_domain module (#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
2019-09-14 19:33:48 +02:00
Matt Clay
32d965e2c6 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.
2019-09-13 22:24:14 -07:00
chkp-orso
3a5c68205c Third pr 18 tests (#62215)
* Update test_cp_mgmt_network.py

* 18 tests
2019-09-14 09:39:21 +05:30
chkp-orso
271825cfaf Add unit tests for check_point ansible modules (#62214)
* Update test_cp_mgmt_network.py

* 18 tests
2019-09-14 09:38:06 +05:30
Gonéri Le Bouder
2421ad3e87 azure: re-balance tests to avoid timeout
- azure_rm_azurefirewall currently takes more than 25m to run: #62307
- azure_rm_manageddisk takes around 2 minutes
2019-09-13 18:19:01 -04:00
flowerysong
d933278f3d Add version 2.14 to the removed_in list (#62298)
devel is now 2.10, so this needs to be bumped as well.
2019-09-13 14:32:11 -05:00
Matt Martz
5be0668fb0
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
2019-09-13 13:14:35 -05:00
Matt Martz
7d51cac330 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
2019-09-13 13:24:15 -04:00
Sam Doran
08279c7d54
Update default test container with Python 3.8b4 (#62100) 2019-09-13 12:38:47 -04:00
Felix Fontein
098a13dff4 Re-enable some docker_swarm tests. (#61875) 2019-09-13 12:08:45 -04:00
Nathaniel Case
7917d4def7
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
2019-09-13 09:35:50 -04:00
Ganesh Nalawade
200ed25648
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
2019-09-13 18:52:33 +05:30
Sloane Hertel
efdf52a254
remove undefined YAML anchor (#62273) 2019-09-13 08:50:42 -04:00
chkp-orso
c7f9c3f27e Add unit tests for check_point ansible modules (#62213)
* Update test_cp_mgmt_network.py

* 17 tests
2019-09-13 13:54:29 +02:00
Jordan Borean
46ffcd6c44
ansible-galaxy - add config to control the display wheel (#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
2019-09-13 11:06:18 +10:00
Evgeni Golov
48a39f5616 typo: missing-subption-docs → missing-suboption-docs (#62180)
updates the name of the test and all ignore.txt entries
2019-09-12 14:51:20 -05:00
Jeff Geerling
a6ec6c3175 Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) 2019-09-12 15:29:36 -04:00
Chris Van Heuveln
c0f3777fe2 nxos_l2_interfaces: fix for integration tests failing to setup layer2 (#61887) 2019-09-12 21:46:52 +05:30
Mike Wiebe
c4894b512d [stable-2.9] fix nxos_config tests for httpapi (#62082)
* fix nxos_config tests for httpapi

* Remove become parameter
2019-09-12 21:46:00 +05:30