Commit graph

2258 commits

Author SHA1 Message Date
Ricardo Carrillo Cruz
5e09ddb6a4 Fix eapi basic-login asserts (#23318)
The asserts where not checking the commands sent to the device
(cherry picked from commit 4571ff0b52)
2017-04-05 20:39:59 +02:00
Ricardo Carrillo Cruz
ebda0bebfc Fix basic-login eapi tests for eos_banner (#23304)
We should be passing the provider dict, not the transport.
(cherry picked from commit d268471739)
2017-04-05 20:02:37 +02:00
Ricardo Carrillo Cruz
6969bef70a Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
(cherry picked from commit cf30f0f27d)
2017-04-05 20:02:24 +02:00
John R Barker
7941f1ede7 enable ios_facts tests again (#23310) (#23312)
(cherry picked from commit f22702eee2)
2017-04-05 17:58:44 +01:00
Nathaniel Case
50500332ae Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation

(cherry picked from commit d890167575)
2017-04-05 11:48:28 -04:00
Matt Clay
08be1ae562 Fix integration aliases.
(cherry picked from commit b7cc4616b1)
2017-04-03 17:50:18 -07:00
Jordan Borean
45b56cb081 win_find fix up age parameter (#23195)
(cherry picked from commit 3e1a16c574)
2017-04-03 13:24:33 -07:00
Jordan Borean
401f6d68d6 win_stat change return islink to islnk to match stat (#23196)
(cherry picked from commit 4d1b97d1ae)
2017-04-03 11:39:33 -07:00
Ricardo Carrillo Cruz
5744abfe4e Fix eos_banner cli basic_motd integration test (#23158)
A task was lacking the provider variable, causing the test to fail.

Fixes #23130
2017-03-31 00:28:37 +02:00
Pavel Glushchak
657fd1dfd1 Added Virtuozzo distribution support
Virtuozzo Linux is based on CentOS sources. Thus OS family
should be recognized as 'RedHat'.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
(cherry picked from commit 097173c6f5)
2017-03-29 08:47:48 -07:00
Toshio Kuratomi
bb0b90783c Fix for tests run with no .ssh user dir
When building in automated build systems, there are sometimes cases
where the user doing the building does not have a .ssh directory.  In
this case, we need to mock out some os.path functions so that the
add_host_key() function we're testing won't complain or try to create
one.

(cherry picked from commit ade3fc2893)
2017-03-28 19:28:15 -07:00
Toshio Kuratomi
9785d5b2fb Fix synchronize tests for the updated quoting change between action and module
(cherry picked from commit b0d75a0ecb)
2017-03-28 14:15:42 -07:00
Matt Clay
15695ea3bc Associate systemd module with service test. (#22847)
(cherry picked from commit 318445fe19)
2017-03-24 13:30:12 -07:00
Matt Davis
631eaccc64 force Windows to always use preamble-free UTF8 input encoding (#22934)
* fixes #15770
* When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
(cherry picked from commit e084e8809e)
2017-03-24 00:03:16 -07:00
Artem Zinenko
7f1a7a4372 win_firewall_rule doesn't fail when profile is "any" or remoteip is IPv4 and the task runs more than once. (#22555)
* Fixed #22554

* Wrote tests for win_firewall_rule module

* Fixed #22786

* Fixed review comments

* Fixed #22799

* Added test when RemoteIP containt a netmask

* Revert comment

(cherry picked from commit f4b34a4c3b)
2017-03-23 20:02:16 -07:00
Dag Wieers
8b9ccc15f7 win_scheduled_tasks: Improve example test framework (#22833)
Updated as discussed in previous Test Working Group.
(cherry picked from commit ef36d7de68)
2017-03-23 19:44:02 -07:00
Matt Davis
9154981684 fix Windows env handling
* fixes #22441
* fixes #22655
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.

(cherry picked from commit cc68212612)
2017-03-23 17:48:55 -07:00
Jordan Borean
5eae522d94 win_reg_stat change the module parameters for standardisation (#22732)
(cherry picked from commit f1ab879bb6)
2017-03-23 15:16:11 -07:00
Matt Clay
7d79105cf4 Overhaul ansible-test import analysis. (#22888)
- Add support for module_utils packages for better organization.
- Add support for "virtual" module_utils packages such as `six`.

(cherry picked from commit 4fdeade389)
2017-03-22 23:02:44 -07:00
Brian Coca
4e6cdf8989 better handling of parsed
updated tests to match new result output

(cherry picked from commit 5e98be2e62)
2017-03-22 12:03:34 -04:00
Ricardo Carrillo Cruz
3db0bbe76c Fallback to show-run on ios_banner for devices where show banner does not work (#22793)
On switches 'show banner' command doesn't work, fallback to show run|begin banner
and extract the banner text in case that fails.
2017-03-22 11:07:49 +01:00
Ricardo Carrillo Cruz
89a2d1d6ad Add ios_banner module (#22687)
With unit and integration tests.
2017-03-21 12:29:45 +01:00
Matt Clay
0c2c19edb4 Fix metadata handling for shell command. (#22801)
(cherry picked from commit 042e387f27)
2017-03-20 15:32:35 -07:00
Matt Clay
3f8e8a3390 Add missing needs/root alias to file test. (#22800)
(cherry picked from commit 3585d3d368)
2017-03-20 14:14:16 -07:00
Matt Clay
b73a1be03a Disable failing MySQL tests on FreeBSD. (#22798)
(cherry picked from commit b7c80dbb7e)
2017-03-20 09:54:16 -07:00
Matt Clay
5ae1967aea Fix ansible-test base branch handling on merge. (#22759)
(cherry picked from commit 991bf0a1c3)
2017-03-17 23:34:27 -07:00
Matt Clay
0e864fd81b Fix uri options test to work again.
(cherry picked from commit 93d9b04f1d)
2017-03-17 22:31:22 -07:00
Matt Clay
0ca10bf3d5 Fix ansible-test base branch usage on Shippable.
(cherry picked from commit 47887a2edd)
2017-03-17 17:36:16 -07:00
Matt Clay
c935d2f038 Do not run win_chocolatey in CI tests.
The test is failing repeatedly.

(cherry picked from commit 011b324638)
2017-03-17 09:01:31 -07:00
Matt Clay
dc8ad50eaa Fix ansible-test PR diff handling.
Permits use of PRs on branches other than devel.

(cherry picked from commit f7c83ccdc0)
2017-03-16 10:37:10 -07:00
Matt Clay
c72ac9b230 Add test verification to ansible-test. (#22636)
* Add unified git diff parser.
* Add metadata and diff handling.
* Add test confidence/verification to bot output.

(cherry picked from commit 869449e288)
2017-03-15 14:48:53 -07:00
Matt Clay
c9ea993c88 Verify SHA in Shippable change detection.
(cherry picked from commit 5e9a2b8528)
2017-03-15 11:32:41 -07:00
Dag Wieers
72e7927dd5 win_scheduled_task: Added frequency: once and check_mode support (#22611)
* win_scheduled_task: Added frequency: once and check_mode support

This patch includes:
- Renamed `execute:` parameter to `executable:`
- Renamed `argument:` parameter to `arguments:`
- Implemented `frequency: once` support
- Implemented check_mode support
- Fix idempotency issue related to empty description
- Added integration tests

* Improve the integration test structure

I think this is a great way to test normal mode and check-mode from the same playbook.

* Small fixes after review
2017-03-15 07:11:24 -07:00
Jordan Borean
6ce338d29c win_service Added -Force option and minor cleanup (#22598)
* win_service Added -Force option and minor cleanup

* Changed parameter and fixed typos
2017-03-14 18:53:31 -07:00
Matt Davis
ce56da69b2 make windows async ... async (#22624)
Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
2017-03-14 16:37:55 -07:00
Matt Clay
89559f78de Add --failure-ok option to ansible-test. (#22623) 2017-03-14 16:32:21 -07:00
Ricardo Carrillo Cruz
604a38cac1 Implement eos_banner for EAPI (#22609)
On EAPI, the multi-line commands are expected to be a dict,
with key/value pairs 'cmd'/'input' .
This change implements that behaviour and fixes the idempotency
on EAPI as well.

Fixes #22494
2017-03-14 21:00:17 +01:00
Toshio Kuratomi
eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Matt Clay
771b14acb2 Sort test messages for deterministic output. (#22581) 2017-03-13 20:45:10 -07:00
John R Barker
04e816e13b Stricter module documentation validation (#22353)
Raise the bar for module `DOCUMENTAION`
This validator update was used to find the issues in https://github.com/ansible/ansible/pull/22297/files

**Validation**
* Updated Validation and docs to enforce more (items fixed in https://github.com/ansible/ansible/pull/22297/files)
* Use `suboptions` to document complex options 
* Validate module name
* Validate deprecated modules have correct ANSIBLE_METADATA

**Module Documentation Generation**
* Document `suboptions:` Example https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718
* Tidy up HTML generation (valid HTML, no empty lists, etc)
 
**Documentation**
* Clarify the steps for deprecating a module
* Use correct RST headings
* Document `suboptions:` (options)
* Document `contains:` (returns)


**Details**
The aim is to get this (and corresponding module updates) complete by the time `devel` becomes `2.4`, as this allows us to raise the bar for new modules

Example `suboptions` https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718

The aim is to get this PR integrated into `devel` *before* we branch `stable-2.3`, this will allows us to:
* Raise the bar for new modules in 2.4
* Ensure the generated module documentation for 2.3 and higher is improved, important as we will be doing versioned docs moving forward.
2017-03-13 19:49:27 +00:00
Peter Sprygada
39c38bf30d fixes candidate var type in junos shared lib (#22551)
* candidate var can now be string, list or element
* fixes minor bug in junos_template for backup argument
* disabled invalid integration test for junos_template
2017-03-13 07:27:45 -04:00
Peter Sprygada
2b2072a8c9 roll up of fixes and updates for junos modules (#22543)
* removes cli functions
* adds comment and confirm to arguments
* implements zeroize argument
* fixes get_diff function in junos shared lib to return diff
* lots of minor bug fixes in junos_config
* minor syntax fixes in junos_netconf
* updates netconf integration tests
2017-03-12 11:45:00 -05:00
Peter Sprygada
3f0f7c4f4e updates junos shared lib and action handler (#22541)
* removes cli functions from shared lib
* adds cli functions to junos_netconf module
* statically pins junos_netconf to cli transport
* all other modules use netconf transport
* adds command rpc function to junos shared
2017-03-12 08:37:45 -05:00
John R Barker
89e4226051 add missing files (#22496) 2017-03-10 15:29:36 +00:00
John R Barker
5dac2ee00c Test eos_banner (#22201)
* eos_banner docs improvements

* run eos_banner tests

* basic eos_banner tests

* remove trailing newlines

* remove hack

* Various eos_banner fixes

No unicode tests, as the device doesn't support it
Correctly set provider
result.command should be empty list if no changes

* test eos_banner over eapi

* revert docs changes, moved to separate PR
2017-03-10 15:20:09 +00:00
Ricardo Carrillo Cruz
c57729944b Fix the eos_banner idempotency (#22413)
The map_config_to_obj calls the run_commands  helper function,
which returns a list of results.
However, the map_params_to_obj return a single string.
Therefore, the comparison between the two datasets could never be equal,
breaking idempotency.
Also, the 'no banner' command should be run on absent only if there's a banner
text set.

Fixes #22194
2017-03-09 12:43:54 +00:00
Matt Clay
cfd313bced Disable ansible color output on sanity tests. 2017-03-08 12:18:16 -08:00
John R Barker
41f5648c44 Test system (#22420)
* ios_system

* tests for ios_system

* tests for *_system

* working ios_system on cli

* Typo

* Loopback10 (single word, upeprcase)

* Revert docs changes

* Working iosxr_system tests

* eos, not nxos

* nxos_system
2017-03-08 12:21:45 -07:00
Dave Kasberg
8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
2017-03-08 17:09:17 +00:00
Matt Clay
a64665ae91 Fix error handling in CI other script. 2017-03-08 01:31:53 -08:00