Commit graph

5943 commits

Author SHA1 Message Date
Jordan Borean
7f4945a8f1 win httptester: add wait for endpoint in case it is still coming up (#47326)
(cherry picked from commit c0546b4133)
2018-10-18 21:03:18 -07:00
Matt Clay
a2c2dffceb Add constraint for requests on python 2.6. (#47306)
* Add constraint for requests on python 2.6.
* Use constraints in lookup_hashi_vault test.

(cherry picked from commit f74f7b0373)
2018-10-18 14:23:36 -07:00
Matt Clay
62914e04be Add constraints to pip install in setup_docker.
(cherry picked from commit 14da4d66f2)
2018-10-18 14:23:36 -07:00
Matt Clay
c0b0dd7e6e Mark azure_rm_{appserviceplan,webapp} unstable.
(cherry picked from commit 1947d903cd)
2018-10-17 11:38:23 -07:00
Jordan Borean
2eb148e727 ansible-test: setup up http runner in between each target (#47100)
* ansible-test: setup up http runner in between each target

* review changes

(cherry picked from commit 9a5561da0f)
2018-10-16 16:49:31 -07:00
Jordan Borean
0629fd96bd ansible-test: run win httptester with bypass policy (#47090)
(cherry picked from commit 69e1088ec1)
2018-10-16 16:49:31 -07:00
Jordan Borean
c085cae991 test: openssl 1.1.x compatibility (#47112)
(cherry picked from commit 9ba33f6ac1)
2018-10-16 16:49:01 -07:00
Matt Clay
02bd829dd2 [stable-2.7] 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:39:58 -07:00
Jordan Borean
ff5073c10b win test: add http tester container to Windows tests (#46606)
(cherry picked from commit 6e2897647c)
2018-10-15 09:57:49 -07:00
Jordan Borean
377540348c 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-15 09:57:49 -07:00
Zim Kalinowski
f16bb4daf4 Fixing assigning ssl certificate to http listener in app gateway (#45… (#46027)
* Fixing assigning ssl certificate to http listener in app gateway (#45830)

* fixed ssl certificate reference

* modified test

(cherry picked from commit 83645963fb)

* added chagelog
2018-10-15 09:57:02 -07:00
Matt Martz
30c1a1933e [stable-2.7] Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833).
(cherry picked from commit a06a5ded61)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-10-12 10:38:38 -07:00
Abhijeet Kasurde
c982295f6c VMware: Refactor disc logic (#39285)
* Refactoring related to network device
* Assign unique random temporary key while creating SCSI or/and IDE controller devices
* Add testcase for this change

Fixes: #38679

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit fd985db72d)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-12 10:32:51 -07:00
Matt Clay
3eb5e27d6e Fix ansible-test custom docker image traceback.
(cherry picked from commit 712ad9ed64)
2018-10-11 18:33:31 -07:00
Adam Miller
f5df17ca51 yum module properly check for None config_file (#46641) (#46820)
* yum module properly check for None config_file (#46641)

* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

Signed-off-by: Adam Miller <admiller@redhat.com>

(cherry picked from commit fb6e91bf98)

* add changelog for 2.7 backport

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-11 12:16:50 -07:00
Adam Miller
4fe7671d34 yum module handle list optional empty strings properly (#46634) (#46819)
* yum module handle list optional empty strings properly (#46634)

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ad405fc21e)

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-11 09:41:04 -07:00
Andrea Tartaglia
ebc35bd79f [2.7] nmcli: backport of #42415 (#46814)
* nmcli: fix vlan connection modification Fixes #42322 (#42415)

* ensure optional items are set to empty strings rather than not presented
fix syntax of vlan modification command

* extended tests for nmcli

(cherry picked from commit fb72a5424c)

* Changelog fragment for nmcli fix
2018-10-11 07:45:11 -07:00
Jordan Borean
c888058973 win_uri: use variable for httpbin host (#46734)
(cherry picked from commit f34f75be45)
2018-10-11 07:43:07 -07:00
Nilashish Chakraborty
0e48544ae1 Backport 2.7: Return correct version on installed VyOS (#39115) (#46730)
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f681)

* Added changelog
2018-10-11 07:26:09 -07:00
Felix Fontein
10fd0251e8 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.

(cherry picked from commit 8afe46dc02)
2018-10-11 07:20:42 -07:00
Jordan Borean
c32c354995 ansible-test: set ulimit to enforce consistent test environment (#46652)
* ansible-test: set ulimit to enforce consistent test environment

* fixed santiy issue

(cherry picked from commit 7b774117ab)
2018-10-09 23:39:58 -07:00
Toshio Kuratomi
4dee2c6d24 [stable-2.7] Mocking out __future__ could cause problems
(cherry picked from commit 473f70c)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-10-09 18:28:36 -07:00
Matt Clay
24324cbca8 Fix parametrize warning in unit tests.
(cherry picked from commit 1a28898a00)
2018-10-09 18:25:24 -07:00
Matt Clay
7ce940cb41 Add symlinks sanity test. (#46467)
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047514)
2018-10-09 18:25:24 -07:00
Matt Clay
4fb485a155 Improve ansible-test environment checking between tests. (#46459)
* Add unified diff output to environment validation.

This makes it easier to see where the environment changed.

* Compare Python interpreters by version to pip shebangs.

This helps expose cases where pip executables use a different
Python interpreter than is expected.

* Query `pip.__version__` instead of using `pip --version`.

This is a much faster way to query the pip version. It also more
closely matches how we invoke pip within ansible-test.

* Remove redundant environment scan between tests.

This reuses the environment scan from the end of the previous test
as the basis for comparison during the next test.

(cherry picked from commit 0dc7f38787)
2018-10-09 18:25:24 -07:00
Matt Clay
e295888117 Add file exists check in integration-aliases test.
(cherry picked from commit 33a8be9109)
2018-10-09 18:25:24 -07:00
Matt Clay
0183f2fc87 Use default-test-container version 1.3.0.
(cherry picked from commit 6d9be66418)
2018-10-09 18:25:24 -07:00
Matt Clay
37748d219c Fix ansible-test encoding issues for exceptions.
(cherry picked from commit 0d7a156319)
2018-10-09 18:25:24 -07:00
Matt Clay
8b5f2c3ae7 Fix ansible-test multi-group smoke test handling. (#46363)
* Fix ansible-test smoke tests across groups.
* Fix ansible-test list arg defaults.
* Fix ansible-test require and exclude delegation.
* Fix detection of Windows specific changes.
* Add minimal Windows testing for Python 3.7.

(cherry picked from commit e53390b3b1)
2018-10-09 18:25:24 -07:00
Matt Clay
970e6542b5 Rebalance shippable/posix/ CI groups.
(cherry picked from commit 33b34f5c82)
2018-10-09 18:25:24 -07:00
Matt Clay
6d287de9bc Reduce noise in docs-build test failures.
(cherry picked from commit 4085d01617)
2018-10-09 18:25:24 -07:00
Matt Clay
cc51d93f1b Fix ansible-test docker python version handling.
This removes the old name based version detection behavior and
uses versions defined in the docker completion file instead, as
the new containers do not follow the old naming scheme.

(cherry picked from commit 54937ba784)
2018-10-09 18:25:24 -07:00
Matt Clay
54d06d042e Fix integration test library search path.
This prevents tests from loading modules outside the source tree,
which could result in testing the wrong module if a system-wide
install is present, or custom modules exist.

(cherry picked from commit d603cd41fe)
2018-10-09 18:25:24 -07:00
Matt Clay
76d71f034e Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.

(cherry picked from commit ac492476e5)
2018-10-09 18:25:24 -07:00
Matt Clay
b0b23d5a91 Add python.py coverage injector for ansible-test.
This can be used to run Python scripts from the repository with the
correct interpreter and allow collection of code coverage.

Useful for testing contrib inventory scripts.

(cherry picked from commit 45b5685037)
2018-10-09 18:25:24 -07:00
Matt Clay
f35f7e2e54 Improve error handling for docs-build test.
(cherry picked from commit 2148999048)
2018-10-09 18:25:24 -07:00
Matt Clay
4389e2175a Improve ansible-test match error handling.
(cherry picked from commit 2056c981ae)
2018-10-09 18:25:24 -07:00
Dag Wieers
0aa2aaa175 Fix incorrect use of subprocess.CalledProcessError (#45890)
(cherry picked from commit 24dd87bd0a)
2018-10-09 18:25:24 -07:00
Matt Clay
cfe86582f2 Support comments in ansible-test flat files.
(cherry picked from commit 5a3000af19)
2018-10-09 18:25:24 -07:00
Matt Clay
7842b99106 Make ansible-test available in the bin directory. (#45876)
(cherry picked from commit f3d1f9544b)
2018-10-09 18:25:24 -07:00
Matt Clay
434d9b2f2a Block network access for unit tests in docker.
(cherry picked from commit 99cac99cbc)
2018-10-09 18:25:24 -07:00
Matt Clay
5d19738af6 Minor fixes for unit test delegation.
(cherry picked from commit be199cfe90)
2018-10-09 18:25:24 -07:00
Matt Clay
86f37620e6 Run unit tests in parallel. (#45812)
(cherry picked from commit abe8e4c9e8)
2018-10-09 18:25:24 -07:00
Matt Clay
ecc706f122 Fix ansible-test unit test execution. (#45772)
* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.

(cherry picked from commit 379a7f4f5a)
2018-10-09 18:25:24 -07:00
Matt Clay
6d07cec588 Fix unit test parametrize order on Python 3.5.
(cherry picked from commit 53b230ca74)
2018-10-09 18:25:24 -07:00
Matt Clay
09e61f29e9 Fix unit tests which modify the source tree. (#45763)
* Fix CNOS unit test log usage.
* Use temp dir for Galaxy unit tests.
* Write to temp files in interfaces_file unit test.
* Fix log placement in netapp_e_ldap unit test.

(cherry picked from commit 0686450cae)
2018-10-09 18:25:24 -07:00
Nathaniel Case
e575f655c1 Clean up after cnos tests (#45564)
(cherry picked from commit 0b433b3ea9)
(cherry picked from commit 71b3951d09aed385be0771d01ba739348451e720)
2018-10-09 18:25:24 -07:00
René Moser
083d2a6ad7 [2.7] backport cs_instance fixes (#46274)
* cs_instance: doc: fix typo in examples (#46035)


(cherry picked from commit c09b785a66)

* cs_instance: fix host migration without volume (#46115)


(cherry picked from commit e7926cf9f4)

* add changelog fragment
2018-10-09 18:22:07 -07:00
Felix Fontein
85e227d338 Remove regression test for fix which is in another backport PR (#45769). 2018-10-09 18:20:13 -07:00
Felix Fontein
1d01543e34 docker_container: fix various idempotency problems and non-working options (#45905)
* Sorting args.

* Doing comparisons of options with container parameters in a more context-sensitive way.

This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).

* Make blkio_weight work.

* Fix cap_drop idempotency problem.

* Making groups idempotent if it contains integers.

* Make cpuset_mems work.

* Make dns_opts work.

* Fixing log_opts: docker expects string values, returns error for integer.

* Adding tests from felixfontein/ansible-docker_container-test#2.

* Make uts work.

* Adding changelog entry.

* Forgot option security_opts.

* Fixing typo.

* Explain strict set(dict) comparison a bit more.

* Improving idempotency tests.

* Making dns_servers a list, since the ordering is relevant.

* Making dns_search_domains a list, since the ordering is relevant.

* Improving dns_search_domains/dns_servers.

* Fixing entrypoint test.

* Making sure options are only supported for correct docker-py versions.
2018-10-09 18:20:13 -07:00