Commit graph

402 commits

Author SHA1 Message Date
Matt Clay
e2b6047514
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.
2018-10-04 07:02:42 -07:00
Matt Clay
0dc7f38787
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.
2018-10-03 21:41:27 -07:00
Matt Clay
33a8be9109 Add file exists check in integration-aliases test. 2018-10-03 15:40:30 -07:00
Matt Clay
6d9be66418 Use default-test-container version 1.3.0. 2018-10-03 12:24:49 -07:00
Jordan Borean
e972287c35 win_exec: refactor PS exec runner (#45334)
* win_exec: refactor PS exec runner

* more changes for PSCore compatibility

* made some changes based on the recent review

* split up module exec scripts for smaller payload

* removed C# module support to focus on just error msg improvement

* cleaned up c# test classifier code
2018-10-02 15:55:53 -07:00
Matt Clay
0d7a156319 Fix ansible-test encoding issues for exceptions. 2018-10-02 13:36:43 -07:00
Matt Clay
e53390b3b1
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.
2018-10-02 12:26:14 -07:00
Yunge Zhu
69594c5370 add azure_rm_cdnprofile and azure_rm_cdnprofile_facts (#45097)
* add cdn profile with facts

* fix merge issue

* fix version

* fix lint

* move cdn client out of azure_rm_common

* fix lint

* fix helper

* fix code bug

* fix bug

* fix import

* fix typo

* fix test
2018-09-27 10:10:01 +10:00
Matt Clay
54937ba784 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.
2018-09-21 20:11:38 -07:00
Matt Clay
d603cd41fe 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.
2018-09-21 13:53:09 -07:00
Matt Clay
ac492476e5
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.
2018-09-21 11:38:22 -07:00
Matt Clay
45b5685037 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.
2018-09-21 11:21:32 -07:00
Matt Clay
2056c981ae Improve ansible-test match error handling. 2018-09-21 00:05:33 -07:00
Jordan Borean
27c10fa502
add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording
2018-09-21 16:09:54 +10:00
Matt Clay
5a3000af19 Support comments in ansible-test flat files. 2018-09-20 00:48:00 -07:00
Matt Clay
f3d1f9544b
Make ansible-test available in the bin directory. (#45876) 2018-09-19 17:58:55 -07:00
Jordan Borean
582a4dfa13
append AWS region to test instance file (#45877) 2018-09-20 10:56:56 +10:00
Jordan Borean
a7d372c3ba
go back to FreeBSD 11.1 for tests due to 11.2 stability issues (#45872) 2018-09-20 09:24:16 +10:00
Matt Clay
99cac99cbc Block network access for unit tests in docker. 2018-09-18 17:53:04 -07:00
Matt Clay
be199cfe90 Minor fixes for unit test delegation. 2018-09-18 16:12:15 -07:00
Matt Clay
abe8e4c9e8
Run unit tests in parallel. (#45812) 2018-09-18 13:58:22 -07:00
Matt Clay
379a7f4f5a
Fix ansible-test unit test execution. (#45772)
* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.
2018-09-18 08:37:14 -07:00
Matt Clay
c50d6f1944 Update RHEL and FreeBSD versions used for tests:
- RHEL 7.4 -> 7.5
- FreeBSD 11.1 -> 11.2
2018-09-11 20:57:57 -07:00
Matt Clay
d478a4c3f6 Update default container to version 1.2.0. 2018-09-11 13:17:11 -07:00
Matt Clay
1891827dfa Update default-test-container to 1.1.0. 2018-09-07 19:44:45 -07:00
Matt Clay
4173a30941 Remove obsolete default container. 2018-09-05 15:29:00 -07:00
Matt Clay
3f8edb440a Switch default test container to quay.io. 2018-09-05 14:31:10 -07:00
Matt Clay
998badbda5 Fix ansible-test virtualenv use in import test. 2018-09-04 10:07:48 -07:00
Zim Kalinowski
1f8635fbd9 Virtual machine facts - retrieving instance view (#45128) 2018-09-04 11:25:01 +08:00
Matt Clay
b3a3e8ba7b
Update test constraints. (#44975)
- Limit virtualenv version on Python 2.6.
- Limit pyopenssl version on Python 2.6.
- Pin pyfmg version to keep unit tests passing.
2018-09-03 09:34:22 -07:00
Yuwei Zhou
b7d614df78 add auto scale module (#41533)
* add autoscale modules

* add test alias
2018-08-30 21:18:56 -07:00
Will Thames
ce110ff081 K8s retry merge (#44821)
* Make merge_type a list and apply merge_type in order

Allow use case of preferring strategic-merge and failing
back to merge, or just preferring a different merge type

* Improve k8s module test coverage
2018-08-30 20:42:47 -04:00
Matt Clay
c1173a2aec Add seccomp support to ansible-test. 2018-08-30 16:38:31 -07:00
Ghilli3
7bc2660017 fortimanager/fmgr_provisioning.py (#35743)
* Initial commit for new provisioning module
2018-08-30 14:25:17 +01:00
Hai Cao
ccb7909cc5 [new module] Azure Traffic Manager profile module (#43812)
* add traffic manager client and models in azure_rm_common
- add traffic manager management client
- import traffic manager models to 'traffic_manager_models' proprety
- azure.mgmt.trafficmanager doesn't have models(), so use direct import
for now

* add traffic manager facts module

* add traffic manager module

* add integration test for two modules

* fix package info in requirements

* fix sanity check

* fix monitor config default value

* fix facts module doc

* move model import into module

* resolve comments except seprating endpoint

* remove endpoint operation

* fix test after removing endpoint operation

* change module name to azure_rm_trafficmanagerprofile/facts

* fix sanity test

* seperate endpoint into delegate module

* fix typo

* fix lint

* fix lint

* fix test

* fix test

* resolve comments

* fix test

* fix test

* fix test

* fix bug in return

* resolve comments

* fix lint

* fix lint

* add sample in endpoint module
2018-08-30 14:18:53 +10:00
lwm
fbcdf8ba5b Linode: Mark 'name' as required. Fixes #29785 (#44699)
* Mark 'name' parameter as required.

Closes https://github.com/ansible/ansible/issues/29785.

* Add the `linode-python` dependency for unit tests.

* Add unit test for linode name parameter.

* Add note about where to find required arguments.

Closes https://github.com/ansible/ansible/issues/44696.
2018-08-30 05:09:21 +02:00
Jasper Aorangi
2541a8c494 azure_rm_virtualmachine: Add 'accept_terms' for accepting terms when deploying paid marketplace images (#44701)
azure_rm_storageaccount: Add 'StandardSSD_LRS', and choices to correct unrelated sanity error
2018-08-29 17:14:44 -07:00
Matt Clay
773c0982b0 Switch distro test containers to quay.io images. 2018-08-29 15:52:58 -07:00
René Moser
56996c7348
test: cloudstack-test-container v1.2.0 (#44764) 2018-08-28 16:49:34 +02:00
Matt Clay
c0aaf0fff7 Fix change detection on retried Shippable jobs. 2018-08-27 20:57:09 -07:00
Sumit Jaiswal
1d2bb34992
Includes support for Reverse-Mapping zone in nios_zone module (#44525)
* support reverse mapping

* support reverse mapping

* support reverse mapping

* fix shippable errors

* fix shippable errors

* fix shippable errors
2018-08-23 03:07:30 +00:00
Felix Fontein
ad0d10db0d ACME: improve tests (new Pebble version, strict mode) (#44518)
* Bump ACME test container version.

* Re-adding key rollover test.
2018-08-22 22:15:35 +02:00
Jordan Borean
6982dfc756 psrp: Added new Windows connection plugin (#41729)
* psrp: Added new Windows connection plugin

* Tweaks to connection options from review
2018-08-21 16:43:13 -07:00
Felix Fontein
d8d366ef37 ACME: using new acme-test-container (#44095)
* Using new acme-test-container image.

* Add test for cleaning account contacts.
2018-08-14 07:35:15 -07:00
Matt Clay
56cc681d8c
Classify inventory plugins. (#44091)
* Classify inventory plugins.
* Rename inventory integration test targets.
2018-08-13 12:26:37 -07:00
Rene Moser
ec84c31ace cloudstack: update cloudstack-test-container to v1.1.0 2018-08-13 09:29:47 -07:00
Jordan Borean
6ca4ea0c1f
add support for opening shell on remote Windows host (#43919)
* add support for opening shell on remote Windows host

* added arg completion and fix sanity check

* remove uneeded arg
2018-08-13 09:27:59 +10:00
Jordan Borean
adc0efe10c
ansible-test: Create public key creating Windows targets (#43760)
* ansible-test: Create public key creating Windows targets

* Changed to always set SSH Key for Windows hosts
2018-08-09 18:00:22 +10:00
Sumit Jaiswal
e96f90b440
Nios integration and unit tests for all remaining nios new modules (#43399)
* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml

new nios module integration test support

* fix pep8 error

* fix pep8 error

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end
2018-08-01 08:54:01 +05:30
Felix Fontein
d4c16f51be New acme_* integration test using ACME test docker container (#41626)
* Using ACME test container for acme_account integration test.

* Removing dependency on setup_openssl. Waiting for controller and Pebble.

* More tinkering.

* Reducing number of tries.

* One more try.

* Another try.

* Added acme_certificate tests.

* Removed double key.

* Added tests for acme_certificate_revoke.

* Making task names more meaningful (during certificate generation).

* Using newer test container which integrates letsencrypt/pebble#137. Adding test for revoking certificate by its private key.

* Using new version of Pebble which limits the random auth delay.

* Simplifying certificates for revocation tests.

* Reworking acme_certificate tests (there are now more, but they are faster).

* Test whether account_key_content works.

* Preparing TLS-ALPN-01 support.

* Using official Ansible image of testing container on quay.io.

* Bumping version.

* Bumping version of test container to 1.1.0.

* Adjusting to new CI group names.

* Pass ACME simulator IP as playbook variable.

* Let test plugin wait for controller and CA endpoints to become active.

* Refactor common setup parts of tests to setup_acme.

* _ -> dummy

* Moving common obtain-cert.yml to setup_acme.
2018-07-30 11:10:17 -07:00