Commit Graph

1620 Commits (4ed88512e45112f9670560ac3f01707a40a7f5c5)

Author SHA1 Message Date
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.
8 years ago
James Cammarata 286d91d722 Reorganizing tox stuff and making py3-specific requirements 8 years ago
James Cammarata ab682b2917 Moving docker tests to pre-compiled images 8 years ago
James Cammarata adc9a25a06 Merge pull request #14904 from mattclay/mysql-test-timeout
Lower connect timeout for test_mysql_variables.
8 years ago
James Cammarata c6af811573 Fixing equality check in run_tests.sh for sanity 8 years ago
Matt Clay 20eee14a2c Lower connect timeout for test_mysql_variables. 8 years ago
Brian Coca 7e3c92e909 predictable docker names and autoremove if no fail 8 years ago
James Cammarata f700a7e3ce Removing forced pull from build step in run_tests.sh 8 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.
8 years ago
Brian Coca a07495e4c8 allow tests to run with parameters
also fixed test_test_infra to allow tags
8 years ago
James Cammarata c2441c15c3 Revert "corrected failed_when test"
This reverts commit 140df20504.
8 years ago
James Cammarata 963178f392 Revert "complete correction of test, key exists but is false"
This reverts commit 7e6343213b.
8 years ago
Brian Coca 923548f6d5 removed test_infra from setup as it fails when using --tags 8 years ago
Brian Coca 7e6343213b complete correction of test, key exists but is false 8 years ago
Brian Coca 140df20504 corrected failed_when test 8 years ago
nitzmahone 6c835b2600 ensure assert and fail work before we test anything else 8 years ago
Toshio Kuratomi 2b8a0cdddc Fix ssh connection unittests for python3.4 8 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.
8 years ago
James Cammarata f0d3284ead Adding more unit tests for ssh connection plugin 8 years ago
James Cammarata 2f472fd4e9 Adding start of ssh connection unit tests 8 years ago
Matt Davis 22344c5320 Merge pull request #14812 from mattclay/test-connection
Add tests for connection plugins.
8 years ago
Matt Martz 8aee648bc9 Add as dependency of the parsing make target 8 years ago
Matt Martz 098333b2ec Fix redirects for get_url
* fetch_url shouldn't both accept follow_redirects and support follow_redircts via module.params
* Default follow_redirects for open_url should be 'urllib2'
* Add redirect test for get_url
8 years ago
James Cammarata 299d93f6e9 Updating unit tests for PlayIterator
This knowingly introduces a broken test, planning to fix that later.
8 years ago
James Cammarata 8cfdaa16f4 Fixing error in localedef usage for f23 docker image 8 years ago
James Cammarata 0e17a6f036 Another attempt at fixing random f23 locale failures in docker image 8 years ago
James Cammarata 2ee0c1b175 Fixing centos6 docker image for pycrytpo too 8 years ago
James Cammarata 762c99f77c Fixing centos6 docker image to upgrade jinja2 8 years ago
James Cammarata 56670bd150 More tweaks for fedora on docker 8 years ago
James Cammarata b97a98f69e Trying to fix up the fedora23 docker image 8 years ago
James Cammarata b72cd3a6d2 Adding fedora rawhide to the travis mix 8 years ago
James Cammarata c632873936 Adding centos 6 to the travis mix 8 years ago
James Cammarata e5844ee03d Revert "Testing adding -j2 to the run_tests.sh script to speed up docker tests"
This reverts commit db2a0ae255, as it does not
add any speed to the tests on Travis.
8 years ago
James Cammarata db2a0ae255 Testing adding -j2 to the run_tests.sh script to speed up docker tests 8 years ago
Matt Clay 49892b287b Use vars to eliminate redundant test commands. 8 years ago
Matt Clay ca62bc5db3 Add tests for connection plugins. 8 years ago
James Cammarata 981f451f0e Adding fedora 23 to the Docker tests on travis 8 years ago
James Cammarata 7f34705b0c Fixing up Dockerfiles some more to get tests passing fully 8 years ago
James Cammarata fa630872d9 Minor update to the Dockerfiles 8 years ago
James Cammarata 069e597aaa Fixing locale stuff in ubuntu 14.04 Dockerfile 8 years ago
James Cammarata f56af2ec3f Updating docker files for tests 8 years ago
James Cammarata e4acd44e23 Make sure test script fails on any error 8 years ago
Matt Martz d8876b5c03 Run /sbin/init in the ubuntu docker image, as we do with centos 8 years ago
James Cammarata 92dcad8e99 Adding docker container capabilities to Travis 8 years ago
James Cammarata 80b10bd669 Moving creating of testing work dir out of dep role and into Makefile 8 years ago
Toshio Kuratomi 7160b40ab1 Fix the Makefile to run under dash (POSIX /bin/test syntax) 8 years ago
James Cammarata b853e932d1 Adding unit tests for symbolic mode conversion stuff in basic.py 8 years ago
James Cammarata 18240d350c Adding a skip for the literal_eval test on py3 8 years ago
James Cammarata 0ea3a9d08d Removing tabs from test_basic.py 8 years ago
James Cammarata 1de9357c2f Attempt at cleaning up issues introduced by new basic.py unit tests 8 years ago
James Cammarata e011f52557 Expanding unit tests for module_utils/basic.py 8 years ago
Matt Davis 3d58fd1402 Merge pull request #13481 from jhawkesworth/a21_reg_merge_tests
windows; adding integration tests for win_regmerge (extras module)
8 years ago
James Cammarata c56e3aabfb Clean up jsonify unit test with format to remove json lib differences 8 years ago
James Cammarata 7c049c3200 Fixing up jsonify and adding unit tests 8 years ago
James Cammarata a9d25f455c More unit tests for ActionBase 8 years ago
James Cammarata e588437067 Adding some unicode params to the ActionBase module formatting test 8 years ago
Toshio Kuratomi 7cb29cdbec Workaround py2.6's StringIO 8 years ago
Toshio Kuratomi b70bf3b056 Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3 8 years ago
Toshio Kuratomi c29f51804b Fix mixing of bytes and str in module replacer (caused traceback on python3) 8 years ago
James Cammarata 01d835700b Cleaning up some py version problems with ActionBase unit tests 8 years ago
James Cammarata 3518a05db6 Starting to expand unit tests for ActionBase plugin class 8 years ago
James Cammarata 9de24a3735 Assert things against the recursive copy result to make sure it did something 8 years ago
James Cammarata e02b98274b issue callbacks per item and retry fails
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor

