Commit graph

2806 commits

Author SHA1 Message Date
Jordan Borean
c18cf08a91 setup_rabbitmq - fix erlang pinned dependencies (#51048)
(cherry picked from commit 18c35b69fb)
2019-01-17 16:57:50 -08:00
Jérémy Lecour
f9dcf40de5 [backport 2.6] Lineinfile must not insert lines multiples times with insertbefore/insertafter (#50086)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must
not be added again.
insertafter/insertbefore options are used only when a line is to be
inserted, to specify where it must be added.

(cherry picked from commit 31c11de2af000972ba13f584e82001a2bc9c062a)
(cherry picked from commit eb92ce3d6f036be24fee1bad479daa4e6bc33221)

* Implement the change in behaviour mentioned in the previous commit

(cherry picked from commit a4141cfa2e49973310bba8c0962ef82d66c35f29)
(cherry picked from commit 6afe25d93e9bfe8059e7aa013b412984e272529d)

* Fix comment to reflect what the code does

(cherry picked from commit 150f5cb232f10e38509823cb5864a9fd800b6df5)
(cherry picked from commit 1a13bf06a3b6920c2c99094980bc85ae53e661cd)

* Set the correct return message.

In these cases, the lines are added, not replaced.

(cherry picked from commit 3216c31401d15906e2435422e71dfb96e30678c4)
(cherry picked from commit 5bd04bd5d57dd283de46ae3049dde6e97cdcf0e0)

* Add a changelog

(cherry picked from commit c39cf6b33269eac35c3c769de41e7c3dea642b68)
(cherry picked from commit fc071636b47c6982eb9b5a508545f78ad8e70e96)
2019-01-14 17:52:18 -08:00
Matt Clay
26b8fbddad [stable-2.6] Cleanup integration test inventory. (#50753)
* Move var_blending test inventory into test.
* Remove Amazon specific inventory entry for tests.
* Remove Azure specific inventory entry for tests.
* Move var_precedence test inventory into test.
* Move unicode test inventory into test.
* Remove unused inventory entry.
* Move gathering_facts test inventory into test.
* Move delegate_to test inventory into test.
* Clean up inventory for binary_modules test.
* Clean up integration test inventory..
(cherry picked from commit e5094e8071)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 19:46:44 -08:00
Sloane Hertel
5b8e465fc3 [stable-2.6] Add unstable alias to s3_bucket integration tests (#50508)
(cherry picked from commit d21ed42f4b)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2019-01-11 16:59:07 -08:00
Matt Clay
644a155da1 [stable-2.6] Move unrelated connection test to separate target.
(cherry picked from commit d59bc9ae48)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 15:49:55 -08:00
Matt Clay
62b4376561 [stable-2.6] Fix dpkg_selections integration test.
Download package from S3 since the previous location no longer exists.
(cherry picked from commit fd56788a14)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 10:27:47 -08:00
Matt Clay
df4ea96e94 Use relative inventory paths instead of symlinks.
(cherry picked from commit 4915920d71)
2019-01-09 21:11:48 -08:00
Matt Clay
f01caec0cb Move any_errors_fatal test inventory into test.
(cherry picked from commit c04b69208d)
2019-01-09 21:11:48 -08:00
Matt Clay
7be568fe39 Move include_import test inventory into test.
(cherry picked from commit 828e8d4957)
2019-01-09 21:11:48 -08:00
Matt Clay
c0592484f0 Move strategy_linear test inventory into test.
(cherry picked from commit 893548addb)
2019-01-09 21:11:48 -08:00
Matt Clay
056c1a057e [stable-2.6] Fix rabbitmq_plugin test.
These changes were part of a feature pull request, which is why they were not backported:

https://github.com/ansible/ansible/pull/48599
(cherry picked from commit cd9b364da8)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-07 16:26:48 -08:00
Jordan Borean
a574e0a1c9 win_copy - fix remote dir copy when it contains an empty dir (#50126)
(cherry picked from commit 65ce1b727e)
2019-01-07 16:07:50 -08:00
Jordan Borean
23a633a31a ansible test: re-enable mysql tests with fix (#50430)
(cherry picked from commit 6620facd19)
2019-01-07 14:49:33 -08:00
Jordan Borean
3adbac1344 ansible-test: change Fedora 24, 25 to 28, 29 (#49586) - 2.6 (#49588)
* ansible-test: change Fedora 24 to 28 (#49586)

(cherry picked from commit 5392caee14)

* ansible-test - swap Fedora 25 for 29 (#49634)

(cherry picked from commit 6a09db5131)

* test make sure everything passes

* skip yum tests on Fedora hosts
2018-12-21 17:16:42 -08:00
Matt Clay
e5b2b2ff2b Switch Azure DB tests from GP_Gen4_2 to B_Gen5_1.
Also switch from uswest to uswest2.

GP_Gen4_2 is more expensive and is no longer available in all regions.
The uswest location is also more expensive than uswest2.

This is a bug fix since GP_Gen4_2 is no longer available in uswest.

Applying this fix directly to older stable branches as the tests have
changed significantly in devel.
2018-12-21 12:21:48 -08:00
Matt Clay
2627522046 [stable-2.6] Fix MySQL tests when running under Docker. (#50047)
(cherry picked from commit 0ccd231afd)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-17 23:02:10 -08:00
Jordan Borean
dc79598008 ansible-test: do not upgrade homebrew to speed up tests (#49914)
(cherry picked from commit 695feea541)
2018-12-13 19:07:14 -08:00
Matt Clay
92fcb40ede [stable-2.6] Disable failing ec2_vpc_vpn_facts test.
(cherry picked from commit df1c9d0f25)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-10 14:56:40 -08:00
Matt Clay
1e7d9a48af [stable-2.6] Fix template_jinja2_latest aliases file.
(cherry picked from commit a1a0893ebd)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-10 13:40:31 -08:00
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)
2018-12-10 12:14:32 -08:00
Jordan Borean
48e56745ef win_hotfix: use S3 bucket for update files in test (#49696)
(cherry picked from commit 478fcf7abb)
2018-12-10 10:46:04 -08:00
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)
2018-12-06 11:50:11 -08:00
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)
2018-12-06 11:50:11 -08:00
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>
2018-12-04 19:58:55 -08:00
Matt Clay
438b5b82d3
Merge pull request #49203 from mattclay/bp-2.6
[stable-2.6] Backport test infra updates and test fixes.
2018-12-04 13:29:04 -08:00
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>
2018-11-27 13:07:40 -08:00
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
2018-11-27 11:54:56 -08:00
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)
2018-11-14 22:51:17 -08:00
Martin Krizek
99d30f49c0 apt: disable ubuntu repos to not change test env
(cherry picked from commit 0c86df33a4)
2018-11-14 22:51:17 -08:00
Matt Clay
ff61e8a430 Download hello package from S3 for apt test.
(cherry picked from commit 83fd82ca7e)
2018-11-14 22:51:17 -08:00
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)
2018-11-05 22:37:55 -08:00
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 204b40f70648c0c58bc5714928d9eb6bcd0f47d8)
2018-11-05 22:32:04 -08:00
Jordan Borean
800dfc7a41 gem: fix tests to work on newer Fedora hosts (#47158)
(cherry picked from commit f720499337)
2018-11-05 09:54:48 -08:00
Jordan Borean
0387649206 postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
2018-11-05 09:53:37 -08:00
Jordan Borean
4c177661d0 test: filesystem update note on test comment (#47260)
(cherry picked from commit 5d2927c9a0)
2018-11-05 09:52:38 -08:00
Jordan Borean
8a6890108f filesystem: fix test to work on newer Fedora (#47176)
(cherry picked from commit ae5aeb9a67)
2018-11-05 09:52:38 -08:00
Jordan Borean
67d1df0d37 openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
2018-11-05 09:51:38 -08:00
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
2018-11-05 09:48:29 -08:00
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>
2018-10-31 16:34:01 -07:00
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>
2018-10-31 16:17:35 -07:00
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
2018-10-31 08:55:54 -07:00
Jordan Borean
d8b05366b6 ansible-test: add retry for Windows httptester download (#47334)
(cherry picked from commit e6a327fb82)
2018-10-19 07:30:14 -07:00
Jordan Borean
fca7eec760 win httptester: add wait for endpoint in case it is still coming up (#47326)
(cherry picked from commit c0546b4133)
2018-10-18 21:02:19 -07:00
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 a5d1241fa13b308813173e7686277e15c09c0bdb)

* 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 e50234bdb32304703fd1ce1d4f6067a0d551049e)

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

Fix #44079

(cherry picked from commit 20a0d90ebeec92fc498e29d57393b280f6e639a5)

* 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 8180a7c39b2936426e6def0fa06edd974845d36b)

* 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 ddd4b4bea69a39e8e2aadac9d23c1f64bd1355f5)

* win_nssm: fix error with app_parameters parameter

Fix #25265

(cherry picked from commit aba0d48ba5fe74842ceb3584753e4fc9bca1bc92)

* win_nssm: add idempotence tests

(cherry picked from commit 46a5e4f3bfbeecb34693d0a8597e5d9643a03624)

* 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 933a4092bf584108849b5161bbdd00092c4c8c09)

* win_nssm: test parameters with spaces, quotes or backslashes

(cherry picked from commit 51843a7b3c7120721d19b192408d7a5984b12d67)

* win_nssm: restore comma as separator for service dependencies

Revert commit ddd4b4b

(cherry picked from commit ead882bb9b0bb9e576eda9e074f9150785f9512f)

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

(cherry picked from commit 862855252b5f8ff9cdd6ef8a4b3e6afee6a3c326)

* win_nssm: wrong variable in tests

(cherry picked from commit 9b9c839461bc428e0ab3897b7681492a45728f73)

* win_nssm: add changelog fragment
2018-10-16 17:58:04 -07:00
Sam Doran
5cc5be07fb Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog

(cherry picked from commit b74279d14c)
2018-10-16 15:59:20 -07:00
Sam Doran
4f8c82ca2c Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.

(cherry picked from commit 8b1ae30e2e)
2018-10-16 15:57:45 -07:00
Matt Clay
7774b37626 [stable-2.6] Update requirements for urllib3 for python 2.6.
(cherry picked from commit d048785640)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-10-16 15:40:01 -07:00
Jordan Borean
1cf3df53f0 win test: add http tester container to Windows tests (#46606)
(cherry picked from commit 6e2897647c)
2018-10-16 11:02:06 -07:00
Jordan Borean
5dd58923a1 ansible-test: add skip/windows/... alias to skip tests on specific Windows versions (#46845)
* ansible-test: add skip/windows/... alias to skip tests on specific Windows versions

* show what tests were skipped

* changes to logic to only skip if all Windows targets are set to skip

* codestyle improvements

* change warning message based on review

* check args type before running the Windows path

(cherry picked from commit 0f5331645f)
2018-10-16 11:02:06 -07:00
Jordan Borean
615d53ab42 win_uri: use variable for httpbin host (#46734)
(cherry picked from commit f34f75be45)
2018-10-16 11:02:06 -07:00