Commit Graph

2257 Commits (3ba95b8ef73d45de9fcc472b13cb96bd24e34fdb)

Author SHA1 Message Date
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)
8 years ago
Ricardo Carrillo Cruz 6969bef70a Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
(cherry picked from commit cf30f0f27d)
8 years ago
John R Barker 7941f1ede7 enable ios_facts tests again (#23310) (#23312)
(cherry picked from commit f22702eee2)
8 years ago
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)
8 years ago
Matt Clay 08be1ae562 Fix integration aliases.
(cherry picked from commit b7cc4616b1)
8 years ago
Jordan Borean 45b56cb081 win_find fix up age parameter (#23195)
(cherry picked from commit 3e1a16c574)
8 years ago
Jordan Borean 401f6d68d6 win_stat change return islink to islnk to match stat (#23196)
(cherry picked from commit 4d1b97d1ae)
8 years ago
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
8 years ago
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)
8 years ago
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)
8 years ago
Toshio Kuratomi 9785d5b2fb Fix synchronize tests for the updated quoting change between action and module
(cherry picked from commit b0d75a0ecb)
8 years ago
Matt Clay 15695ea3bc Associate `systemd` module with `service` test. (#22847)
(cherry picked from commit 318445fe19)
8 years ago
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)
8 years ago
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)
8 years ago
Dag Wieers 8b9ccc15f7 win_scheduled_tasks: Improve example test framework (#22833)
Updated as discussed in previous Test Working Group.
(cherry picked from commit ef36d7de68)
8 years ago
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)
8 years ago
Jordan Borean 5eae522d94 win_reg_stat change the module parameters for standardisation (#22732)
(cherry picked from commit f1ab879bb6)
8 years ago
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)
8 years ago
Brian Coca 4e6cdf8989 better handling of parsed
updated tests to match new result output

(cherry picked from commit 5e98be2e62)
8 years ago
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.
8 years ago
Ricardo Carrillo Cruz 89a2d1d6ad Add ios_banner module (#22687)
With unit and integration tests.
8 years ago
Matt Clay 0c2c19edb4 Fix metadata handling for shell command. (#22801)
(cherry picked from commit 042e387f27)
8 years ago
Matt Clay 3f8e8a3390 Add missing `needs/root` alias to `file` test. (#22800)
(cherry picked from commit 3585d3d368)
8 years ago
Matt Clay b73a1be03a Disable failing MySQL tests on FreeBSD. (#22798)
(cherry picked from commit b7c80dbb7e)
8 years ago
Matt Clay 5ae1967aea Fix ansible-test base branch handling on merge. (#22759)
(cherry picked from commit 991bf0a1c3)
8 years ago
Matt Clay 0e864fd81b Fix uri options test to work again.
(cherry picked from commit 93d9b04f1d)
8 years ago
Matt Clay 0ca10bf3d5 Fix ansible-test base branch usage on Shippable.
(cherry picked from commit 47887a2edd)
8 years ago
Matt Clay c935d2f038 Do not run `win_chocolatey` in CI tests.
The test is failing repeatedly.

(cherry picked from commit 011b324638)
8 years ago
Matt Clay dc8ad50eaa Fix ansible-test PR diff handling.
Permits use of PRs on branches other than devel.

(cherry picked from commit f7c83ccdc0)
8 years ago
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)
8 years ago
Matt Clay c9ea993c88 Verify SHA in Shippable change detection.
(cherry picked from commit 5e9a2b8528)
8 years ago
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
8 years ago
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
8 years ago
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.
8 years ago
Matt Clay 89559f78de Add `--failure-ok` option to `ansible-test`. (#22623) 8 years ago
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
8 years ago
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
8 years ago
Matt Clay 771b14acb2 Sort test messages for deterministic output. (#22581) 8 years ago
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.
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
John R Barker 89e4226051 add missing files (#22496) 8 years ago
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
8 years ago
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
8 years ago
Matt Clay cfd313bced Disable ansible color output on sanity tests. 8 years ago
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
8 years ago
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
8 years ago
Matt Clay a64665ae91 Fix error handling in CI other script. 8 years ago
Matt Clay 3ab344e8bd Use lint/junit output for compile test. (#22395)
* Refactor sanity classes for use in all tests.
* Use lint/junit output for compile test.
* Add missing options for compile test.
* Fix early bailout on requirements install.
8 years ago