fixes #14558
fixes #14072
8 years ago
Matt Martz cacb74aeeb Merge pull request #14340 from sivel/uri-no-httplib2
Add RedirectHandler class for controlling redirects in urllib2
8 years ago
Matt Martz 3e9408e317 Add some additional integration tests that mix SSL verification and redirects 8 years ago
John Barker 4fb1839ebe non-destructive says we should run test_binary at v2
We are now using Ansible v2 and these tests pass, so run them.
8 years ago
Brian Coca 3b3709e715 Merge pull request #14488 from bcoca/become_shell_fixes
shell + become fixes
8 years ago
James Cammarata 58a6cf822a Merge pull request #13203 from willthames/galaxy_10620
Allow tree-ish versions for ansible-galaxy
8 years ago
Brian Coca 6dc910c13a shell + become fixes
1 less level of shell + quoting
simplified become commands, less quote and shell
9 years ago
Brian Coca bb155e1142 added test for cartesian lookup 9 years ago
Brian Coca 08b3dbcda3 corrected several usages of deprecated bare vars 9 years ago
Brian Coca ba51ed06cf changed from deprecated implicit bare var 9 years ago
Matt Martz 97e0f29a5b Add/improve tests for the uri module 9 years ago
James Cammarata b713f1ca53 Fix for copy test as ansible_ssh_user is not set by default now 9 years ago
James Cammarata 8039ceee0f Tweak block integration tests to also test the free strategy 9 years ago
James Cammarata 5466510edb Removing .out file for integration tests and adding to .gitignore 9 years ago
James Cammarata f4bd3be71f Adding block integration tests 9 years ago
Robin Roth ed059ffca9 add integration test for ansible-pull
* this test includes the behavior described in #13688 and #13681
* it runs a minimal playbook and checks for correct use of inventory and limit
9 years ago
Toshio Kuratomi 0e410bbc8a Squashing was occuring even though pkgs didn't have a template that would be affected by squash
This broke other uses of looping (looping for delegate_to in the
reported bug)

