Commit Graph

1429 Commits (0d7530e6daad519df6c6b421ad457b2d6c8573c8)

Author SHA1 Message Date
Robin Roth 37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
8 years ago
Robin Roth 2b104fe6ad fix tests for SLES and CoreOS
* include #15230
8 years ago
Robin Roth b48e628429 test git version before running test on depth 8 years ago
= 157072a39f Windows: win_regedit integration tests (following https://github.com/ansible/ansible-modules-extras/pull/2034 ) 8 years ago
Cambell cdf6e3e4bf feature/copy-vault-dataloader: Add method get_real_file(file_path) to dataloader
- get_real_file will decrypt vault encrypted files and return a path to
  a temporary file.

- cleanup_real_file will remove a temporary file created previously with
  get_real_file
8 years ago
Robin Roth 776bffb52b Expand git integration test (#15391)
* add testcases to git for depth

* also in combination with refspec, which gets more tricky

* add testcase for ansible/ansible-modules-core#527
8 years ago
Robin Roth 3c883d8a6d add testcases from refactor PR 8 years ago
Matt Clay af8258cdf2 Revert "Increase verbosity of connection tests." (#15305) 8 years ago
Toshio Kuratomi 208ad36ce4 Merge pull request #15344 from abadger/ziploader
Ziploader "recursive imports" and caching
8 years ago
Jonathon Klobucar 7bee994e1c Fix for serial when percent amount is less than one host (#15396)
Ansible when there was a percentage that was calculated to be less than
1.0 would run all hosts as the value for a rolling update.

The error is due to the fact that Python will round a
float that is under 1.0 to 0, which will trigger the case of
0 hosts. The 0 host case tells ansible to run all hosts.

The fix will see if the percentage calculation after int
conversion is 0 and will else to 1 host.
8 years ago
Toshio Kuratomi 75546678d9 Fix unittests 8 years ago
Toshio Kuratomi dcc5dfdf81 Controller-side module caching.
This makes our recursive, ast.parse performance measures as fast as
pre-ziploader baseline.

Since this unittest isn't testing that the returned module data is
correct we don't need to worry about os.rename not having any module
data.  Should devise a separate test for the module and caching code
8 years ago
Matt Martz dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
8 years ago
nitzmahone 698ae7c383 ensure test_win_user fails on bogus error
We weren't previously checking the error message- it failed as expected, but for the wrong reason.
8 years ago
Strahinja Kustudić eed6cf5dad Adds 'ansible_check_mode' boolean magic variable
* Makes it possible to pass any options variable to VariableManager
  by changing `load_options_vars(options)` in `lib/ansible/utils/vars.py`
8 years ago
Matt Martz 6e9c09d7f7 Utilize urllib3.contrib.pyopenssl functionality for SNI capability in python versions lacking SNI support
Also add SNI tests, move test_uri to destructive since we are messing with packages for SNI testing
8 years ago
Toshio Kuratomi 4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
8 years ago
jpic 4985411816 Test other use-cases for PluginLoader's config 8 years ago
jpic da175d0a57 Bugfix: proper plugin configuration was reset
Before this patch, if config was ['/some/path'] then it would enter the
else block and config would be set to [].

The regression this patch fixes was introduced by 700db154.
8 years ago
Toshio Kuratomi 4b0f65a3e5 Merge pull request #15207 from mattclay/verbose-test
Increase verbosity of connection tests.
8 years ago
Matt Davis 3f70d7a70d Merge pull request #15144 from mattclay/winrm-test
Add winrm tests and fix exposed unicode errors.
8 years ago
James Cammarata 180a0a8e77 Fixing up the logic in the test_script tests removal portion 8 years ago
Matt Clay 262c341cda Add connection tests for winrm connection plugin.
These are the same tests used for the other connection plugins,
adapted to use winrm modules and Windows friendly paths.
8 years ago
Matt Clay a0361626c9 Increase verbosity of connection tests. 8 years ago
James Cammarata 5fdac707fd New unit tests for #13630 fix 8 years ago
René Moser f2a81e580d Merge pull request #15169 from mgruener/test_cloudflare_dns
Integration tests for the cloudflare_dns module
8 years ago
James Cammarata d00ac6e2d1 Merge pull request #15072 from rajatguptarg/fix-requirements
Add pycrypto as a requirement to run tests
8 years ago
Michael Gruener 94806e1953 Add integration tests for the cloudflare_dns module 8 years ago
Brian Coca 1ebc2fda71 removes python requirement to script
mistakenly added when checksum was made to use stat module
fixed assertion in test
8 years ago
Matt Clay 943e4d37f5 Run more connection tests in Docker.
Connection tests are now run before non_destructive to make sure
that the known_hosts file in our Docker image has not been removed.
8 years ago
Toshio Kuratomi 52e9209491 Don't create world-readable module and tempfiles without explicit user permission 8 years ago
Toshio Kuratomi 1802e09b08 Exclude .tox from paths scanned for urlopen 8 years ago
Toshio Kuratomi d3583108ec Fix log_invocation test on python2 with hash randomization 8 years ago
Matt Martz ad30bad14f Skip test_module_utils_basic__log_invocation until we can figure out the cause of the failure 8 years ago
Matt Martz a6d52ce098 Ensure that any command in run_tests.sh that fails results in immediate failure 8 years ago
Toshio Kuratomi c3548677de Add TEST_FLAGS to test_hash 8 years ago
James Cammarata 6afed7083a Revert "Use docker cp instead of docker volumes to allow for testing with remote docker servers"
This reverts commit 18599047cd.
8 years ago
James Cammarata 90ffb8d8f0 Also remove volumes when removing containers 8 years ago
James Cammarata 9a2c1cf94d Force removal of docker container after test ends 8 years ago
Matt Martz 18599047cd Use docker cp instead of docker volumes to allow for testing with remote docker servers 8 years ago
James Cammarata 081c33c451 Adding a docker pull to the run_tests.sh script 8 years ago
James Cammarata 395ff361d4 Adding acl package to all docker images 8 years ago
Toshio Kuratomi 3511abb9d9 Merge pull request #15055 from ansible/ansible_sudo_pass-should-override-cli
Fix ansible_sudo_pass inventory variable so that it overrides setting of sudo password from the command line
8 years ago
Brian Coca 9c6b49fd3d Merge pull request #15004 from agx/zypper-repository-integration-tests
Integration tests for zypper repository
8 years ago
Toshio Kuratomi ed9e164b80 Fix ansible_sudo_pass inventory variable so that it overrides setting of sudo password from the command line 8 years ago
Rajat Gupta dd27157b9d Add pycrypto as a requirement to run tests 8 years ago
James Cammarata 7460f76f8d Merge pull request #15052 from mattclay/travis-docker-ssh
Add ssh client and server to docker containers.
8 years ago
Matt Clay 4224c11b5f Combine new RUN commands into one RUN command. 8 years ago
Toshio Kuratomi 6824f3a7cc Change url so that we don't test https in the tests for file perms 8 years ago
Toshio Kuratomi cbd93b6ad3 Add integration test for #11821 8 years ago
Matt Clay da99e4e0aa Add ssh client and server to docker containers.
This will allow for future integration tests using ssh to localhost
from within docker containers running on Travis.
8 years ago
nitzmahone b95286c88e re-integrate test_test_infra output checking
added secondary run with overridden inventory/test args per bcoca request
8 years ago
nitzmahone 6578e63e63 improve test_test_infra debug messaging, rc check 8 years ago
Toshio Kuratomi bdf90d20dd Add :Z to mount the volume. This is a docker-1.7+ option that makes the mount properly relabel for selinux 8 years ago
Brian Coca db61e9be0c add ansible_executable inventory var
also handle the overrides appropriately
also new executable to set shell type
8 years ago
Toshio Kuratomi e80cd8bcaf Merge pull request #14908 from mattclay/mysql-connect-timeout
Document mysql connect_timeout and update tests.
8 years ago
James Cammarata 8eadc1d8eb Adding more unit tests for AnsibleModule things in basic.py 8 years ago
Matt Clay 9a922fcf0d Update test to use mysql connect_timeout option. 8 years ago
Guido Günther 2095d1ab33 Integration tests for zypper repository 8 years ago
Rene Moser 5d5d905e36 cloudstack: new integration tests test_cs_resourcelimit 8 years ago
Rene Moser 4d6a15ebc3 cloudstack: new integration tests test_cluster 8 years ago
Rene Moser d50026b108 cloudstack: new integration tests test_cs_pod 8 years ago
Rene Moser ae6d2a5602 cloudstack: new integration tests test_cs_instance_facts 8 years ago
Rene Moser d9f7589460 cloudstack: new integration tests test_cs_configuration 8 years ago
René Moser 7587c20d27 Merge pull request #13183 from resmo/for-ansible
[2.1] cloudstack: add tests for cs_volume
8 years ago
Toshio Kuratomi ea58ccfd5e Make the fact gathering give a little more information on failure 8 years ago
James Cammarata 88310a7f28 Adding iproute to certain RH-based docker images 8 years ago
Toshio Kuratomi 9a6a5a5516 add a fact gathering check for the default of all 8 years ago
Toshio Kuratomi f0e6d28815 Make integration tests for fact gathering assert on failure 8 years ago
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 8 years ago
Yannig Perré 88772b6003 Add a way to restrict gathered facts in Ansible:
- Using gather_subset options
- By ignoring ohai/chef or facter/puppet facts
8 years ago
James Cammarata 81788e627d Adding unit tests for TaskResult 8 years ago
James Cammarata 2fa1936ff9 Adding python-dev to the list of packages for ubuntu1204 docker
[ci skip]
8 years ago
James Cammarata 9d459386ce Also adding an upgrade of pycrypto to ubuntu1204 config 8 years ago
James Cammarata 90afc5e7d2 Adding rubygems to the ubuntu1204 docker config
[no ci]
8 years ago
James Cammarata af282eb979 Fixing typo in ubuntu1204 docker config 8 years ago
James Cammarata ff5584a349 Updating jinja2 in ubuntu1204 docker image 8 years ago
James Cammarata 1222830155 Initial commit for Ubuntu 12.04 docker config for testing 8 years ago
Matt Clay a44b88936b Add unicode dir to connection tests. 8 years ago
Dag Wieers 5775739437 Moving samples/ out of the root into test/
Since samples/ is used for v2 testing, it fits better into the existing test/ structure.
9 years ago
James Cammarata 286d91d722 Reorganizing tox stuff and making py3-specific requirements 9 years ago
James Cammarata ab682b2917 Moving docker tests to pre-compiled images 9 years ago
James Cammarata adc9a25a06 Merge pull request #14904 from mattclay/mysql-test-timeout
Lower connect timeout for test_mysql_variables.
9 years ago
James Cammarata c6af811573 Fixing equality check in run_tests.sh for sanity 9 years ago
Matt Clay 20eee14a2c Lower connect timeout for test_mysql_variables. 9 years ago
Brian Coca 7e3c92e909 predictable docker names and autoremove if no fail 9 years ago
James Cammarata f700a7e3ce Removing forced pull from build step in run_tests.sh 9 years ago
Matt Clay 5c206eaf0b Add additional plugins to connection tests.
- docker
- libvirt_lxc
- jail

These tests will not run as part of the build, but can be run manually.
9 years ago
Brian Coca a07495e4c8 allow tests to run with parameters
also fixed test_test_infra to allow tags
9 years ago
James Cammarata c2441c15c3 Revert "corrected failed_when test"
This reverts commit 140df20504.
9 years ago
James Cammarata 963178f392 Revert "complete correction of test, key exists but is false"
This reverts commit 7e6343213b.
9 years ago
Brian Coca 923548f6d5 removed test_infra from setup as it fails when using --tags 9 years ago
Brian Coca 7e6343213b complete correction of test, key exists but is false 9 years ago
Brian Coca 140df20504 corrected failed_when test 9 years ago
nitzmahone 6c835b2600 ensure assert and fail work before we test anything else 9 years ago
Toshio Kuratomi 2b8a0cdddc Fix ssh connection unittests for python3.4 9 years ago
James Cammarata 9d61a6cba8 Fixing PlayIterator bugs
* Unit tests exposed a problem where nested blocks did not correctly
  hit rescue/always portions of parent blocks
* Cleaned up logic in PlayIterator
* Unfortunately fixing the above exposed a potential problem in the
  block integration tests, where a failure in an "always" section may
  always lead to a failed state and the termination of execution
  beyond that point, so certain parts of the block integration test
  were disabled.
9 years ago
James Cammarata f0d3284ead Adding more unit tests for ssh connection plugin 9 years ago
James Cammarata 2f472fd4e9 Adding start of ssh connection unit tests 9 years ago
Matt Davis 22344c5320 Merge pull request #14812 from mattclay/test-connection
Add tests for connection plugins.
9 years ago