Commit Graph

5435 Commits (4caef8413e4c2cc93fdc3958fbfd6476436afd48)

Author SHA1 Message Date
Mike Wiebe e3c4e49f59 Fix issues with nxos_os_install module (#48811)
* Use expect module to copy files

* Remove old and redundant upgrade files

* Return error message instead of code

* Cleanup copy command code

* Fix force issue in nxos_install_os

* new nxos_install_os integration tests

* Uncomment transport tests

* Revert negative test change

* Remove combined option that is no longer required

* Make shippable happy

* Add n5k test files

(cherry picked from commit a721572206)
6 years ago
Jordan Borean 48e56745ef win_hotfix: use S3 bucket for update files in test (#49696)
(cherry picked from commit 478fcf7abb)
6 years ago
Abhijeet Kasurde 5a7b01f8b9 VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 1b04571ea0)
6 years ago
Jordan Borean 0afde7c334 ansible-test: recursively scan setup dependencies (#49170)
* ansible-test: recursively scan setup dependencies

* removed need for default set()

(cherry picked from commit 694c505452)
6 years ago
Sam Doran d85290dd53 Add setup roles for passlib and pexpect for use with pause and vars_prompt tests (#43613)
* Add passlib to RHEL test instance

This looks like the only tests instance that is missing this libary. It is needed for vars_prompt tests.

* Create setup roles for pexect and passlib

Switch to using aliases rather than installing directly in the test scripts

(cherry picked from commit 96c2375692)
6 years ago
Jordan Borean 1833a24acc create local subversion server for tests (#49047)
* create local subversion server for tests

* fix sanity issues

* don't touch system config when bringing up site

* removed original setup files

* fix opensuse config

(cherry picked from commit 0420d606de)
6 years ago
Xaroth b38d30810c [stable-2.6] -Fix: The Ubuntu 14.04 image on Shippable runs an old version of python, causing issues with checking out bitbucket, adjust tests to compensate. (#49433)
-Add: Mention bitbucket dropping TLSv1 and TLSv1.1 support as per 01 Dec 2018, potentially causing issues with older clients.
(cherry picked from commit a6db7f7abd)

Co-authored-by: Xaroth <xaroth+github@xaroth.nl>
6 years ago
Matt Clay 438b5b82d3
Merge pull request #49203 from mattclay/bp-2.6
[stable-2.6] Backport test infra updates and test fixes.
6 years ago
Matt Clay cac34646d5 [stable-2.6] Add change classification for powershell wrappers.
(cherry picked from commit c25db4ee8d)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Christopher Gadd 3267b204da [stable-2.6] make password locking in user module idempotent (#43671)
* Simplify logic and add FreeBSD & NetBSD

* Remove incorrect flag for lock and unlock on FreeBSD

* Add tests and changelog

Co-authored-by: Chris Gadd <gaddman@email.com>
(cherry picked from commit f75a84e382)

Co-authored-by: Christopher Gadd <gaddman@email.com>
6 years ago
Matt Davis 4d748d34f9 split PS wrapper and payload (CVE-2018-16859)
* prevent scriptblock logging from logging payload contents
* added tests to verify no payload contents in PS Operational event log
* fix script action to send split-aware wrapper
* fix CLIXML error parser (return to -EncodedCommand exposed problems with it)
* addresses CVE-2018-16859
6 years ago
Matt Clay 6937268444 [stable-2.6] Fix unit test issues with pytest >= 4.0.0.
(cherry picked from commit feb5b0b299)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Martz 6969edc3c0 [stable-2.6] Prevent metadata changes in a stable branch (#48994). (#49134)
* [stable-2.6] Prevent metadata changes in a stable branch (#48994).
(cherry picked from commit 7287d396e2)

Co-authored-by: Matt Martz <matt@sivel.net>

* Address rebase issues

* Fix metadata comparison
6 years ago
Matt Clay 4d557004c3 Revert "Relax ansible-test python version checking."
This reverts commit d6cc3c4187.

(cherry picked from commit de11b473a6)
6 years ago
Matt Clay c2b8068def Use `state: latest` for `dpkg_selections` test.
We don't need to test with `upgrade: dist`, since we're not trying
to test the `apt` module. We just need to make sure the hold set
by the `dpkg_selections` module is working.

This change will avoid updating all the packages on the system,
which is slow, unnecessary, and can cause the installed python
to be changed.

(cherry picked from commit 136a2cca2f)
6 years ago
Martin Krizek 99d30f49c0 apt: disable ubuntu repos to not change test env
(cherry picked from commit 0c86df33a4)
6 years ago
Matt Clay a5702b4b99 Fix ansible-test interpreter tracking.
Track the interpreter for each copy of the injector by the interpreter
path instead of the interpreter version. This avoids the possibility
of mixing different interpreters with the same version.

(cherry picked from commit fa53b4805b)
6 years ago
Matt Clay d2289990ca Fix ansible-test merge change detection.
(cherry picked from commit aa7fe919d3)
6 years ago
Matt Clay e433069ecc Correct ansible-test injector python behavior.
Inject a symlink to the correct python into the copied injector
directory instead of altering the shebang of the injector. This
has the side-effect of also intercepting `python` for integration
tests which simplifies cases where it needs to be directly invoked
without collecting code coverage.

(cherry picked from commit d6bf45cd9d)
6 years ago
Matt Clay cb229a0874 Use correct interpreter for ansible-test injector.
(cherry picked from commit eec21a3d12)
6 years ago
Matt Clay 2ccbb97d1e Fix passing of env vars to Shippable.
(cherry picked from commit 9979a32e5c)
6 years ago
Matt Clay ff61e8a430 Download hello package from S3 for apt test.
(cherry picked from commit 83fd82ca7e)
6 years ago
Matt Clay a0fc98a1a1 [stable-2.6] Relax ansible-test python version checking.
(cherry picked from commit d6cc3c4187)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Felix Fontein c64f15ecf7 docker_* modules: simplify idempotency comparisons (#47709)
* More generic comparison code from docker_container to docker_common.

* More flexibility if a is None and method is allow_to_present.

Note that this odes not affect docker_container, as there a is never None.

* Update docker_secret and docker_config: simplify labels comparison.

* Added unit tests.

* Use proper subsequence test for allow_more_present for lists.

Note that this does not affect existing code in docker_container, since lists
don't use allow_more_present. Using allow_more_present will only be possible
in Ansible 2.8.

* pep8

(cherry picked from commit 73533d3fc2)
6 years ago
Mike Wiebe 349bdffd1a Add force disruptive option (#47694)
* Use expect module to copy files

* Add force option for disruptive upgrades

* Revert changes to copy_kick_system_images.yaml

(cherry picked from commit c53e3ca8e9)
6 years ago
Jesse Pretorius b8efdd3336 Add lvg module idempotence test
To ensure that the lvg module is tested for idempotency,
we add a basic integration test.

Support for MacOS and FreeBSD are skipped because the
module does not currently support those platforms.

(cherry picked from commit 204b40f706)
6 years ago
Matt Clay f3dff6a6f6 Fix ansible-test invocation of pytest.
(cherry picked from commit 1939f6c412)
6 years ago
Matt Clay 7c97ca6ea1 Update default-test-container to version 1.4.1. (#47042)
(cherry picked from commit 5c7f876d0d)
6 years ago
Matt Clay 8d3b608c7c Use 4 nodes for sanity tests in CI.
(cherry picked from commit 6a51b5ed26)
6 years ago
Matt Clay b15cdb7873 Fix ansible-test --exclude with delegation.
Previously the option worked with integration commands but not units or sanity.

(cherry picked from commit 38eba60849)
6 years ago
Matt Clay 6933c7e9e2 Add sphinx constraint for rstcheck compatibility.
(cherry picked from commit 7507bc9e19)
6 years ago
Matt Clay e8617eae6c Add constraint for pycparser.
(cherry picked from commit 6a1aa51a74)
6 years ago
Matt Clay 3fd9952476 Split pylint runs into more contexts.
(cherry picked from commit ad940b86e4)

See: https://github.com/ansible/ansible/pull/47036/
6 years ago
Matt Clay 35a6ec9f2e Fix issues reported by the latest pylint.
(cherry picked from commit 4db054364a)

See: https://github.com/ansible/ansible/pull/47036/
6 years ago
Matt Clay 1c3343e41d Split sanity tests into 3 groups.
(cherry picked from commit 5461bfbf31)
6 years ago
Jordan Borean 800dfc7a41 gem: fix tests to work on newer Fedora hosts (#47158)
(cherry picked from commit f720499337)
6 years ago
Jordan Borean 0387649206 postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
6 years ago
Jordan Borean 4c177661d0 test: filesystem update note on test comment (#47260)
(cherry picked from commit 5d2927c9a0)
6 years ago
Jordan Borean 8a6890108f filesystem: fix test to work on newer Fedora (#47176)
(cherry picked from commit ae5aeb9a67)
6 years ago
Jordan Borean 67d1df0d37 openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
6 years ago
Jordan Borean f5f571475d dnf yum: fix tests running on Fedora 29 - 2.6 (#47910) (#47949)
* dnf yum: fix tests running on Fedora 29 (#47910)

* dnf yum: fix tests running on Fedora 29

* wrap in always block

(cherry picked from commit f0535bac80)

* Remove extra yum tests
6 years ago
Matt Martz 37968a70a4 [stable-2.6] Detect the socket path after starting the service. Fixes #47582
(cherry picked from commit 10e129e)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Toshio Kuratomi afea9f4845 [stable-2.6] Fix mysql authentication errors
The mysql-server package on Ubuntu16.04 was recently updated to disallow
unauthenticated root user login over tcp/ip.  This, coupled with pymysql
using tcp/ip whenever host and port is specified causes us to fail to
connect to the database when testing Python3 on Ubuntu16.04.

The fix is to use the unix socket instead..
(cherry picked from commit 748ea39ecd)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Martin Krizek f50cc0b8cb 2.6: user: do not pass ssh_key_passphrase on cmdline (#47487)
* user: do not pass ssh_key_passphrase on cmdline

* user: do not pass ssh_key_passphrase on cmdline

CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit a0aa53d1a1)

* Ignore user module use of subprocess.

(cherry picked from commit 8d00afc013)

* Fix python3 problem in user module cve fix

(cherry picked from commit 9088671c4e)

* Fix changelog entry for user module CVE fix

(cherry picked from commit 210a43ebeb)
(cherry picked from commit b618339c32)

* Remove E210
6 years ago
Jordan Borean d8b05366b6 ansible-test: add retry for Windows httptester download (#47334)
(cherry picked from commit e6a327fb82)
6 years ago
Jordan Borean fca7eec760 win httptester: add wait for endpoint in case it is still coming up (#47326)
(cherry picked from commit c0546b4133)
6 years ago
Matt Clay 948f82c6f4 Add constraint for requests on python 2.6. (#47306)
* Add constraint for requests on python 2.6.

(cherry picked from commit f74f7b0373)
6 years ago
Matt Clay 9b65337e5c
Backport/2.6/44755 - win_nssm: tests and several bug fixes (#47159)
* win_nssm: add failing tests for issue #44079

(cherry picked from commit a5d1241fa1)

* win_nssm: add more failing tests

These tests highlight several issues with this module:
 * Service not started when state=started
 * Errors with app_parameters (see #25265)
 * Exception when passing several dependencies separated by comma as specified in doc

(cherry picked from commit e50234bdb3)

* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue

Fix #44079

(cherry picked from commit 20a0d90ebe)

* win_nssm: fix service not started when state=started

Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.

(cherry picked from commit 8180a7c39b)

* win_nssm: fix incorrect separator in doc for service dependencies

The dependencies parameter works with space as separator, but not with comma as shown in the documentation

(cherry picked from commit ddd4b4bea6)

* win_nssm: fix error with app_parameters parameter

Fix #25265

(cherry picked from commit aba0d48ba5)

* win_nssm: add idempotence tests

(cherry picked from commit 46a5e4f3bf)

* win_nssm: fix several idempotence issues and misbehaviors

Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).

(cherry picked from commit 933a4092bf)

* win_nssm: test parameters with spaces, quotes or backslashes

(cherry picked from commit 51843a7b3c)

* win_nssm: restore comma as separator for service dependencies

Revert commit ddd4b4b

(cherry picked from commit ead882bb9b)

* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict

(cherry picked from commit 862855252b)

* win_nssm: wrong variable in tests

(cherry picked from commit 9b9c839461)

* win_nssm: add changelog fragment
6 years ago
Toshio Kuratomi 115b919cfd [stable-2.6] Mocking out __future__ could cause problems
(cherry picked from commit 473f70c)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Sam Doran 5cc5be07fb Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog

(cherry picked from commit b74279d14c)
6 years ago