Fixes #13980
9 years ago
Brian Coca fad6eb1844 fixed unit test to match new output of become/su 9 years ago
Brian Coca 46fde754af Merge pull request #14044 from skorochkin/devel
Adding support for scm-based role source urls (ansible-galaxy)
9 years ago
James Cammarata fb797a9e77 Fixing role dependency chain creation
The dep chain for roles created during the compile step had bugs, in
which the dep chain was overwriten and the original tasks in the role
were not assigned a dep chain. This lead to problems in determining
whether roles had already run when in a "diamond" structure, and in
some cases roles were not correctly getting variables from parents.

Fixes #14046
9 years ago
Sergii Korochkin 13e8732598 [hotfix] add missed playbook file 9 years ago
Sergii Korochkin 1325c21ca0 Adding support for scm-based role source urls (incl. integration test to cover it) 9 years ago
Toshio Kuratomi d97d28ecb0 Merge pull request #14025 from ansible/run_command-env-rework
rework run_command's env setting to not change os.environ for the res…
9 years ago
Toshio Kuratomi a68d90a71a rework run_command's env setting to not change os.environ for the rest of the module.
New param to run_command to modify the environment for just this invocation.
Documentation and comment adjustments.
9 years ago
Brian Coca c09c01a1f5 go back to defaulting wrapping commands in shell
this was taken out in an effort to default to the user's shell but creates issues as this is not known ahead of time
and its painful to set executable and shell_type for all servers, it should only be needed for those that restrict the user
to specific shells and when /bin/sh is not available. raw and command may still bypass this by explicitly passing None.
fixes #13882

still conditional
9 years ago
James Cammarata b1223746cd Relocate use of ERROR to display class, to avoid doubling up 9 years ago
Brian Coca 27f4730c29 correctly deals with non serializable type
combine_vars shoudl really be data types, but some just get in
in test, add dict to mock and avoid combine_vars using object
9 years ago
Matt Davis acf49cf837 Merge pull request #13569 from mattclay/apt-repository-filename
Test for filename option in apt_repository module.
9 years ago
Toshio Kuratomi bcb22b0e1a Integration tests for https://github.com/ansible/ansible-modules-core/pull/558 9 years ago
James Cammarata 749fbd43ef Removing test for map filter until we can figure out how that's supposed to work 9 years ago
Brian Coca e7804a6fdd fixed test to use hostvars and not expect vars sub
vars is at the same level as hostvars and was only included in hostvars
temporarily as a bug
9 years ago
Toshio Kuratomi 46903c80fa More fixes for unicode handling in the connection plugins.
Tested that ssh, docker, local, lxc-libvirt, chroot all work with the
updated unicode integration test.
9 years ago
Toshio Kuratomi c0a8cd950b Fix problems with non-ascii values passed as part of the command to connection plugins
@drybjed discovered this with non-ascii environment variables and
command line arguments to script and raw module.
9 years ago
Toshio Kuratomi 1ed3a018eb Revert "Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638."
This reverts commit e70061334a.

Going to do this in the connection plugins
9 years ago
James Cammarata 2d11cfab92 Squashed commit of the following:
commit 24efa310b58c431b4d888a6315d1285da918f670
Author: James Cammarata <jimi@sngx.net>
Date:   Tue Dec 29 11:23:52 2015 -0500

    Adding an additional test for copy exclusion

    Adds a negative test for the situation when an exclusion doesn't
    exist in the target to be copied.

commit 643ba054877cf042177d65e6e2958178bdd2fe88
Merge: e6ee59f 66a8f7e
Author: James Cammarata <jimi@sngx.net>
Date:   Tue Dec 29 10:59:18 2015 -0500

    Merge branch 'speedup' of https://github.com/chrismeyersfsu/ansible into chrismeyersfsu-speedup

commit 66a8f7e873
Author: Chris Meyers <chris.meyers.fsu@gmail.com>
Date:   Mon Dec 28 09:47:00 2015 -0500

    better api and tests added

    * _copy_results = deepcopy for better performance
    * _copy_results_exclude to deepcopy but exclude certain fields. Pop
    fields that do not need to be deep copied. Re-assign popped fields
    after deep copy so we don't modify the original, to be copied, object.
    * _copy_results_exclude unit tests

commit 93490960ff
Author: Chris Meyers <chris.meyers.fsu@gmail.com>
Date:   Fri Dec 25 23:17:26 2015 -0600

    remove uneeded deepcopy fields
9 years ago
Brian Coca d89d7951e6 fixed tests to follow new invocation structure
also added maxdiff setting to see issues clearly when they happen
9 years ago
Yannig Perré b22d998d1d Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638. 9 years ago
James Cammarata d22bbbf52c Actually disable parallel makes for integration runner 9 years ago
James Cammarata 8119ea37af Dropping instance size back down since we're not doing parallel builds 9 years ago
James Cammarata 45afa642c3 Integration test runner tweaks 9 years ago
James Cammarata 6d6822e66e Kick up the integration runner test image size 9 years ago
James Cammarata 08b580decc Parallelize make command for integration test runner
Also adds a new var, used by the prepare_tests role, to prevent it from
deleting the temp test directory at the start of each play to avoid any
potential race conditions
9 years ago
Brian Coca 2281c455db Merge pull request #13616 from resmo/for-ansible-stable-2.0
[stable-2.0] cloudstack: test_cs_instance: more integration tests
9 years ago
Brian Coca 75e94e0cba allow for non standard hostnames
* Changed parse_addresses to throw exceptions instead of passing None
* Switched callers to trap and pass through the original values.
* Added very verbose notice
* Look at deprecating this and possibly validate at plugin instead
fixes #13608
9 years ago
Brian Coca e957335b0d Merge pull request #13607 from mattclay/test-cache-typo
Fixed import typo for memcache module in tests.
9 years ago
James Cammarata 54455a06e5 Disable docker test for Fedora, due to broken packaging 9 years ago
James Cammarata 3a57d9472c Save output of integration test results to files we can archive 9 years ago
Rene Moser b85b92ecdd cloudstack: test_cs_instance: more integration tests
cloudstack: extend test_cs_instance addressing recovering

cloudstack: test_cs_instance: add tests for using display_name as indentifier.
9 years ago
Rene Moser b0525da8c8 cloudstack: cs_volume: add tests for volume resize
See https://github.com/ansible/ansible-modules-extras/pull/1333
9 years ago
Rene Moser 8b5e553828 cloudstack: add tests for cs_volume 9 years ago
Toshio Kuratomi 6963955cb4 And change the task a little more since different shlex versions are handling the quotes differently 9 years ago
Toshio Kuratomi 21ca0ce1ce Fix test playbook syntax 9 years ago
Toshio Kuratomi 3792a586b5 Since the velox test server seems to be dropping using iptables to drop requests from aws, test via a different website instead 9 years ago
Toshio Kuratomi 8d7892cc7b Done troubleshooting
Revert "Troubleshooting has reduced us to this"

This reverts commit 9abef1a1d7.
9 years ago
Toshio Kuratomi 5fef2c4297 Try updating the centos7 image to a newer version (trying to resolve issue being unable to connect to some webservers) 9 years ago
Toshio Kuratomi b90506341a Fixes for tests that assumed yum as package manager for systems that
have dnf
9 years ago
Toshio Kuratomi 3da312da9c Switch from yum to package when installing sudo so that dnf is handled as well 9 years ago
James Cammarata 3ec0104128 Fixing bugs in conditional testing with until and some integration runner tweaks 9 years ago
Toshio Kuratomi e2d9f4e2f2 Fix unittests for return of invocation from fail_json and exit_json 9 years ago
Toshio Kuratomi 9abef1a1d7 Troubleshooting has reduced us to this 9 years ago
Toshio Kuratomi 51cca87d67 Also need redhat-rpm-config to compile pycrypto 9 years ago
Toshio Kuratomi c63ae99485 Make sure that yum is present on redhat family systems (makes things also work on fedora systems where dnf is the default) 9 years ago
Matt Clay d2ad17e88f Fixed import typo for memcache module in tests.
The typo caused the test for the memcached cache plugin to be skipped
even when the necessary memcache python module was installed.
9 years ago
Toshio Kuratomi f7ed33378e Fix the fedora host detection 9 years ago
Toshio Kuratomi 78dde62710 What is going on here 9 years ago
Toshio Kuratomi 26e5bcdb39 Bugfix the fedora 23 install task 9 years ago
Toshio Kuratomi ec60bfbb3f Ubuntu images with hvm ssd 9 years ago
Toshio Kuratomi 68fe3d856f Fedora 23 needs to have python2 packages installed 9 years ago
James Cammarata 0823a2c16f Removing update all for test deps, it didn't fix the problem 9 years ago
James Cammarata 02f65eaa80 Make integration runner ec2 add_hosts use valid host names 9 years ago
Toshio Kuratomi 1cc83dd0d9 Make tests that use kennethreitz retry. 9 years ago
James Cammarata 73a0153b8e Fix typo in integration test runner role 9 years ago
James Cammarata 0c154e81f0 Make integration tests run in parallel with async 9 years ago
Toshio Kuratomi f2364ecf5f Add a Fedora latest host into the mix 9 years ago
James Cammarata 1debc2da44 Do a full yum update to make sure packages are latest version
For the deps setup of integration tests, as we sometimes see odd
errors we can't reproduce, which may be related to slightly out of
date package dependencies.
9 years ago
James Cammarata 44e30e49dd Add awk to integration test deps list 9 years ago
Toshio Kuratomi a391d6f89a Add state=latest to pip install of pycrypto 9 years ago
James Cammarata 3143b352c5 Add ca-certificates update to the integration deps playbook 9 years ago
Toshio Kuratomi 1f3eec293b Install an updated version of pycrypto on Ubuntu12 from pip 9 years ago
James Cammarata 12c0bb9414 Use --source instead of -e for awk in integration Makefile 9 years ago
Toshio Kuratomi c5eda277ac Fix get_url tests in light of distros backporting SNI support 9 years ago
Toshio Kuratomi 8c6f56f982 kennetreitz.org times out but www.kennethreitz.org is fine 9 years ago
Toshio Kuratomi ce1febe28b debug line needs var not msg 9 years ago
Brian Coca 8db4415e2e changed test to use filter for accurate reporting 9 years ago
James Cammarata 26bbabcfba Consolidating package lines for virtualenv install in test deps integration 9 years ago
James Cammarata cf3d503f79 Moving apt cache update to top to ensure cache is updated before deps installed 9 years ago
James Cammarata 0b1ad8d490 Switch virtualenv dep installation from pip to package manager 9 years ago
James Cammarata dd3d04e96a Adding pip install of virtualenv to test deps integration role 9 years ago
James Cammarata 5fa93ef8fc Merge pull request #13477 from chrismeyersfsu/jenkins-playbooks
Jenkins playbooks
9 years ago
James Cammarata d7f2f606e1 Add has_hostkey to mock objects to fix broken unit tests 9 years ago
James Cammarata 857456ea5f Fixing template integration test for python 2.6 versions
No longer immediately fallback to to_json if simplejson is not installed
9 years ago
Toshio Kuratomi fffd29d1ab Update mysql setup to handle installing mysql with dnf too. 9 years ago
James Cammarata 6109f70397 Attempt at fixing strategy unit test failures on py2.6 and py3 9 years ago
Toshio Kuratomi 1116bc6ca6 Merge pull request #13191 from Jmainguy/mysql
Add shared connection code for mysql modules
9 years ago
Jonathan Mainguy 34e88e48a5 Add shared connection code for mysql modules 9 years ago
Toshio Kuratomi 375eb501b3 Update url to site that has an invalid certificate 9 years ago
Matt Clay 9942d71d34 Test for filename option in apt_repository module. 9 years ago
Michael Scherer a7ac98262d Make module_utils.known_hosts.get_fqdn work on ipv6 9 years ago
Toshio Kuratomi 457f86f61a Minor: Correct type pyhton => python 9 years ago
Toshio Kuratomi fc19ad21ef Merge pull request #13494 from Jmainguy/msyql_hash_tests
add tests for encrypted hash mysql_user
9 years ago
Jonathan Mainguy 49dc9eea16 add tests for encrypted hash mysql_user 9 years ago
James Cammarata 35015aaa4a Merge pull request #13529 from mscherer/add_tests_known_hosts
Add tests for ansible.module_utils.known_hosts
9 years ago
James Cammarata 279c5a3596 Cleanup strategy tests broken by new forking strategy 9 years ago
Michael Scherer 3c4d2fc6f2 Add tests for ansible.module_utils.known_hosts 9 years ago
James Cammarata 97554fc222 Fixing filter test for extract to use proper group 9 years ago
James Cammarata c402325085 Fixing up docker integration tests a bit 9 years ago
Toshio Kuratomi 04fc3f118f Code smell test for specifying both required and default in FieldAttributes 9 years ago
Chris Meyers 8d66dcda21 remove .gitignore 9 years ago
Chris Meyers f16628ffec symbolic link role for testing 9 years ago
Chris Meyers 57391f49ba removed ansible_python_interpreter
* added missed renames of ansible_deps to ansible_test_deps
* removed acidential inventory.dynamic file
* modified README for ansible_test_deps role
9 years ago
= ea72fd6547 adding integration tests for win_regmerge module (extras) 9 years ago
Chris Meyers 822624d061 rename role ansible_deps to ansible_test_deps 9 years ago
Chris Meyers 05c8bb79f8 playbook that Ansible jenkins runs moved into core
The playbook is already running in jenkins and works. This moves the
assets into core for ease of maintenance going forward.
9 years ago
James Cammarata 750adbaa27 Changing up how host (in)equality is checked
Fixes #13397
9 years ago
Toshio Kuratomi cfeef81303 For now, skip tests of module_utils/basic functions that are failing on
py3 (these are only run on the target hosts, not on the controller).
9 years ago
Brian Coca 7d073bdd17 Merge pull request #13345 from amenonsen/extract
Add an 'extract' filter
9 years ago
Toshio Kuratomi e00012994e Also some unicode tests for return_values() 9 years ago
Toshio Kuratomi 5fdfe6a0f2 Add some test data that has unicode values 9 years ago
Toshio Kuratomi ac54ac618c Something's strange... let's see if python2.6 is really the same now... 9 years ago
Toshio Kuratomi eb7db067f9 Fix template test results on python2.6 9 years ago
Abhijit Menon-Sen 8cf1815867 Add an 'extract' filter
At its most basic, this is nothing more than an array or hash lookup,
but when used in conjunction with map, it is very useful. For example,
while constructing an "ssh-keyscan …" command to update known_hosts on
all hosts in a group, one can get a list of IP addresses with:

    groups['x']|map('extract', hostvars, 'ec2_ip_address')|list

This returns hostvars[a].ec2_ip_address, hostvars[b].ec2_ip_address, and
so on. You can even specify an array of keys for a recursive lookup, and
mix string and integer keys depending on what you're looking up:

    ['localhost']|map('extract', hostvars, ['vars','group_names',0])|first
        == hostvars['localhost']['vars']['group_names'][0]
            == 'ungrouped'

Includes documentation and tests.
9 years ago
Brian Coca c03afccc05 reformated test, changed big assert to with_items
much easier to see the individual condition that causes the failure
when using with_items and evaluating each part of the assert individually
9 years ago
James Cammarata dc0fae1af7 Also make sure remote_user is defaulted correctly for delegated hosts
Fixes #13323
9 years ago
Chris Church f3476b556d Add assertions for ansible_date_time in setup result. 9 years ago
James Cammarata 3c8c2fb090 Merge pull request #13208 from agx/zypper-integration-test
Add integration tests for zypper
9 years ago
James Cammarata e62fb04a2e Merge pull request #13229 from zarnovican/bza_fix_test_hg
test_hg fix: remove reference to "head"
9 years ago
James Cammarata 138068c56e Merge pull request #13230 from zarnovican/bza_fix_test_svn
test_svn fix: remove hardcoded "~/ansible_testing/svn" path
9 years ago
Chris Church 272778f732 Modify task executor to reuse connection inside a loop. Fix WinRM connection to set _connected properly and display when remote shell is opened/closed. Add integration test using raw + with_items. 9 years ago
Brano Zarnovican a30a52ef52 test_svn fix: remove hardcoded "~/ansible_testing/svn" path 9 years ago
Brano Zarnovican 5fc64deffe test_hg fix: remove reference to "head"
ERROR! error while evaluating conditional: head.stat.isreg

This is remnant from earlier change 50e5d81777
which removed stat on head file..
9 years ago
James Cammarata 91500f8f5f Fix include param precedence in variable manager 9 years ago
Guido Günther 0821d251c8 Add integration tests for zypper
Modeled after the yum tests but also tests local package installations
as fixed with PR#1256.

This depends on PRs #1256, #1261 and #1262 in ansible-modules-extra.
9 years ago
Will Thames ff19233ad3 Add tests for #10620 9 years ago
Brano Zarnovican 90f99f29ae unittest cover for 'run_command'
All os.*, subprocess.* is mocked to avoid side-effects.
Tests are skipped in Py3, since 'run_command' is not Py3-ready, yet.
9 years ago
Brian Coca e61882ca19 Merge pull request #13170 from robinro/integration_test_git_ansible-modules-core_pull_721
add test for changing git remote url
9 years ago
nitzmahone 349e072a74 fix for dynamic (add_host) hosts not available in hostvars
Looks like there are two pattern caches that need to be cleared for this to work- added the second one.
Added integration tests for add_host to prevent future regressions.
9 years ago
Will Thames 4f3430ebeb Handle unexpected database presence
Check for database presence in a nice way, rather than
dropping the database.

Thankfully there was a syntax error in the previous
version, so no database would have been dropped.
There was no check for whether it succeeded or not.
9 years ago
Robin Roth 6cefdfe148 add test for changing git remote url
integration test for https://github.com/ansible/ansible-modules-core/pull/721
clone a repo from one url
clone an updated version of that repo from a new url
make sure the remote url and the working copy are updated
9 years ago
Brian Coca 5d645f3a8b Merge pull request #13127 from willthames/test_become
Elevate privileges when checking for file existence
9 years ago
Toshio Kuratomi 318bfbb207 Migrate cli and dependencies to use global display 9 years ago
Brian Coca 206cc50bd9 breaks testing in non virtual envs, since env var can be used in those
cases removing it from here
9 years ago
Will Thames 5bb759e7ab Elevate privileges when checking for file existence
Certain OSs default to home directories as 0700
Without elevating privileges, checking for file existence
fails.
9 years ago
Toshio Kuratomi 74fe9d236a Add a disabled test for accessing private attributes of other objects
Need to cleanup the code before we can enable this test.
9 years ago
Toshio Kuratomi aa034f4fcf Add unit tests for issue #12976 9 years ago
Toshio Kuratomi 37052a983a Fix unittest dailure with the new squash items code 9 years ago
James Cammarata 23ff08ee6b Merge pull request #13016 from dvarrazzo/pip-vcs-changed
Added tests to verify pip installation with VCS urls
9 years ago
Will Thames 91b6004149 Allow blank lines and comments/spaces in galaxy spec files
Fixes #10641 again. (Regression)
Added test to discourage future such regression.
9 years ago
Scott Miller 98b694f5ca Update README.md 9 years ago
Daniele Varrazzo 542a430e84 Added tests to verify pip installation with VCS urls
The test reproduces:
- bug ansible/ansible#1705
- bug ansible/ansible-modules-core#1645
9 years ago
Brian Coca c267e1906e removed invocation from tests as it is only available on very very verbose mode 9 years ago
Chris Meyers 4b88cce6a1 update ansible_test_service checksum 9 years ago
Brian Coca 174de1161b fixed removing -n in password sudo tests 9 years ago
Brian Coca b2fc5142eb moved sudo -S and -n into configurable flags as they might be absent in much older systems
if password is supplied exsiting -n would get remove from flags
9 years ago
James Cammarata 1910f23144 Merge pull request #12801 from chrismeyersfsu/fix-test_destructive_init
run correct init system tests
9 years ago
James Cammarata 9b22004540 Merge pull request #12795 from chrismeyersfsu/fix-test_destructive_mysql_user
remove module param quotes
9 years ago
Toshio Kuratomi 4203850d1a Break apart a looped dependency to show a warning when parsing playbooks
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
9 years ago
Brian Coca f78c82b9ee don't set user to current user
also remove condition to bypass setting user if user matches current user
this enables forcing user when set to the same user as current user and ignoring .ssh/config
while keeping .ssh/config with current user if nothing is specified.
9 years ago
Toshio Kuratomi ce2b18174e Merge pull request #12878 from ansible/invocation-fix
Invocation fix
9 years ago
Toshio Kuratomi 2e87c1f74e Two fixes to action plugins
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
  module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
  value from the base class run() method into account so that invocation
  makes its way to the output.

Fixes #12869
9 years ago
James Cammarata 86de1429e5 Cleaning up FIXMEs 9 years ago
Toshio Kuratomi ed6aa75d63 Add parsing test to travis to catch that invocation is missing 9 years ago
Toshio Kuratomi 6b6d03290a Restore the automatic addition of invocation to the output
Revert "Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data."

This reverts commit 6ce6b20268.

Remove the note that invocation was removed as we've now restored it.

Revert "keyword not in ubuntu 14.04"

This reverts commit 5c01622457.

Revert "remove invocation keyword check"

This reverts commit 5177cb3f74.
9 years ago
Will Thames 002972c6cf Allow meta/main.yml to include roles through spec file
ansible-playbook now works when run with a playbook
that includes a role that includes another role
specified using csv format

Updated one of the roles used in the tests to fix
broken tests - `make test_galaxy` now works

Fixes #11486. Also addresses the problem alluded to in #10620.
9 years ago
Toshio Kuratomi 5a0e63af1e Workaround seeming bug in python-2.6's sys.exit() 9 years ago
Toshio Kuratomi 6e5055e786 Update the use of no_log values to cover everything that heuristic_log_sanitize does.
Fixes #12792
9 years ago
Chris Meyers 6c265cde49 invoke systemd test for ubuntu >= 15.04 else invoke upstart test 9 years ago
Toshio Kuratomi c2d188baff Hide values in json returns which were given in parameters marked no_log. 9 years ago
Toshio Kuratomi a22cf8ffc1 Properly add the new test and limit six test to lib 9 years ago