Commit Graph

2531 Commits (47738eb1ddc99dca5913031bcd44650afd901b14)

Author SHA1 Message Date
Toshio Kuratomi 9265016b95 Fix a test failure when run on a system with python-future installed. 9 years ago
Toshio Kuratomi 6a61b6d431 Add a whitelist for checking for six. Use it for digital_ocean.py 9 years ago
Toshio Kuratomi 1efe782b46 Refactor parsing of CLI args so that we can modify them in the base class
Implement tag and skip_tag handling in the CLI() class.  Change tag and
skip_tag command line options to be accepted multiple times on the CLI
and add them together rather than overwrite.

* Make it configurable whether to merge or overwrite multiple --tags arguments
* Make the base CLI class an abstractbaseclass so we can implement
  functionality in parse() but still make subclasses implement it.
* Deprecate the overwrite feature of --tags with a message that the
  default will change in 2.4 and go away in 2.5.

* Add documentation for merge_multiple_cli_flags
* Fix galaxy search so its tags argument does not conflict with generic tags
* Unit tests and more integration tests for tags
9 years ago
Toshio Kuratomi 23305540b4 Make ini parsing slightly more robust
Prior to this commit, the ini parser would fail if the inventory was
not 100% utf-8.  This commit makes this slightly more robust by
omitting full line comments from that requirement.

Fixes #17593
9 years ago
Toshio Kuratomi 08a58ae025 Fix for run_command tests now that it returns native strings 9 years ago
Toshio Kuratomi 5bc3cb278c Remove unicode escape (#17866)
* Remove unicode-escape which is not present on python3

Alternative fix for #17305

* Enable the assemble test on python3

* Fix other problems with assemble on python3
9 years ago
Matt Davis aa0ad073b8 bugfixes to JSON junk filter, added unit/integration tests to exercise (#17834) 9 years ago
Matt Clay 21857e8618 Disable privileged mode on Shippable. (#17844) 9 years ago
Brian Coca dfff608ceb dzdo prompt fix
fixed tests
dzdo has 2 paths now, with and w/o password
fixes #17838
9 years ago
jctanner fff161f2f6 Smart mode for sftp+scp (#17813)
If the sftp fails, roll over to scp by default. This saves users
from having to know about the scp_if_ssh method when sftp is broken
on the remote host.
9 years ago
Adrian Likins 1f03801fcc mv test_git to 'destructive' integration tests (#17526)
The test_git role removes ~/.ssh/known_hosts currently
and that is destructive.
9 years ago
Toshio Kuratomi 4452ee86bd Turn mount test back on (#17797)
* Turn mount test back on

* Mount tests need PRIVILEGED so turn that back on

Revert "Revert "Set PRIVILEGED=true for non_destructive tests. (#17733)" (#17738)"

This reverts commit dc0fb1c212.

* Add a needs_privileged tag so that we can skip mount tests on centos6

Some containers timeout on shippable tests when run with privileged.
Unfortunately, some tests require that in order to run.  Tagging those
allows us to skip those tests on the platforms that timeout when we get
ready to run the integration test in shippable.

* Centos6 times out with PRIVILEGED set so remove that (will disable the mount tests on centos6)

* Remove false start
9 years ago
Toshio Kuratomi efa78b4ff4 The mode that we fake from stat is checked more closely under python3.5 on El Capitan (#17794)
Python2 seems to allow any integer.  Python3.5 on Linux seems to allow
a 32 bit unsigned int.  Python3.5 on El Capitan seems to limit it to
a smaller size...  perhaps a 16 bit int.
9 years ago
Matt Clay a265d2d77d Run test_template tests on OS X. (#17791) 9 years ago
Matt Clay 0dc3db9e75 Enable unarchive tests for OS X and FreeBSD. (#17789) 9 years ago
Adrian Likins bba0fb3a42 Add mnt pnts with single quote to test (16855) (#17771)
This adds some test data to test_facts.py that
includes mnt points that have a single quote in
the path.

Ala, https://github.com/ansible/ansible/issues/16855

The bug was already fixed via other changes, but this is
for regression testing.
9 years ago
Matt Clay 6d78397b8b Update get_url test to use httptester. (#17787) 9 years ago
Matt Clay d05df5fc61 Disable expect continue in ansible-core-ci. (#17737)
This will allow use of larger SSH keys.
9 years ago
Toshio Kuratomi 1f311f0739 Disable mount tests for now. Mount is buggy on too many platforms 9 years ago
Matt Clay 2e0bec293c Improve error handling for ansible-core-ci. (#17734) 9 years ago
Toshio Kuratomi 0bf92d2b5c Add tests for the mount module (#17718)
* Add tests for the mount module

* Switch from unmounted to absent...

the code for mounting always modifies fstab so we need to always modify
fstab to cleanup as well.

* Fix comments and copyright
9 years ago
Matt Clay cf4d436e07 Remove run_tests.sh and update docs. (#17719)
Removed the obsolete test/utils/run_tests.sh script in favor of
using the newer test/utils/shippable/integration.sh instead.
9 years ago
Matt Clay 50b0d011fe Update integration.sh to copy source by default. (#17717)
Also add more documentation to the script.
9 years ago
Matt Clay 40ffd8269d Add shellcheck to code-smell checks. (#17715) 9 years ago
Adrian Likins e11f7d2339 add a defaults for integration.sh (#17709)
* add a default test image (ansible/ansible:centos7)
* add a default test target (all)
9 years ago
Matt Clay ada2432165 Add keep on failure option to integration.sh. (#17711) 9 years ago
Tom Melendez 97a1b7ded1 Integration Playbook for Google Cloud DNS module. (#17698) 9 years ago
Christoph f9e49de2ef Add a test for int/float parameter type checking (#16741)
A parameter of type int should accept int and string, but not float.
A parameter of type float should accept float, int, and string.

Also reset the arguments in another test so that it runs cleanly.  This
agrees with what all the other tests are doing.
9 years ago
Toshio Kuratomi 8aa8e07d13 Remove _load_hosts() from Play initialization as it's no longer needed and it breaks using extra_vars defining a list for hosts (#17699)
Thanks to @jimi-c for the solution

Fixes #16583
9 years ago
Matt Clay 3874e653c1 Remove tests for deprecated su and sudo. (#17697) 9 years ago
Tom Melendez 0e85f88f8e test_gce_mig integration test playbook (#17249)
Includes:
* Tests to create, delete, resize, recreate and configure an Autoscaler
* Tests for parameters only.  Use TEST_FLAGS="--tags 'param-check'" to execute only these tests.

Requires:
* An instance template to be configured in your project.
9 years ago
Matt Clay 39c5c558f8 Switch tests from sudo to become. (#17694) 9 years ago
Toshio Kuratomi 7889e1ffc1 Additional tests for check mode idempotence (#17679) 9 years ago
Matt Clay e0ad02c6dd Remove test for deprecated first_available_file. (#17674) 9 years ago
James Cammarata 1b54d3b6dc Merge branch 'threaded_receiver' into devel 9 years ago
Rob Cutmore 2716fe4362 Add test for checking pip package in check mode (#17360) 9 years ago
Toshio Kuratomi 5e9a8d9202 Fix password lookup py3 plus alikins unittest additions refactoring (#17626)
* Improve unit testing of 'password' lookup

The tests showed some UnicodeErrors for the
cases where the 'chars' param include unicode,
causing the 'getattr(string, c, c)' to fail.
So the candidate char generation code try/excepts
UnicodeErrors there now.

Some refactoring of the password.py module to make
it easier to test, and some new tests that cover more
of the password and salt generation.

* More refactoring and fixes.

* manual merge of text enc fixes from pr17475

* moving methods to module scope

* more refactoring

* A few more text encoding fixes/merges

* remove now unused code

* Add test cases and data for _gen_candidate_chars

* more test coverage for password lookup

* wip

* More text encoding fixes and test coverage

* cleanups

* reenable text_type assert

* Remove unneeded conditional in _random_password

* Add docstring for _gen_candidate_chars

* remove redundant to_text and list comphenesion

* Move set of 'chars' default in _random_password

on py2, C.DEFAULT_PASSWORD_CHARS is a regular str
type, so the assert here fails. Move setting the
default into the method and to_text(DEFAULT_PASSWORD_CHARS)
if it's needed.

* combine _random_password and _gen_password

* s/_create_password_file/_create_password_file_dir

* native strings for exception msgs

* move password to_text to _read_password_file

* move to_bytes(content) to _write_password_file

* add more test assertions about genned pw's

* Some cleanups to alikins and abadger's password lookup refactoring:

* Make DEFAULT_PASSWORD_CHARS into a text string in constants.py
  - Move this into the nonconfigurable section of constants.
* Make utils.encrypt.do_encrypt() return a text string because all the
  hashes in passlib should be returning ascii-only strings and they are
  text strings in python3.
* Make the split up of functions more sane:
   - Don't split such that conditionals have to occur in two separate functions.
   - Don't go overboard: Good to split file system manipulation from parsing
     but we don't need to do every file manipulation in a separate
     function.
  - Don't split so that creation of the password store happens in two
    parts.
  - Don't split in such a way that no decisions are made in run.
* Organize functions by when it gets called from run().
* Run all potential characters through the gen_candidate_chars function
  because it does both normalization and validation.
* docstrings for functions
* Change when we store salt slightly.  Store it whenever it was already
  present in the file as well as when encrypt is requested.  This will
  head of potential idempotence bugs where a user has two playbook tasks
  using the same password and in one they need it encrypted but in the
  other they need it plaintext.
* Reorganize tests to follow the order of the functions so it's easier
  to figure out if/where a function has been tested.
* Add tests for the functions that read and write the password file.
* Add tests of run() when the password has already been created.
* Test coverage currently at 100%
9 years ago
cinerama70 02cec7dca9 Add os_family to test_distribution_version (#17620)
As suggested in feedback on
https://github.com/ansible/ansible/pull/17575, add
os_family to test_distribution_version. Add the
correct os_family to the existing testcase data
entries.

Also add os_family to the output of
gen_distribution_version_testcase.py so any new
generated entries will contain this data.
9 years ago
James Cammarata 5a57c66e3c Moving result reading to a background thread 9 years ago
Steve Gargan a06da86d52 update consul tests to reflect fixes to the core and session modules (#17451) 9 years ago
Tom Melendez 91a30e59e4 Changes to enable make gce to run. Added sys import so libcloud error is displayed; renamed credentials keys in template file so they work properly with gce_credentials.py. (#16607) 9 years ago
Toshio Kuratomi 8af8eec789 Merge pull request #17590 from abadger/vault-fixes
Vault fixes
9 years ago
Matt Clay 355b29573c Use default on undefined vars in tests. (#17601) 9 years ago
Toshio Kuratomi e70066a6f7 Many Cleanups to vault
* Make is_encrypted_file handle both files opened in text and binary mode
  On python3, by default files are opened in text mode.  Since we know
  the encoding of vault files (and especially the header which is the
  first set of bytes) we can decide whether the file is an encrypted
  vault file in either case.
* Fix is_encrypted_file not resetting the file position
* Update is_encrypted_file to check that all the data in the file is ascii
* For is_encrypted_file(), add start_pos and count parameters
  This allows callers to specify reading vaulttext from the middle of
  a file if necessary.
* Combine VaultLib.encrypt() and VaultLib.encrypt_bytestring()
* Change vault's is_encrypted() to take either text or byte strings and to return False if any part of the data is non-ascii.
* Remove unnecessary use of six.b
* Vault Cipher: mark a few methods as private.
* VaultAES256._is_equal throws a TypeError if given non byte strings
* Make VaultAES256 methods that don't need self staticmethods and classmethods
* Mark VaultAES and is_encrypted as deprecated
* Get rid of VaultFile (unused and feature implemented in a different way)
* Normalize variable and parameter names on plaintext, ciphertext, vaulttext
* Normalize variable and parameter names on "b_" prefix when dealing with bytes
* Test changes:
  * Remove redundant tests( both checking the same byte string)
  * Fix use of format string without format operator
  * Enable vault editor tests on python3
  * Initialize the vault_cipher for VaultAES256 testing in setUp()
  * Make assertTrue and assertFalse take the actual method calls for
    better error messages.
  * Test that non-ascii byte strings compare correctly.
  * Test that unicode strings and ints raise TypeError

* Test-specific:
  * Removed test_methods_exist().  We only have one VaultLib so the
    implementation is the assurance that the methods exist. (Can use an abc for
    this if it changes).
  * Add tests for both byte string and text string input where the API takes either.
  * Convert "assert" to unittest assert functions or add a custom message where
    that will make failures easier to debug.
  * Move instantiating the VaultLib into setUp().
9 years ago
Toshio Kuratomi 0139298786 Have unittests import mock from ansible.compat so they work on py3 without mock installed from pypi 9 years ago
James Cammarata dfb1c0647e Revert "Move queuing tasks to a background thread"
This reverts commit b71957d6e6.
9 years ago
Matt Clay 16baef1f72 Do not use bare vars in integration tests. (#17599) 9 years ago
Matt Davis f497d771c8 win_shell/win_command changes + tests (#17557) 9 years ago
Matt Clay 7b3cbafbe9 Add python 3 awareness to apt module tests. (#17574)
Also remove unnecessary dependency from ubuntu1604py3 Dockerfile.
9 years ago
Matt Clay bcb49fecb5 Add tool for downloading Shippable logs. 9 years ago
Toshio Kuratomi f4cd1c6321 Fix galaxy's parsing of the command line. (#17569)
Also make the parsing of the action in both galaxy and vault more
robust.

Fixes #17534
May Fix #17563
9 years ago
René Moser 28feba2fb3 jenkins_job: extend integration tests (#17558) 9 years ago
Allen Sanabria b510abce17 CloudRetry/AWSRetry backoff decorator with unit tests (#17039)
* Added aws_retry decorator function with unit tests

* Restructured the code to be used with a base class.

This base class CloudRetry can be reused by any other cloud provider.
This decorator should be used in situations, where you need to implement
a backoff algorithm and want to retry based on the status code from the
exception.

* updated documentation

* fixed tabs

* added botocore and boto3 to requirements.txt

* removed cloud.py from py24 tests, as it depends on boto3

* fix relative imports

* updated test to be 2.6 compat

* updated method name from retry to backoff

* readded lxd

* Updated default backoff from 2 seconds to 1.1s.

This will be about a total of 48 seconds in 10 tries. This is
configurable.
9 years ago
Michael Scherer e9ffe2062f Add test for the pause in loop feature (#17336)
See https://github.com/ansible/ansible/pull/17289
9 years ago
René Moser 6a3e948a7c jenkins_job: add integration tests (#17499) 9 years ago
Toshio Kuratomi bf29961947 Fixes to the controller text model (#17527)
* Fixes to the controller text model

* Change command line args to text type
* Make display replace undecodable bytes with replacement chars.  This
  is only a problem on pyhton3 where surrogates can enter into the msg
  but sys.stdout doesn't know how to handle them.
* Remove a deprecated playbook syntax in unicode.yml

* Fix up run_cmd to change its parameters to byte string at appropriate times.
9 years ago
nitzmahone 69880f1640 add win_user regression tests
Ensure https://github.com/ansible/ansible-modules-core/issues/4369 doesn't occur again, also adds tests for password set when expired.
9 years ago
Matt Clay c81fe70fbf Enable more integration tests for python 3. (#17473)
* Enable more integration tests for python 3.
* Split out python 3 integration tests.

Now that we're running more integration tests on python 3, the
tests are taking long enough that they warrant splitting out in
the same way the python 2 tests are split.
9 years ago
Matt Clay 784810a84c Add python 3 support to test_apt_repository. (#17472) 9 years ago
Matt Clay a1947401ba Enable more tests that pass on python 3. (#17471)
* Enable more tests that pass on python 3.
* Disable test_apt_repository for python 3.
9 years ago
Matt Clay eb26616b09 Add python3-apt to ubuntu1604py3 Dockerfile. 9 years ago
Toshio Kuratomi 4ed88512e4 Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423)
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing.  So once created it we had two sets of functions that did
the same things but had different implementations.  To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
9 years ago
nitzmahone 7a9395b5e0 disable windows loop async test
Fails pretty regularly on Shippable/AWS, never locally- always seems to be on the last async task in the loop.
9 years ago
Matt Davis f239e1e61f windows async changes and tests (#17400) 9 years ago
Matt Clay 94a0d2afb4 Add partially backwards compatible version of _fixup_perms. (#17427)
Also added a deprecation notice for _fixup_perms.

Resolves issue #17352 (assumes custom actions use recursive=False).
9 years ago
jhawkesworth 9fe4308670 add very basic tests of win_package, based on existing win_msi tests. (#17383)
* add very basic tests of win_package, based on existing win_msi tests.
9 years ago
Toshio Kuratomi d6ebf9bdc6 Symink integration tests for fetch and stat 9 years ago
Michael Scherer 918d1e038e Do not hardcode python executable in test (#17380)
Based on https://github.com/ansible/ansible/pull/17376
9 years ago
Matt Clay 4ae59b2743 Use ansible_python for interpreter in test_uri. (#17376) 9 years ago
Matt Clay 7cd988f60c Enable more integration tests for python 3. (#17375)
The test_async test target was updated to accommodate changes in
output buffering behavior in python 3. This change in behavior
may need to be addressed in the future.
9 years ago
Toshio Kuratomi f7b22a5eaa Fix paramiko's exec_command() to return bytes on python3 (#17372)
* Fix paramiko's exec_command() to return bytes on python3

* Run test_connection for python3 now too

* Fix atomic_move for problem in shippable's testing

* Python-2.4 needs to use b()
9 years ago
Matt Clay 75cb27ffe3 Enable more python 3 tests that now pass. (#17359) 9 years ago
Will Thames d54f5277d5 Add ksu privilege escalation (#17340)
Allow ksu privilege escalation to be used
as a standard become_method

https://web.mit.edu/kerberos/krb5-1.12/doc/user/user_commands/ksu.html
9 years ago
Michael Scherer 529950680b Disable yum test on python 3 (#17327)
Since yum is not gonna be running on python3 ever, we have to filter it.
9 years ago
Tobias Wolf c23b11d212 [Inventory] Cache the result of enumerating groups and host names
for `VariableManager._get_magic_variables()`.

This saves a lot of time re-iterating the nearly always constant global
list of groups and their members.

Generate once and cache, and invalidate cache in case `add_host:` or
`group_by:` are used.
9 years ago
Toshio Kuratomi 28227546fa Various python3 updates for module_utils: (#17345)
* Port set_*_if_different functions to python3
* Add surrogate_or_strict and surrogate_or_replace error handlers for
  to_text, to_bytes, to_native
* Set default error handler to surrogate_or_replace
* Make use of the new error handlers in the already ported code
* Move the unittests for module_utils._text as they aren't in basic.py
* Cleanup around SEQUENCETYPE.  On python2.6+ SEQUENCETYPE includes
  strings so make sure code omits those explicitly if necessary
* Allow arg_spec aliases to be other sequence types
9 years ago
Matt Clay 2ffb136b3f Add support for testing module PRs with python3. (#17339) 9 years ago
Gennady Trafimenkov 2e857cfafd Add mention of integration tests in Docker containers (#16661)
It is quite convinient and easy to run integration tests in Docker containers.

I hope it can motivate more people to write integration tests.
9 years ago
Matt Clay 6e65ebda26 Put integration.sh pip reqs in separate file. (#17338) 9 years ago
Jonathan Mainguy a4cee11649 Add test for specific privlege grants on database.table (#17328)
For the mysql_user module
9 years ago
Jonathan Mainguy 2248d2464b add unit test for mysql_user (#17335)
this removes all blank users, and then does so again
to ensure changed the first time and ok the second time
9 years ago
James Cammarata b71957d6e6 Move queuing tasks to a background thread 9 years ago
Michael Scherer 878d0d5b87 Running the test with a locale other than English make that test fail
While tests are supposed to be run in docker, people might still
want to use them on their own boxes.
9 years ago
Allen Sanabria 03132041fb Include vars updated to work with directories (#17207)
* New features for include_vars

include_vars.py now allows you to include an entire directory and its nested directories of variable files.

Added Features..

* Ignore by default *.md, *.py, and *.pyc
* Ignore any list of files.
* Only include files nested by depth (default=unlimited)
* Match only files matching (valid regex)
* Sort files alphabetically and load in that order.
* Sort directories alphabetically and load in that order.

```
    - include_vars: 'vars/all.yml'

    - name: include all.yml
      include_vars:
        file: 'vars/all.yml'

    - name: include all yml files in vars/all and all nested directories
      include_vars:
        dir: 'vars/all'

    - name: include all yml files in vars/all and all nested directories and save the output in test.
      include_vars:
        dir: 'vars/all'
        name: test

    - name: include all yml files in vars/services
      include_vars:
        dir: 'vars/services'
        depth: 1

    - name: include only bastion.yml files
      include_vars:
        dir: 'vars'
        files_matching: 'bastion.yml'

    - name: include only all yml files exception bastion.yml
      include_vars:
        dir: 'vars'
        ignore_files: 'bastion.yml'
```

* Added whitelist for file extensisions (yaml, yml, json)

* Removed unit tests in favor of integration tests
9 years ago
René Moser 26118a51f8 exo_dns: new module utils and integration tests for exoscale DNS (#17230) 9 years ago
Michael Scherer d8f66defd0 Ignore difference on whitespace (#17302)
While trying to fix the test suite on python3, I noticed
this test fail due to to_json adding more whitespace in
python3 than in python2. So -w should ignored those
differences.
9 years ago
Matt Davis 1c33b5a9f0 fix remote shippable target failures (#17287)
cryptography upgrade caused fatal error when pycrypto was not installed
9 years ago
Toshio Kuratomi fa804125b5 Python3 fixes and porting (#17271)
* Fix to_native call in selinux_context and selinux_default_context to
  use the error handler correctly.
* Port set_mode_if_different to work on python3
* Port atomic_move to work on python3
* Fix check_password_prompt variable which wasn't renamed properly
9 years ago
Alexander Stock 238cccf166 Fix "Text file busy" exception in atomic_move (#9526) (#17204)
tempfile.NamedTemporaryFile keeps a file handle causing os.rename() to fail with windows based vboxfs: [Errno 26] Text file busy.
Changed NamedTemporaryFile to mkstemp() and added a finally block to unlink the temp file in each and every case.
9 years ago
Toshio Kuratomi 4a3a9c0f2d Fix for run_command on py3 and enable lineinfile test on py3 (#17257)
* run_command needed a bit of tweaking to its string handling of
  arguments.
* The run_command change fixes the last bit of lineinfile so we can
  enable its tests
9 years ago
Toshio Kuratomi bd68c324ce Get the ssh plugin working with python3 (#17234) 9 years ago
Matt Clay 178292d2cd Fix file and copy modules on py3 and enable tests. (#17239)
- Fix octal formatting of file mode in module response on py3.
- Convert file path to unicode in copy action.
- Enable file and copy module tests for py3 now that they pass.
9 years ago
Toshio Kuratomi 44d979c8f5 Enable most unittests on python3 (just some vault unittests and a logging one left) (#17240)
Make some python3 fixes to make the unittests pass:

* galaxy imports
* dictionary iteration in role requirements
* swap_stdout helper for unittests
* Normalize to text string in a facts.py function
9 years ago
Matt Clay acc8a13eff Enable more tests that pass on python 3. (#17233) 9 years ago
Toshio Kuratomi 380a5801e9 Enable integration tests on python3 that are already working (#17212) 9 years ago
Toshio Kuratomi 51ec35378d xrange and izip_longest aren't available in vanilla python3 (#17226)
Fixes for these are either rewriting to get rid of the need for the
functions or using six.moves to get equivalent functions for both
python2 and python3
9 years ago
Yannig 27b0f3241b new filter human_bytes: convert a string (ex: 1Mo, 1K) into bytes (#12074)
* Rework human_readable and human_to_bytes.
New filter human_to_bytes.

* Fix for python 3.
9 years ago
Matt Clay e2e7390adc Add Python 3 CI support. (#17209) 9 years ago
Adrian Likins e396d5d508 Implement vault encrypted yaml variables. (#16274)
Make !vault-encrypted create a AnsibleVaultUnicode
yaml object that can be used as a regular string object.

This allows a playbook to include a encrypted vault
blob for the value of a yaml variable. A 'secret_password'
variable can have it's value encrypted instead of having
to vault encrypt an entire vars file.

Add __ENCRYPTED__ to the vault yaml types so
template.Template can treat it similar
to __UNSAFE__ flags.

vault.VaultLib api changes:
    - Split VaultLib.encrypt to encrypt and encrypt_bytestring

    - VaultLib.encrypt() previously accepted the plaintext data
      as either a byte string or a unicode string.
      Doing the right thing based on the input type would fail
      on py3 if given a arg of type 'bytes'. To simplify the
      API, vaultlib.encrypt() now assumes input plaintext is a
      py2 unicode or py3 str. It will encode to utf-8 then call
      the new encrypt_bytestring(). The new methods are less
      ambiguous.

    - moved VaultLib.is_encrypted logic to vault module scope
      and split to is_encrypted() and is_encrypted_file().

Add a test/unit/mock/yaml_helper.py
It has some helpers for testing parsing/yaml

Integration tests added as roles test_vault and test_vault_embedded
9 years ago
Toshio Kuratomi a22909c226 Migrate basestring to a python3 compatible type (#17199) 9 years ago
Matt Clay a695e18615 Add support for OS X CI on Shippable. (#17160) 9 years ago
Toshio Kuratomi 57701d7115 Give native strings to selinux library functions. (#17184)
* Give native strings to selinux library functions.

SELinux takes pathnames as native strings.  That means we need to
convert to bytes on python2 and convert to text on python3.

Fixes #17155

* Read kitchen documentation, make module_utils params more like kitchen API

* Remove none nonstring strategy and add strict
* Raise TypeError on invalid nonstring strategy

* Document to_native()

* Make unittests for testing module_utils.text
9 years ago
Adrian Likins a4785c2691 Fix docker connection plugin version tests and py2.6 compat (#16841)
* Rm py2.7+ code in docker connection plugin

The docker connection plugin was using subprocess.check_output
which only exists in python 2.7 and later. Connection plugins
need to support python2.6 so this replaces it with Popen/communicate()

* Handle docker ver errors in docker connection

Add unit tests for DockerConnection

Fixes #16971
9 years ago
Toshio Kuratomi d29a7c55fe Enable some basic.py tests on python3 (#17167) 9 years ago
Adrian Likins 7d41f623dd Move py34 mock_open compat to compat/test/mock (#17157)
test/units/plugins/action/test_action.py had code
for handling a bug in python 3.4's mock_open that
causes errors when reading binary data.

Moved to compat/tests/mock.py so other tests can
use it by default.
9 years ago
Matt Clay 04bd6a3619 Make tests more cross platform. (#17154) 9 years ago
Dusty Mabe b817f1f3ea actions/unarchive: fix unarchive from remote url (#17126)
* actions/unarchive: fix unarchive from remote url

Currently unarchive from remote url does not work because the core
unarchive module was updated to support 'remote_src' [1], but the
unarchive action plugin was not updated for this. This causes failures
because the action plugin assumes it needs to copy a file to the
remote server, but in the case of downloading a file from a remote
url a local file does not exist, so an error occurs when the file is
not found.

[1] https://github.com/ansible/ansible-modules-core/commit/467516e

* test_unarchive: fix test with wrong remote_src use

The non-ascii filenames test had improperly set remote_src=yes even
though it was actually copying the file from the local machine (i.e.
the file did not already exist remotely). This test was passing
until the remote_src behavior of unarchive was fixed in 276550f.
9 years ago
Brian Coca 4fb09d5693 moved from extras repo where it incorrectly exists (#17124)
* moved from extras repo where it incorrectly exists

* added to sanity exclusion for 2.4

* changed license with author's consent
9 years ago
Toshio Kuratomi bd31cc096a Fix facts.py for python3 (#17131)
* Fix facts.py for python3

* Update facts unittest to account for filepaths being byte strings
9 years ago
Adrian Likins 7bd57acda4 Linux mount/fs (lsblk) facts fixes and tests. (#17036)
Fixes #10779

Refactor some of the block device, mount point, and
mtab/fstab facts collection for linux for better
performance on systems with lots of block devices.

Instead of invoking 'lsblk' for every entry in mtab,
invoke it once, then map the results to mtab entries.

Change the args used for invoking 'findmnt' since the
previous combination of args conflicts, so this would
always fail on some systems depending on version.

Add test cases for facts Hardware()/Network()/Virtual() classes
__new__ method and verify they create the proper subclass based
on the platform.system() results.

Split out all the 'invoke some command and grab it's output'
bits related to linux mount paths into their own methods so
it is easier to mock them in unit tests.

Fix the DragonFly* classes that did not defined a 'platform'
class attribute. This caused FreeBSD systems to potentially
get the DragonFly* subclasses incorrectly. In practice it
didnt matter much since the DragonFly* subclasses duplicated
the FreeBSD ones. Actual DragonFly systems would end up with
the generic Hardware() etc instead of the DragonFly* classes.

Fix Hardware.__new__() on PY3, passing args to __new__
would cause "object() takes no parameters" errors. So
check for PY3 and just call __new__ without the args

See
https://hg.python.org/cpython/file/44ed0cd3dc6d/Objects/typeobject.c#l2818
for some explaination.
9 years ago
Matt Davis e0bdb502e3 raw now returns changed: true (#17112)
for consistency w/ shell/command/script "non-idempotent" modules.

Updated tests, changelog.
9 years ago
Brian Coca b1410fa278 fixed tests to accoutn for new parameter 9 years ago
James Cammarata c669a381d1 Don't immediately return failed for any_errors_fatal tasks
Instead of immediately returning a failed code (indicating a break in
the play execution), we internally 'or' that failure code with the result
(now an integer flag instead of a boolean) so that we can properly handle
the rescue/always portions of blocks and still remember that the break
condition was hit.

Fixes #16937
9 years ago
Matt Clay b44eb402bd Update ansible-core-ci endpoint. (#17071) 9 years ago
Matt Clay 901042f458 Generate test script to file instead of stdout. 9 years ago
Matt Clay 2b0d63b0d8 Flush stderr to avoid lost output. 9 years ago
James Cammarata 47acf55fa9 Cache tasks by uuid in PlayIterator for O(1) lookups
Rather than repeatedly searching for tasks by uuid via iterating over
all known blocks, cache the tasks when they are added to the PlayIterator
so the lookup becomes a simple key check in a dict.
9 years ago
James Cammarata e244895174 Avoid copying task parents in TaskExecutor
As Block.copy() is potentially expensive, avoid copying the parent
structure of tasks in TaskExecutor.
9 years ago
James Cammarata 06d4f4ad0e Move tasks/blocks to a single parent model 9 years ago
James Cammarata d2b3b2c03e Performance improvements 9 years ago
Matt Clay 80385a47bd Remove FreeBSD interpreter test hacks. (#17007)
* Add TEST_FLAGS to no_log target.
9 years ago
Filipe Niero Felisbino e54a9d3a51 Add generic data structures querying (#13684)
* Query lookup plugin

* Add license and docstrings

* Add python3-ish imports

* Change query plugin type from lookup to filter

* Switch from dq to jsonpath_rw

* Add integration test for query filter

* Rename query filter to json_query

* Add jsonpath-rw

* Rename query filter to json_query

* Switch query implementation from jsonpath-rw to jmespath
9 years ago
Matt Clay d2fb845955 Enable more FreeBSD integration tests. (#16991) 9 years ago
Matt Clay 72cca01cd4 Use file list, not recursion, in _fixup_perms. (#16924)
Run setfacl/chown/chmod on each temp dir and file.

This fixes temp file permissions handling on platforms such as FreeBSD
which always return success when using find -exec. This is done by
eliminating the use of find when setting up temp files and directories.

Additionally, tests that now pass on FreeBSD have been enabled for CI.
9 years ago
Matt Davis 746ea64d30 fix for unspecified retries on until + test (#16963)
fixes #16907
9 years ago
Will Thames eb2a3a91a8 task_result _check_key should handle empty results (#16766)
When a task result has an empty results list, the
list should be ignored when determining the results
of `_check_key`. Here the empty list is treated the
same as a non-existent list.

This fixes a bug that manifests itself with squashed
items - namely the task result contains the correct
value for the key, but an empty results list. The
empty results list was treated as zero failures
when deciding which handler to call - so the task
show as a success in the output, but is deemed to
have failed when deciding whether to continue.

This also demonstrates a mismatch between task
result processing and play iteration.

A test is also added for this case, but it would not
have caught the bug - because the bug is really in
the display, and not the success/failure of the
task (visually the test is more accurate).

Fixes ansible/ansible-modules-core#4214
9 years ago
James Cammarata 159aa26b36 FEATURE: adding variable serial batches
This feature changes the scalar value of `serial:` to a list, which
allows users to specify a list of values, so batches can be ramped
up (commonly called "canary" setups):

- hosts: all
  serial: [1, 5, 10, "100%"]
  tasks:
  ...
9 years ago
Matt Clay 5f12731797 Run more integration tests on FreeBSD. (#16923) 9 years ago
Matt Clay 00fbc76e69 Increase async time limit on tests to 10 seconds. (#16921) 9 years ago
Matt Clay ff4f4bc8a0 Add binary module tests to Windows CI. (#16914) 9 years ago
Matt Clay 17e4629d52 Add remote CI support for modules. (#16908) 9 years ago
Matt Clay e2602e9be0 Add FreeBSD to Shippable CI. (#16883) 9 years ago
Matt Clay 6dc148d82c Download files from S3 to improve reliability. (#16891)
Binary module tests now download pre-compiled binaries from S3
instead of downloading go and compiling the modules.

Files downloaded form SourceForge are now downloaded from S3.
10 years ago
Gennady Trafimenkov 2bc679be07 Testing that service not enabled during check run (#16739)
* Enabled more tests in test_service on systems with systemd.
* Fix inconsistency in cleaning up test service. The conditions for service setup and service cleanup were different.
* Add check mode run for service enable.
10 years ago
Matt Clay 380ed053e8 Add Windows integration tests to Shippable. (#16803)
Enable Windows integration tests on Shippable.
10 years ago
William Albert 409d95d67e Refactored gce util module to support other GCP services (#15924)
This is a refactoring of the existing GCE utility module to support other projects on Google Cloud Platform.

The previous gce.py module was hard-coded specifically for GCE, and attempting to use it with other projects in GCP failed.

See https://github.com/ansible/ansible/pull/15918#issuecomment-220165913  for more detail.

This has also been an issue for others in the past, although they've handled it by simply
duplicating some of the logic of gce.py in their own modules.

-   The existing gce.py module was renamed to gcp.py, and modified to remove any 
     imports or other code that refers to libcloud.compute or GCE (the GCE_* params were
     retained for compatibility). I also renamed the gce_connect function to gcp_connect, 
     and modified the function signature to make supplying a provider, driver, and agent 
     information mandatory.

-  A new gce.py module was created to handle connectivity to GCE. It imports the
   appropriate libcloud.compute providers and drivers, and then passes them on
   to gcp_connect in gcp.py. The constants and function signatures are the same
   as the old gce.py, so compatibility with existing modules is retained.

- A new gcdns.py module was created to support PR ansible/ansible-modules-extras#2252
  for two new Google Cloud DNS modules, and to demonstrate support for a non-GCE 
  Google Cloud service. It follows the same basic structure as the new gce.py module,
  but imports from libcloud.dns instead.
10 years ago
Gennady Trafimenkov ad24f2d206 Enable color output from integration tests in Docker containers (#16660)
Enable color output from integration tests in Docker containers:

* In run_tests.sh when output is attached to a terminal.
* In shippable/integration.sh using force mode (can be disabled).

Also fix blocks tests to work with or without color output
10 years ago
Matt Clay 9497a814a8 Add apache2 to improve test speed and reliability. (#16819) 10 years ago
Brian Coca e2f17f8d9b set cwd to task's basedir (#16805)
* switch cwd to basedir of task

This restores previous behaviour in pre 2.0 and allows for 'local type' plugins
and actions to have a more predictable relative path.

fixes #14489

* removed FIXME since prev commit 'fixes' this

* fix tests, now they need a loader (thanks jimi!)
10 years ago
Matt Martz 4065acc37d indent callback output if using 3verbosity or higher (#16231) 10 years ago
Robin Roth 2b28beb1d7 add check_mode option for tasks (#16056)
* add check_mode option for tasks

includes example testcases for the template module

* extend check_mode option

* replace always_run, see also proposal rename_always_run
* rename always_run where used and add deprecation warning
* add some documentation

* have check_mode overwrite always_run

* use unique template name to prevent conflicts

test_check_mode was right before, but failed due to using the same filename as other roles

* still mention always_run in the docs

* set deprecation of always_run to version 2.4

* fix rst style

* expand documentation on per-task check mode
10 years ago
s-hertel 93c5ec42cf Test GalaxyCLI when no actions are provided
Adds a new test for GalaxyCLI. Tests cases when:

- no actions are provided
- invalid actions are provided
- each valid action is provided

When parser() runs successfully the method returns True, creates a
SortedOptParser instance, a Galaxy instance, and updates certain class data.
10 years ago
s-hertel 671f9c3d15 Merge pull request #16783 from s-hertel/test_display_galaxy_info_fix
fixing a logic error in test_galaxy
10 years ago
s-hertel 3cb5747f54 fixing a logic error in test_galaxy 10 years ago
s-hertel aae5e50299 Adding a test for GalaxyCLI. Tests exit_without_ignore method. 10 years ago
Christoph Dittmann d55452d3ed Adding unit tests for role variable precedence
Originally from PR #16735
10 years ago
Matt Clay 4cc4dc6793 Add postgresql dependencies to opensuseleap. 10 years ago
nitzmahone 7aa39981c4 fix setup test for renamed windows fact 10 years ago
jctanner 238c6461f6 Add a function to check for killed processes in all strategies (#16684)
* Add a function to check for killed processes so that if any
threads are sigkilled or sigtermed, the entire playbook execution is aborted.
10 years ago
James Cammarata 153133132d Updating tests for new module feature for remote_src in unarchive
Fixes #10218
10 years ago
Toshio Kuratomi c8a8f546d4 A little unittest refactoring (#16704)
A little unittest refactoring

* Add a class decorator to generate tests when using a unittest.TestCase base class
* Add a TestCase subclass with setUp() and tearDown() that sets up
  module parameter parsing
* Move test_safe_eval to use the class decorator and ModuleTestCase base
  class
* Move testing of set_mode_if_different into its own file and separate
  some test methods out so we get better errors and more coverage in
  case of errors.
* Naming convention for test cases doesn't need to duplicate information
  that's already in the file path.
10 years ago
James Cammarata 221520cbad Fixing type in 293723f (mock_handler -> mock_handler_task) 10 years ago
James Cammarata 0ea2b2a6af Fix unit test for base strategy in regards to handler changes 10 years ago
s-hertel e84ab95733 Fixing bug in GalaxyCLI test; creates temp dir for role_path instead … (#16689)
* Fixing bug in GalaxyCLI test; creates temp dir for role_path instead of installing to /etc/ansible/roles

* Update test_galaxy.py
10 years ago
nitzmahone de549ad675 update action unit test for powershell shebang behavior 10 years ago
s-hertel 9c925eeeab Adding a test for GalaxyCLI and two methods on which it depends. Tes… (#16651)
* Adding a test for GalaxyCLI and two methods on which it depends. Tests execute_info method.

*  Adding a test for GalaxyCLI and two methods on which it depends. Tests execute_remove method.

* Update test_galaxy.py

* Revising test for GalaxyCLI execute_remove.

* Removing mocks
10 years ago
Matt Clay 0ada7eae5e Add test tags for shell and command modules. 10 years ago
= 3c66caa058 fix win_msi tests by setting wait: true on all win_msi tasks.
I suspect this problem was masked previously as older versions of pywinrm
where significantly slower, allowing more time for the windows installer service to complete.
10 years ago
Matt Clay bbffa0a0e9 Add tags for modules without dedicated test roles. 10 years ago
James Cammarata cd4412016a Updating integration tests for async testing 10 years ago
Matt Davis 30c63a41e9 Merge pull request #16555 from matsu-chara/fix-error-msg-default-to-defaults
fix default/main.yml to defaults/main.yml
10 years ago
Matt Clay 9a6b8ab271 Add more tags to test_async role. 10 years ago
Matt Clay fdf22b5a40 Support module tests on a single image. (#16620) 10 years ago
Matt Clay 696feacbb6 Add script to generate module tests. (#16617) 10 years ago
Robin Roth d0ccedc617 Fix git shallow update (#16224)
* add git shallow fetch test

covers https://github.com/ansible/ansible-modules-core/issues/3782

updating a repo with depth=1 fails silently if version==HEAD

* raise git version support supporting depth to 1.9.1
10 years ago
Robin Roth 1f04130c00 add more distribution version tests (#16563)
* ubuntu 16.04
* solaris 10, 11
* fedora 22, 25

Thanks Peter Oliver for providing the test data
10 years ago
Robin Roth 8021adfe97 use git-core ppa instead of menulibre
menulibre is no longer actively maintained and does not support 16.04
10 years ago
Robin Roth a5e394d23a reenable apt_repository tests in ubuntu 16.04
fixes #15718
10 years ago
matsu-chara 9f8b0cabcd fix default/main.yml to defaults/main.yml 10 years ago
Matt Clay 4e369a31db Fix test_async. (#16552)
* Conditionally run test_async in docker containers.
* Revise test_async test.
10 years ago
Matt Clay 292785ff2b Parse async response in async action. (#16534)
* Parse async response in async action.
* Add async test for non-JSON data before module output.
* Fix existing async unit test.

Resolves #16156
10 years ago
Abhijit Menon-Sen 950cc26aab Use loop_control.loop_var directly
6eefc11c converted task.loop_control into an object, but while the other
callers were updated to use .loop_var instead of .get('loop_var'), this
site was overlooked.

This can be reproduced by including with loop_control a file that does
set_fact; a simple regression test along these lines is included.
10 years ago
Matt Clay fbfadc47c7 Update shippable shared dir for COPY_SOURCE. (#16511)
Tests now use '/shared' instead of '/tmp/shared-dir' when using
COPY_SOURCE. This avoids issues with containers purging '/tmp'.
10 years ago
Matt Clay f1e1558f4f Unpin yamllint now that version 1.3.2 is out. (#16479)
The newer version of yamllint fixes the UnicodeEncodeError
which previously required pinning the version to 1.2.2.
10 years ago
jctanner 4ba60d00c8 Refactor the parameter splitting in ini lookup to handle more path formats (#16477)
Refactor the parameter splitting in ini lookup to handle more path formats.

Fixes #16468
10 years ago
Matt Clay 394430a61e Switch test_lookups to badssl/local testing. (#16466)
* Switch test_lookups to badssl/local testing.
* Use var for checking badssl host content.
10 years ago
Matt Clay 81a49912b0 Pin yamllint to 1.2.2 to avoid issues in 1.3.0. (#16464)
This also moves shippable test requirements to external files.
10 years ago
Pilou b361bf90d7 Lookup password omit salt (#16361)
* Lookup unencrypted password must not include salt
* Integration test lookup: remove previous directory
* Test that lookup password doesn't return salt
* Lookup password: test behavior with empty encrypt parameter

Closes #16189
10 years ago
Matt Clay 1b29c87936 Test ansible version and ping during sanity tests. (#16441) 10 years ago
YueMing Qin 310692abe0 Changes to be committed: (#16430)
renamed:    lookup_pipe.py -> lookup_pipe.yml
10 years ago
nitzmahone 1f92ade584 add integration test to assert included tasks run in proper order 10 years ago
Matt Clay 8a55a446bf Fix fedora23 Dockerfile after fedora:23 updates. 10 years ago
Pilou 7ffbbd34f4 Add python-passlib to docker images. (#16376)
Related to #16361
10 years ago
Matt Clay 7de23a1c5b Update opensuseleap Dockerfile.
- Do not update base image packages unnecessarily.
- Fix incorrect package names.
- Remove commented out RUN statements.
- Sort list of packages to install.
10 years ago
jctanner b7f9037b5b Add test for multi-options in authorized_key (#16375)
Addresses https://github.com/ansible/ansible-modules-core/issues/1715
10 years ago
James Cammarata ca6ee4c789 FEATURE: handler listeners
Fixes ansible/proposals#8
10 years ago
James Cammarata 8218591fec Track notified handlers by object rather than simply their name
Due to the fact that roles may be instantiated with different sets of
params (multiple inclusions of the same role or via role dependencies),
simply tracking notified handlers by name does not work. This patch
changes the way we track handler notifications by using the handler
object itself instead of just the name, allowing for multiple internal
instances. Normally this would be bad, but we also modify the way we
search for handlers by first looking at the notifying tasks dependency
chain (ensuring that roles find their own handlers first) and then at
the main list of handlers, using the first match it finds.

This patch also modifies the way we setup the internal list of handlers,
which should allow us to correctly identify if a notified handler exists
more easily.

Fixes #15084
10 years ago
Nate Coraor 706778ee7f Fix distro detection for Solaris derivatives 10 years ago
nitzmahone 7bc3be64ae fix win_setup integration test to match fact name 10 years ago
= 9857af2b6e added further tests for win_regedit to cover the changes made
under https://github.com/ansible/ansible-modules-extras/pull/2436
10 years ago
jctanner 587d3c368b Fix synchronize+vagrant dest assertions that were incorrect. (#16291)
Addresses #16284
10 years ago
Matt Clay cabbafb650 Update Fedora and CentOS docker images.
- Reduce image size by skipping weak package references.
- Consolidate and sort packages to install.
- Improve consistency between versions.
- Combine yum/dnf install and clean to avoid unwanted caching.
- Don't update existing packages from base image unnecessarily.
10 years ago
Matt Clay 82b978e186 Add curl to Ubuntu docker images. 10 years ago
Matt Clay 349b06974e Update Ubuntu docker images.
- Reduce image size by skipping recommended packages.
- Consolidate and sort packages to install.
- Improve consistency between Ubuntu versions.
- Combine apt-get update and install to avoid caching stale updates.
10 years ago
Matt Clay 2f1fc5a324 Update integration test runner on shippable. 10 years ago
Matt Clay 62e6f6b885 Add junit-xml to docker images. 10 years ago
jctanner 3b3ab605f6 Add a get_url test for www.google.com (#16212)
Add a get_url test for www.google.com

Addresses #16191
10 years ago
Dag Wieers d91df20620 Fix unit tests for module_name commit #16087 10 years ago
Brian Coca a529a60478 raw should not use default executable (#16085)
also removed unused cruft in script
10 years ago
Toshio Kuratomi 872f3c5503 Revert "Add git shallow fetch test (#16055)" -- Broke integration tests:
https://app.shippable.com/runs/57599a7897ae890c00c2898d

This reverts commit e81f14ab48.
10 years ago
Robin Roth e81f14ab48 Add git shallow fetch test (#16055)
* add git shallow fetch test

covers https://github.com/ansible/ansible-modules-core/issues/3782

updating a repo with depth=1 fails silently if version==HEAD

* disable git shallow tests for old git versions

Older git versions don't treat the --depth option correctly.
While the git module tried to work around this and introduced subtle
bugs, ansible/ansible-modules-core#3794 falls back to full checkouts.
Don't run the tests then.
10 years ago
James Cammarata fbec2d9692 Expand return code values returned by TQM and strategies
This allows the PlaybookExecutor to receive more information regarding
what happened internal to the TaskQueueManager and strategy, to determine
things like whether or not the play iteration should stop.

Fixes #15523
10 years ago
Matt Clay 03597143d0 Detect use of Travis tests on Shippable.
This can occur when building pre-Shippable branches or PRs.
10 years ago
James Cammarata 61f132a609 Adding unit tests for playbook group/host vars 10 years ago
Toshio Kuratomi 5a3493be5f Port urls.py to python3 and other byte vs text fixes (#16124)
* Port urls.py to python3

Fixes (largely normalizing byte vs text strings) for python3

* Rework what we do with attributes that aren't set already.

* Comments
10 years ago
Matt Clay 6e1e86028f Split integration tests into multiple groups.
This will allow tests to complete much faster.
10 years ago
Toshio Kuratomi 73bb06ae84 Fix the code-smell tests for six again 10 years ago
Adrien Vergé 4d48711242 Fix YAML source and check it on Shippable (#15678)
Fix YAML source and check it on Shippable
10 years ago
Matt Clay 643a7ec01d Merge pull request #16126 from mattclay/shippable-fix
Update how shippable scripts are called.
10 years ago
Matt Clay 7a533406f9 Merge pull request #13145 from Mic92/devel
lxc connection plugin
10 years ago
Matt Clay 6d74f43eff Update how shippable scripts are called. 10 years ago
Saran Ahluwalia fda927a14b added failing test for testing if executable is not empty string 10 years ago
Matt Clay b0e1efbd62 Add full support for Shippable CI. 10 years ago
Toshio Kuratomi 08fd017d99 Test file needed to be renamed 10 years ago
Toshio Kuratomi 2a5ef4496a Workaround test failures on OSX controllers for now -- will have to look
more heavily into normailizing the unicode later.
10 years ago
Toshio Kuratomi f86df7c88b Test that task.args are also set properly (#15950) 10 years ago
Adrian Likins 644f0fb190 Merge pull request #15178 from alikins/galaxy_info_output
galaxy info displayed 'galaxy_info' section wrong [fix for #15177]
10 years ago
Brian Coca 3387d557bc Revert "Add prefixing and suffixing fuctionality to assemble module" (#16084) 10 years ago
Matt Clay e45b3b89a2 Skip some service tests for systemd. 10 years ago
jctanner c52cea8db3 Add a framework, fixtures and test for common synchronize scenarios. (#15983)
* Add a framework, fixtures and test for common synchronize scenarios.

Addresses #15905
10 years ago
Chris Houseknecht ce34397cf8 Merge pull request #10399 from underyx/assemble-with-prefix-and-suffix
Add prefixing and suffixing fuctionality to assemble module
10 years ago
jctanner 373b23cc24 Fix mock loader for osx /etc symlinks (#16074)
Fix role based unit tests for osx via mock.patch
10 years ago
Robin Roth c06884eff0 Run tests on ubuntu1604 and opensuseleap (#15936)
* reduce async sleep time in test
* make zypper test less destructive (don't break following uses of zypper)
* fix ca cert on suse
* fix/enable postgres/mysql on opensuseleap
* fix mysql test for mysql versions 5.7.6 and newer
* skip sni_host check on ubuntu1604
* add HTTPTESTER flag for test_uri

ubuntu 16.04 uses dash which drops env variables containing a dot
we work around this by adding an explicit env variable to enable httptester
10 years ago
Bence Nagy 13210e346f Add integration test for assemble with a header and a footer 10 years ago
Matt Clay 027006b846 Don't use TEST_FLAGS for the test_tags target.
This allows use of --skip-tag in TEST_FLAGS without conflicting with the test.
10 years ago
Matt Clay 844b415066 Mark tasks expected to fail with EXPECTED FAILURE.
This allows for automated identification of tasks which are
expected to fail, but which cannot use ignore_errors because
they need to fail.
10 years ago
Adrian Likins 1468538414 galaxy info displayed 'galaxy_info' section wrong
The output of 'ansible-galaxy info' was formatting the
'galaxy_info' key with one char per line.

Previously, when building the output string, items in
role_info that had a dict for value, the label for
it's key ('galaxy_info' for ex) was being added to
the text list in addition to being appended. Only
the append is needed.

Also added a unit test in test/units/cli/test_galaxy.py,
but skip it on py3 until galaxy is py3 compatible.

fixes #15177
10 years ago
jctanner 018d3c3118 Add a new vmware inventory script backed by pyvmomi (#15967)
Add a new dynamic vmware inventory script backed by pyvmomi
10 years ago
Jörg Thalheim 88482234e6
lxc connection plugin 10 years ago
Toshio Kuratomi c03555b650 Fix unarchive failures when the destination is a symlink to a directory (#15999)
Also add integration tests for this problem and unicode filenames inside
a tarball.

Fixes #3725
10 years ago
Matt Clay b755bcd875 Corrected reference to httptester container. 10 years ago
Matt Martz 164f247ec8 Add httptester docker container files and update run_tests.sh to use ansible/httptester 10 years ago
Brian Coca 329c62e914 docker was deprecated, test now reflects new name 10 years ago
Toshio Kuratomi 650bfdce8f Update grep for six to not falsely trigger when six is only a substring of a different library 10 years ago
Robin Roth 0edec45c3d install packages for tests (#15979)
* curl is needed for test_binary_modules
* glibc-i18ndata is needed for postgresql (localedef)
10 years ago
John R Barker 1861151fa4 [WIP] Extra test and build dependencies in Docker images (#15692)
* Merge conflicts:

* [skip ci] Revert changes to run_tests.sh

gundalow will update this in a different PR

* [skip ci] Add in ubuntu1604 and opensuseleap

NOTE: We are not configuring anything to use these new images yet.
Therefore no impact on Travis performance

* python-mysql for opensuse

* It's mysql-server on centos6
10 years ago
Toshio Kuratomi b41b6b2ec5 Update test off make_become for ssh pty race mitigation (#15931) 10 years ago
nitzmahone 42f6114b61 fix windows integration tests to run under kerberos users 10 years ago
Michael Scherer 376fc21f92 Add a exception for module_utils/six.py regarding code smell (#15878)
Since six replace urlopen, it is normal to trigger the test,
hence the exception
10 years ago
Michael Scherer cc61531a74 Do not test vca and vmware.py for py2.4 (#15887)
Since both of them depend on libraries not
working on python 2.4, we shouldn't restrict
ourself on 2.4, cf https://github.com/ansible/ansible/pull/15870
10 years ago
Robin Roth 85477fa215 Don't use 'from ansible.module_utils import foo' style here as it breaks (#15756)
py.test"
10 years ago
Toshio Kuratomi c1cc9f1f23 Merge pull request #15845 from abadger/ziploader-constants
Ship constants to the modules via internal module params rather than a secondary dict
10 years ago
Toshio Kuratomi 186337db28 Ship constants to the modules via internal module params rather than a secondary dict. 10 years ago
Matt Davis bc7405efc9 Merge pull request #15797 from robinro/patch-1
reduce async timeout in unittests
10 years ago
Matt Martz 196453b9b2 Merge pull request #13771 from sivel/binary-modules
First pass at allowing binary modules
10 years ago
Matt Martz 651b83d8be Run test_binary_modules 10 years ago
Matt Martz 0faddfa168 Move binary module detection into executor/module_common.py 10 years ago
Matt Martz 3466e73c50 Resolve test failures 10 years ago
Matt Martz 2d18607f1e Add GPL3 header to helloworld.go 10 years ago
Matt Martz 6ad8ec0919 Add integration tests for binary modules 10 years ago
Toshio Kuratomi 292f0ed0d6 If we can't squash for any reason, then simply do not optimize the items loop.
Also add more squashing testcases

Fixes #15649
10 years ago
Toshio Kuratomi 8a184381af Strip junk after JSON return. (#15822)
Fixes #15601
10 years ago
James Cammarata 67c32ac30a Merge branch 'samples-to-test' of https://github.com/dagwieers/ansible into dagwieers-samples-to-test 10 years ago
Matt Martz accf40d8a8 Use httptester docker image for http tests (#15811)
* Use httptester docker image for http tests

* When not running with an httptester linked container, use public test sites
10 years ago
Toshio Kuratomi c730af5dc2 Remove reload from arg related tests. Changes to how ziploader passes args mean we don't need reload anymore. (#15782) 10 years ago
Toshio Kuratomi 7ccb08cc7e Switch to a different url for testing SNI right now. (#15798) 10 years ago
Robin Roth 254cf9ea68 reduce async timeout
reduce from 3 sec to 0.1 sec; the 3 sec sleep was about half of the total unittest time on my development machine...
10 years ago
Toshio Kuratomi 5c7ad654db Add some more tests for item squashing 10 years ago
nitzmahone 133395db30 add jimi-c's unit test for squashed skip results, tweaked is_skipped() logic to pass 10 years ago
Brian Coca 2af8e3b9d8 fix default for removing images 10 years ago
Brian Coca 27a1ae4732 added ability to also subset make tests 10 years ago
Rene Moser 5583027f99 tests, postgresql: add ubuntu 16.04 support 10 years ago
Rene Moser 39e4caafb2 tests, apt_repository: disable Ubuntu 16.04 as there is no package yet 10 years ago
Rene Moser c20d1fced7 tests: fix tests on Debian 8 10 years ago
Robin Roth cf62a62b83 use userdir module as example instead of alias (#15540)
* alias module is very basic and removing it leads to the suse default
  config failing
* future improvements might test different modules and the effect of
  them being removed
10 years ago
Brian Coca 47d58c30e4 another var 'defaulted' in run_tests 10 years ago
Brian Coca 3669ab2456 added defaults for 'optional' vars 10 years ago
Brian Coca 52a714143f fine tuned shell switches for run_tests.sh 10 years ago
Yannig 3901556b35 When var name is the same as var content, try to template it before reporting that var is not defined. (#13629)
* When var name is the same as var content, try to template it before reporting that var is not defined.
Add asserts in test_var_blending to check this special corner case.

* Fix integration tests when using debug with list or dict.
10 years ago
Robin Roth 1d6608e84f Dist version fix for Red Hat and more tests (#15663)
* add tests for centos6, rhel6 and rhel7

* gen_distribution_version_testcase with python2.6

* remove unused imports

* fix redhat/vmware/... parsing

* add centos7 test case
10 years ago
Toshio Kuratomi 1b78fd57b1 Merge pull request #15656 from abadger/ziploader-namespace
Fix ziploader for the cornercase of ansible invoking ansible.
10 years ago
Matt Davis ca5080d56b Merge pull request #15570 from jhawkesworth/regedit_fix_str_compare_tests
win_regedit integration test to cover change to allow empty string comparison
10 years ago
Toshio Kuratomi 487e6562ca Fix ziploader for the cornercase of ansible invoking ansible.
* Make ziploader's ansible and ansible.module_utils libraries into
  namespace packages.
* Move __version__ and __author__ from ansible/__init__ to
  ansible/release.py.  This is because namespace packages only load one
  __init__.py.  If that is not the __init__.py with the author and
  version info then those won't be available.
* In ziplaoder, move the version ito ANSIBLE_CONSTANTS.
* Change PluginLoader to properly construct the path to the plugins even
  when namespace packages are present.
10 years ago
Toshio Kuratomi d652b2edc0 Fix for unittests on python2.6 or less 10 years ago
Robin Roth 12f7f50f31 extend zypper integration tests (#15596)
* extend zypper integration tests

* fix caching issue of local RPMS on openSUSE 42.1 Leap
* add tests for simultaneous install/remove via prefixes +-
* test fail cases (rm patch or URL)
* test patch install (succes, unchanged second run, fail on wrong name)

* add test for pattern install
10 years ago
Toshio Kuratomi 7e1fbe2e03 Some algorithmic unittests for the apt and docker modules 10 years ago
Toshio Kuratomi e4a1622f53 Do not check docker or azure module_utils code for py2.4 compat (the libs require py2.6+) 10 years ago
Toshio Kuratomi 85bef402b1 Merge pull request #14614 from gundalow/test_binary
non-destructive says we should run test_binary at v2
10 years ago
Tegan Snyder bf0da4aa3c add centrify dzdo escalation (#15219)
add dzdo context, and test
10 years ago
= bd74091ed9 win_regedit integration test to cover change to allow empty strings to be compared 10 years ago
Toshio Kuratomi 44e21f7062 Allow AnsibleModules to be instantiated more than once in a module
Fix SELINUX monkeypatch in test_basic
10 years ago
jctanner 4d36b3f7b6 Extend the get_url integration tests to include file schemas. (#15532)
Addresses https://github.com/ansible/ansible-modules-core/issues/3511
10 years ago
Toshio Kuratomi e893b65a9b Don't pick up whole commented lines in the urlopen code-smell tests 10 years ago
Robin Roth 7a4e4c2b02 extend integration test for zypper_repository (#15387)
* include options refresh and priority introduced in ansible/ansible-modules-extras#1990
* test repo update both based on name and URL
* run on all suse flavors
* test overwriting repos by url or name
10 years ago
Robin Roth 59bad647b6 Revert "Disable new git tests until a fix for rhel6/7 is merged."
This reverts commit 197d3dfe97.
10 years ago
Toshio Kuratomi 03126f7097 Fix cut and paste error of test code 10 years ago
Toshio Kuratomi 197d3dfe97 Disable new git tests until a fix for rhel6/7 is merged. 10 years ago
Toshio Kuratomi 0a31c24938 Merge pull request #15419 from nitzmahone/module_debug_arg_override
add _load_params debug overrides for module args/file passed on cmdline
10 years ago
Brian Coca 33761efd19 Merge pull request #15417 from bcoca/copy_vaulted
Copy vaulted
10 years ago
Robin Roth e8b1c4e14a add test for git with both depth and version arguments (#15471)
* add test for ansible/ansible-modules-core#3456

combination of options version and depth

* add test of switching to older branch
10 years ago
Matt Davis 822f904aa6 Merge pull request #14813 from mattclay/lxd-plugin
Add lxd connection plugin.
10 years ago
James Cammarata 6eefc11c39 Make the loop variable (item by default) settable per task
Required for include+with* tasks which may include files that also
have tasks containing a with* loop.

Fixes #12736
10 years ago
nitzmahone 5b336832af add _load_params debug overrides for module args/file passed on cmdline
Updated python module wrapper explode method to drop 'args' file next to module.
Both execute() and excommunicate() debug methods now pass the module args via file to enable debuggers that are picky about stdin.
Updated unit tests to use a context manager for masking/restoring default streams and argv.
10 years ago
Matt Davis 6322ed833e Merge pull request #15422 from jhawkesworth/win_regedit_binary_tests
Windows: add win_regedit integration tests (needs https://github.com/ansible/ansible-modules-extras/pull/2034)
10 years ago
James Cammarata ed35e8bce2 Don't override the http status code when successful in urls.py 10 years ago
Toshio Kuratomi 7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
10 years ago
Robin Roth 9bb069f873 Apache2 module integration test (#15380)
* add integration test for apache2_module

* fix assert syntax

* check os_family for this test

* add comment why only debian and suse are tested

* move apache2 test to destructive

* install apache2 package
10 years ago
Matt Clay 5fc76df18b Add lxd connection plugin. 10 years ago
Matt Martz a985bf6a31 Don't pass context to urlopen, instead add it to the handlers. Fixes https://github.com/ansible/ansible-modules-core/issues/3437 10 years ago
Robin Roth 49cdc565c5 remove nose.tools use 10 years ago
Robin Roth 4088aa2b4c get rid of assert_in 10 years ago
Robin Roth 692bf51fde move gen_testcase to hacking/tests
* also use json instead of pprint
10 years ago
Robin Roth 37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
10 years ago
Robin Roth 2b104fe6ad fix tests for SLES and CoreOS
* include #15230
10 years ago
Robin Roth b48e628429 test git version before running test on depth 10 years ago
= 157072a39f Windows: win_regedit integration tests (following https://github.com/ansible/ansible-modules-extras/pull/2034 ) 10 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
10 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
10 years ago
Robin Roth 3c883d8a6d add testcases from refactor PR 10 years ago
Matt Clay af8258cdf2 Revert "Increase verbosity of connection tests." (#15305) 10 years ago
Toshio Kuratomi 208ad36ce4 Merge pull request #15344 from abadger/ziploader
Ziploader "recursive imports" and caching
10 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.
10 years ago
Toshio Kuratomi 75546678d9 Fix unittests 10 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
10 years ago
Matt Martz dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
10 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.
10 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`
10 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
10 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
10 years ago
jpic 4985411816 Test other use-cases for PluginLoader's config 10 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.
10 years ago
Toshio Kuratomi 4b0f65a3e5 Merge pull request #15207 from mattclay/verbose-test
Increase verbosity of connection tests.
10 years ago
Matt Davis 3f70d7a70d Merge pull request #15144 from mattclay/winrm-test
Add winrm tests and fix exposed unicode errors.
10 years ago
James Cammarata 180a0a8e77 Fixing up the logic in the test_script tests removal portion 10 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.
10 years ago
Matt Clay a0361626c9 Increase verbosity of connection tests. 10 years ago
James Cammarata 5fdac707fd New unit tests for #13630 fix 10 years ago
René Moser f2a81e580d Merge pull request #15169 from mgruener/test_cloudflare_dns
Integration tests for the cloudflare_dns module
10 years ago
James Cammarata d00ac6e2d1 Merge pull request #15072 from rajatguptarg/fix-requirements
Add pycrypto as a requirement to run tests
10 years ago
Michael Gruener 94806e1953 Add integration tests for the cloudflare_dns module 10 years ago
Brian Coca 1ebc2fda71 removes python requirement to script
mistakenly added when checksum was made to use stat module
fixed assertion in test
10 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.
10 years ago
Toshio Kuratomi 52e9209491 Don't create world-readable module and tempfiles without explicit user permission 10 years ago
Toshio Kuratomi 1802e09b08 Exclude .tox from paths scanned for urlopen 10 years ago
Toshio Kuratomi d3583108ec Fix log_invocation test on python2 with hash randomization 10 years ago
Matt Martz ad30bad14f Skip test_module_utils_basic__log_invocation until we can figure out the cause of the failure 10 years ago
Matt Martz a6d52ce098 Ensure that any command in run_tests.sh that fails results in immediate failure 10 years ago
Toshio Kuratomi c3548677de Add TEST_FLAGS to test_hash 10 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.
10 years ago
James Cammarata 90ffb8d8f0 Also remove volumes when removing containers 10 years ago
James Cammarata 9a2c1cf94d Force removal of docker container after test ends 10 years ago
Matt Martz 18599047cd Use docker cp instead of docker volumes to allow for testing with remote docker servers 10 years ago
James Cammarata 081c33c451 Adding a docker pull to the run_tests.sh script 10 years ago
James Cammarata 395ff361d4 Adding acl package to all docker images 10 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
10 years ago
Brian Coca 9c6b49fd3d Merge pull request #15004 from agx/zypper-repository-integration-tests
Integration tests for zypper repository
10 years ago
Toshio Kuratomi ed9e164b80 Fix ansible_sudo_pass inventory variable so that it overrides setting of sudo password from the command line 10 years ago
Rajat Gupta dd27157b9d Add pycrypto as a requirement to run tests 10 years ago
James Cammarata 7460f76f8d Merge pull request #15052 from mattclay/travis-docker-ssh
Add ssh client and server to docker containers.
10 years ago
Matt Clay 4224c11b5f Combine new RUN commands into one RUN command. 10 years ago
Toshio Kuratomi 6824f3a7cc Change url so that we don't test https in the tests for file perms 10 years ago
Toshio Kuratomi cbd93b6ad3 Add integration test for #11821 10 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.
10 years ago
nitzmahone b95286c88e re-integrate test_test_infra output checking
added secondary run with overridden inventory/test args per bcoca request
10 years ago
nitzmahone 6578e63e63 improve test_test_infra debug messaging, rc check 10 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 10 years ago
Brian Coca db61e9be0c add ansible_executable inventory var
also handle the overrides appropriately
also new executable to set shell type
10 years ago
Toshio Kuratomi e80cd8bcaf Merge pull request #14908 from mattclay/mysql-connect-timeout
Document mysql connect_timeout and update tests.
10 years ago
James Cammarata 8eadc1d8eb Adding more unit tests for AnsibleModule things in basic.py 10 years ago
Matt Clay 9a922fcf0d Update test to use mysql connect_timeout option. 10 years ago
Guido Günther 2095d1ab33 Integration tests for zypper repository 10 years ago
Rene Moser 5d5d905e36 cloudstack: new integration tests test_cs_resourcelimit 10 years ago
Rene Moser 4d6a15ebc3 cloudstack: new integration tests test_cluster 10 years ago
Rene Moser d50026b108 cloudstack: new integration tests test_cs_pod 10 years ago
Rene Moser ae6d2a5602 cloudstack: new integration tests test_cs_instance_facts 10 years ago
Rene Moser d9f7589460 cloudstack: new integration tests test_cs_configuration 10 years ago
René Moser 7587c20d27 Merge pull request #13183 from resmo/for-ansible
[2.1] cloudstack: add tests for cs_volume
10 years ago
Toshio Kuratomi ea58ccfd5e Make the fact gathering give a little more information on failure 10 years ago
James Cammarata 88310a7f28 Adding iproute to certain RH-based docker images 10 years ago
Toshio Kuratomi 9a6a5a5516 add a fact gathering check for the default of all 10 years ago
Toshio Kuratomi f0e6d28815 Make integration tests for fact gathering assert on failure 10 years ago
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 10 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
10 years ago
James Cammarata 81788e627d Adding unit tests for TaskResult 10 years ago
James Cammarata 2fa1936ff9 Adding python-dev to the list of packages for ubuntu1204 docker
[ci skip]
10 years ago
James Cammarata 9d459386ce Also adding an upgrade of pycrypto to ubuntu1204 config 10 years ago
James Cammarata 90afc5e7d2 Adding rubygems to the ubuntu1204 docker config
[no ci]
10 years ago
James Cammarata af282eb979 Fixing typo in ubuntu1204 docker config 10 years ago
James Cammarata ff5584a349 Updating jinja2 in ubuntu1204 docker image 10 years ago
James Cammarata 1222830155 Initial commit for Ubuntu 12.04 docker config for testing 10 years ago
Matt Clay a44b88936b Add unicode dir to connection tests. 10 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.
10 years ago
James Cammarata 286d91d722 Reorganizing tox stuff and making py3-specific requirements 10 years ago
James Cammarata ab682b2917 Moving docker tests to pre-compiled images 10 years ago
James Cammarata adc9a25a06 Merge pull request #14904 from mattclay/mysql-test-timeout
Lower connect timeout for test_mysql_variables.
10 years ago
James Cammarata c6af811573 Fixing equality check in run_tests.sh for sanity 10 years ago
Matt Clay 20eee14a2c Lower connect timeout for test_mysql_variables. 10 years ago
Brian Coca 7e3c92e909 predictable docker names and autoremove if no fail 10 years ago
James Cammarata f700a7e3ce Removing forced pull from build step in run_tests.sh 10 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.
10 years ago
Brian Coca a07495e4c8 allow tests to run with parameters
also fixed test_test_infra to allow tags
10 years ago
James Cammarata c2441c15c3 Revert "corrected failed_when test"
This reverts commit 140df20504.
10 years ago
James Cammarata 963178f392 Revert "complete correction of test, key exists but is false"
This reverts commit 7e6343213b.
10 years ago
Brian Coca 923548f6d5 removed test_infra from setup as it fails when using --tags 10 years ago
Brian Coca 7e6343213b complete correction of test, key exists but is false 10 years ago
Brian Coca 140df20504 corrected failed_when test 10 years ago
nitzmahone 6c835b2600 ensure assert and fail work before we test anything else 10 years ago
Toshio Kuratomi 2b8a0cdddc Fix ssh connection unittests for python3.4 10 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.
10 years ago
James Cammarata f0d3284ead Adding more unit tests for ssh connection plugin 10 years ago
James Cammarata 2f472fd4e9 Adding start of ssh connection unit tests 10 years ago
Matt Davis 22344c5320 Merge pull request #14812 from mattclay/test-connection
Add tests for connection plugins.
10 years ago
Matt Martz 8aee648bc9 Add as dependency of the parsing make target 10 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
10 years ago
James Cammarata 299d93f6e9 Updating unit tests for PlayIterator
This knowingly introduces a broken test, planning to fix that later.
10 years ago
James Cammarata 8cfdaa16f4 Fixing error in localedef usage for f23 docker image 10 years ago
James Cammarata 0e17a6f036 Another attempt at fixing random f23 locale failures in docker image 10 years ago
James Cammarata 2ee0c1b175 Fixing centos6 docker image for pycrytpo too 10 years ago
James Cammarata 762c99f77c Fixing centos6 docker image to upgrade jinja2 10 years ago
James Cammarata 56670bd150 More tweaks for fedora on docker 10 years ago
James Cammarata b97a98f69e Trying to fix up the fedora23 docker image 10 years ago
James Cammarata b72cd3a6d2 Adding fedora rawhide to the travis mix 10 years ago
James Cammarata c632873936 Adding centos 6 to the travis mix 10 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.
10 years ago
James Cammarata db2a0ae255 Testing adding -j2 to the run_tests.sh script to speed up docker tests 10 years ago
Matt Clay 49892b287b Use vars to eliminate redundant test commands. 10 years ago
Matt Clay ca62bc5db3 Add tests for connection plugins. 10 years ago
James Cammarata 981f451f0e Adding fedora 23 to the Docker tests on travis 10 years ago
James Cammarata 7f34705b0c Fixing up Dockerfiles some more to get tests passing fully 10 years ago
James Cammarata fa630872d9 Minor update to the Dockerfiles 10 years ago
James Cammarata 069e597aaa Fixing locale stuff in ubuntu 14.04 Dockerfile 10 years ago
James Cammarata f56af2ec3f Updating docker files for tests 10 years ago
James Cammarata e4acd44e23 Make sure test script fails on any error 10 years ago
Matt Martz d8876b5c03 Run /sbin/init in the ubuntu docker image, as we do with centos 10 years ago
James Cammarata 92dcad8e99 Adding docker container capabilities to Travis 10 years ago
James Cammarata 80b10bd669 Moving creating of testing work dir out of dep role and into Makefile 10 years ago
Toshio Kuratomi 7160b40ab1 Fix the Makefile to run under dash (POSIX /bin/test syntax) 10 years ago
James Cammarata b853e932d1 Adding unit tests for symbolic mode conversion stuff in basic.py 10 years ago
James Cammarata 18240d350c Adding a skip for the literal_eval test on py3 10 years ago
James Cammarata 0ea3a9d08d Removing tabs from test_basic.py 10 years ago
James Cammarata 1de9357c2f Attempt at cleaning up issues introduced by new basic.py unit tests 10 years ago
James Cammarata e011f52557 Expanding unit tests for module_utils/basic.py 10 years ago
Matt Davis 3d58fd1402 Merge pull request #13481 from jhawkesworth/a21_reg_merge_tests
windows; adding integration tests for win_regmerge (extras module)
10 years ago
James Cammarata c56e3aabfb Clean up jsonify unit test with format to remove json lib differences 10 years ago
James Cammarata 7c049c3200 Fixing up jsonify and adding unit tests 10 years ago
James Cammarata a9d25f455c More unit tests for ActionBase 10 years ago
James Cammarata e588437067 Adding some unicode params to the ActionBase module formatting test 10 years ago
Toshio Kuratomi 7cb29cdbec Workaround py2.6's StringIO 10 years ago
Toshio Kuratomi b70bf3b056 Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3 10 years ago
Toshio Kuratomi c29f51804b Fix mixing of bytes and str in module replacer (caused traceback on python3) 10 years ago
James Cammarata 01d835700b Cleaning up some py version problems with ActionBase unit tests 10 years ago
James Cammarata 3518a05db6 Starting to expand unit tests for ActionBase plugin class 10 years ago
James Cammarata 9de24a3735 Assert things against the recursive copy result to make sure it did something 10 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
10 years ago
Matt Martz cacb74aeeb Merge pull request #14340 from sivel/uri-no-httplib2
Add RedirectHandler class for controlling redirects in urllib2
10 years ago
Matt Martz 3e9408e317 Add some additional integration tests that mix SSL verification and redirects 10 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.
10 years ago
Brian Coca 3b3709e715 Merge pull request #14488 from bcoca/become_shell_fixes
shell + become fixes
10 years ago
James Cammarata 58a6cf822a Merge pull request #13203 from willthames/galaxy_10620
Allow tree-ish versions for ansible-galaxy
10 years ago
Brian Coca 6dc910c13a shell + become fixes
1 less level of shell + quoting
simplified become commands, less quote and shell
10 years ago
Brian Coca bb155e1142 added test for cartesian lookup 10 years ago
Brian Coca 08b3dbcda3 corrected several usages of deprecated bare vars 10 years ago
Brian Coca ba51ed06cf changed from deprecated implicit bare var 10 years ago
Matt Martz 97e0f29a5b Add/improve tests for the uri module 10 years ago
James Cammarata b713f1ca53 Fix for copy test as ansible_ssh_user is not set by default now 10 years ago
James Cammarata 8039ceee0f Tweak block integration tests to also test the free strategy 10 years ago
James Cammarata 5466510edb Removing .out file for integration tests and adding to .gitignore 10 years ago
James Cammarata f4bd3be71f Adding block integration tests 10 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
10 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
10 years ago
Brian Coca fad6eb1844 fixed unit test to match new output of become/su 10 years ago
Brian Coca 46fde754af Merge pull request #14044 from skorochkin/devel
Adding support for scm-based role source urls (ansible-galaxy)
10 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
10 years ago
Sergii Korochkin 13e8732598 [hotfix] add missed playbook file 10 years ago
Sergii Korochkin 1325c21ca0 Adding support for scm-based role source urls (incl. integration test to cover it) 10 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…
10 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.
10 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
10 years ago
James Cammarata b1223746cd Relocate use of ERROR to display class, to avoid doubling up 10 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
10 years ago
Matt Davis acf49cf837 Merge pull request #13569 from mattclay/apt-repository-filename
Test for filename option in apt_repository module.
10 years ago
Toshio Kuratomi bcb22b0e1a Integration tests for https://github.com/ansible/ansible-modules-core/pull/558 10 years ago
James Cammarata 749fbd43ef Removing test for map filter until we can figure out how that's supposed to work 10 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
10 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.
10 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.
10 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
10 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
10 years ago
Brian Coca d89d7951e6 fixed tests to follow new invocation structure
also added maxdiff setting to see issues clearly when they happen
10 years ago
Yannig Perré b22d998d1d Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638. 10 years ago
James Cammarata d22bbbf52c Actually disable parallel makes for integration runner 10 years ago
James Cammarata 8119ea37af Dropping instance size back down since we're not doing parallel builds 10 years ago
James Cammarata 45afa642c3 Integration test runner tweaks 10 years ago
James Cammarata 6d6822e66e Kick up the integration runner test image size 10 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
10 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
10 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
10 years ago
Brian Coca e957335b0d Merge pull request #13607 from mattclay/test-cache-typo
Fixed import typo for memcache module in tests.
10 years ago
James Cammarata 54455a06e5 Disable docker test for Fedora, due to broken packaging 10 years ago
James Cammarata 3a57d9472c Save output of integration test results to files we can archive 10 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.
10 years ago
Rene Moser b0525da8c8 cloudstack: cs_volume: add tests for volume resize
See https://github.com/ansible/ansible-modules-extras/pull/1333
10 years ago
Rene Moser 8b5e553828 cloudstack: add tests for cs_volume 10 years ago
Toshio Kuratomi 6963955cb4 And change the task a little more since different shlex versions are handling the quotes differently 10 years ago
Toshio Kuratomi 21ca0ce1ce Fix test playbook syntax 10 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 10 years ago
Toshio Kuratomi 8d7892cc7b Done troubleshooting
Revert "Troubleshooting has reduced us to this"

This reverts commit 9abef1a1d7.
10 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) 10 years ago
Toshio Kuratomi b90506341a Fixes for tests that assumed yum as package manager for systems that
have dnf
10 years ago
Toshio Kuratomi 3da312da9c Switch from yum to package when installing sudo so that dnf is handled as well 10 years ago
James Cammarata 3ec0104128 Fixing bugs in conditional testing with until and some integration runner tweaks 10 years ago
Toshio Kuratomi e2d9f4e2f2 Fix unittests for return of invocation from fail_json and exit_json 10 years ago
Toshio Kuratomi 9abef1a1d7 Troubleshooting has reduced us to this 10 years ago
Toshio Kuratomi 51cca87d67 Also need redhat-rpm-config to compile pycrypto 10 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) 10 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.
10 years ago
Toshio Kuratomi f7ed33378e Fix the fedora host detection 10 years ago
Toshio Kuratomi 78dde62710 What is going on here 10 years ago
Toshio Kuratomi 26e5bcdb39 Bugfix the fedora 23 install task 10 years ago
Toshio Kuratomi ec60bfbb3f Ubuntu images with hvm ssd 10 years ago
Toshio Kuratomi 68fe3d856f Fedora 23 needs to have python2 packages installed 10 years ago
James Cammarata 0823a2c16f Removing update all for test deps, it didn't fix the problem 10 years ago
James Cammarata 02f65eaa80 Make integration runner ec2 add_hosts use valid host names 10 years ago
Toshio Kuratomi 1cc83dd0d9 Make tests that use kennethreitz retry. 10 years ago
James Cammarata 73a0153b8e Fix typo in integration test runner role 10 years ago
James Cammarata 0c154e81f0 Make integration tests run in parallel with async 10 years ago
Toshio Kuratomi f2364ecf5f Add a Fedora latest host into the mix 10 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.
10 years ago
James Cammarata 44e30e49dd Add awk to integration test deps list 10 years ago
Toshio Kuratomi a391d6f89a Add state=latest to pip install of pycrypto 10 years ago
James Cammarata 3143b352c5 Add ca-certificates update to the integration deps playbook 10 years ago
Toshio Kuratomi 1f3eec293b Install an updated version of pycrypto on Ubuntu12 from pip 10 years ago
James Cammarata 12c0bb9414 Use --source instead of -e for awk in integration Makefile 10 years ago
Toshio Kuratomi c5eda277ac Fix get_url tests in light of distros backporting SNI support 10 years ago
Toshio Kuratomi 8c6f56f982 kennetreitz.org times out but www.kennethreitz.org is fine 10 years ago
Toshio Kuratomi ce1febe28b debug line needs var not msg 10 years ago
Brian Coca 8db4415e2e changed test to use filter for accurate reporting 10 years ago
James Cammarata 26bbabcfba Consolidating package lines for virtualenv install in test deps integration 10 years ago
James Cammarata cf3d503f79 Moving apt cache update to top to ensure cache is updated before deps installed 10 years ago
James Cammarata 0b1ad8d490 Switch virtualenv dep installation from pip to package manager 10 years ago
James Cammarata dd3d04e96a Adding pip install of virtualenv to test deps integration role 10 years ago
James Cammarata 5fa93ef8fc Merge pull request #13477 from chrismeyersfsu/jenkins-playbooks
Jenkins playbooks
10 years ago
James Cammarata d7f2f606e1 Add has_hostkey to mock objects to fix broken unit tests 10 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
10 years ago
Toshio Kuratomi fffd29d1ab Update mysql setup to handle installing mysql with dnf too. 10 years ago
James Cammarata 6109f70397 Attempt at fixing strategy unit test failures on py2.6 and py3 10 years ago
Toshio Kuratomi 1116bc6ca6 Merge pull request #13191 from Jmainguy/mysql
Add shared connection code for mysql modules
10 years ago
Jonathan Mainguy 34e88e48a5 Add shared connection code for mysql modules 10 years ago
Toshio Kuratomi 375eb501b3 Update url to site that has an invalid certificate 10 years ago
Matt Clay 9942d71d34 Test for filename option in apt_repository module. 10 years ago
Michael Scherer a7ac98262d Make module_utils.known_hosts.get_fqdn work on ipv6 10 years ago
Toshio Kuratomi 457f86f61a Minor: Correct type pyhton => python 10 years ago
Toshio Kuratomi fc19ad21ef Merge pull request #13494 from Jmainguy/msyql_hash_tests
add tests for encrypted hash mysql_user
10 years ago
Jonathan Mainguy 49dc9eea16 add tests for encrypted hash mysql_user 10 years ago
James Cammarata 35015aaa4a Merge pull request #13529 from mscherer/add_tests_known_hosts
Add tests for ansible.module_utils.known_hosts
10 years ago
James Cammarata 279c5a3596 Cleanup strategy tests broken by new forking strategy 10 years ago
Michael Scherer 3c4d2fc6f2 Add tests for ansible.module_utils.known_hosts 10 years ago
James Cammarata 97554fc222 Fixing filter test for extract to use proper group 10 years ago
James Cammarata c402325085 Fixing up docker integration tests a bit 10 years ago
Toshio Kuratomi 04fc3f118f Code smell test for specifying both required and default in FieldAttributes 10 years ago
Chris Meyers 8d66dcda21 remove .gitignore 10 years ago
Chris Meyers f16628ffec symbolic link role for testing 10 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
10 years ago
= ea72fd6547 adding integration tests for win_regmerge module (extras) 10 years ago
Chris Meyers 822624d061 rename role ansible_deps to ansible_test_deps 10 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.
10 years ago
James Cammarata 750adbaa27 Changing up how host (in)equality is checked
Fixes #13397
10 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).
10 years ago
Brian Coca 7d073bdd17 Merge pull request #13345 from amenonsen/extract
Add an 'extract' filter
10 years ago
Toshio Kuratomi e00012994e Also some unicode tests for return_values() 10 years ago
Toshio Kuratomi 5fdfe6a0f2 Add some test data that has unicode values 10 years ago
Toshio Kuratomi ac54ac618c Something's strange... let's see if python2.6 is really the same now... 10 years ago
Toshio Kuratomi eb7db067f9 Fix template test results on python2.6 10 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.
10 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
10 years ago
James Cammarata dc0fae1af7 Also make sure remote_user is defaulted correctly for delegated hosts
Fixes #13323
10 years ago
Chris Church f3476b556d Add assertions for ansible_date_time in setup result. 10 years ago
James Cammarata 3c8c2fb090 Merge pull request #13208 from agx/zypper-integration-test
Add integration tests for zypper
10 years ago
James Cammarata e62fb04a2e Merge pull request #13229 from zarnovican/bza_fix_test_hg
test_hg fix: remove reference to "head"
10 years ago
James Cammarata 138068c56e Merge pull request #13230 from zarnovican/bza_fix_test_svn
test_svn fix: remove hardcoded "~/ansible_testing/svn" path
10 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. 10 years ago
Brano Zarnovican a30a52ef52 test_svn fix: remove hardcoded "~/ansible_testing/svn" path 10 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..
10 years ago
James Cammarata 91500f8f5f Fix include param precedence in variable manager 10 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.
10 years ago
Will Thames ff19233ad3 Add tests for #10620 10 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.
10 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
10 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.
10 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.
10 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
10 years ago
Brian Coca 5d645f3a8b Merge pull request #13127 from willthames/test_become
Elevate privileges when checking for file existence
10 years ago
Toshio Kuratomi 318bfbb207 Migrate cli and dependencies to use global display 10 years ago
Brian Coca 206cc50bd9 breaks testing in non virtual envs, since env var can be used in those
cases removing it from here
10 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.
10 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.
10 years ago
Toshio Kuratomi aa034f4fcf Add unit tests for issue #12976 10 years ago
Toshio Kuratomi 37052a983a Fix unittest dailure with the new squash items code 10 years ago
James Cammarata 23ff08ee6b Merge pull request #13016 from dvarrazzo/pip-vcs-changed
Added tests to verify pip installation with VCS urls
10 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.
10 years ago
Scott Miller 98b694f5ca Update README.md 10 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
10 years ago
Brian Coca c267e1906e removed invocation from tests as it is only available on very very verbose mode 10 years ago
Chris Meyers 4b88cce6a1 update ansible_test_service checksum 10 years ago
Brian Coca 174de1161b fixed removing -n in password sudo tests 10 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
10 years ago
James Cammarata 1910f23144 Merge pull request #12801 from chrismeyersfsu/fix-test_destructive_init
run correct init system tests
10 years ago
James Cammarata 9b22004540 Merge pull request #12795 from chrismeyersfsu/fix-test_destructive_mysql_user
remove module param quotes
10 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
10 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.
10 years ago
Toshio Kuratomi ce2b18174e Merge pull request #12878 from ansible/invocation-fix
Invocation fix
10 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
10 years ago
James Cammarata 86de1429e5 Cleaning up FIXMEs 10 years ago
Toshio Kuratomi ed6aa75d63 Add parsing test to travis to catch that invocation is missing 10 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.
10 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.
10 years ago
Toshio Kuratomi 5a0e63af1e Workaround seeming bug in python-2.6's sys.exit() 10 years ago
Toshio Kuratomi 6e5055e786 Update the use of no_log values to cover everything that heuristic_log_sanitize does.
Fixes #12792
10 years ago
Chris Meyers 6c265cde49 invoke systemd test for ubuntu >= 15.04 else invoke upstart test 10 years ago
Toshio Kuratomi c2d188baff Hide values in json returns which were given in parameters marked no_log. 10 years ago
Toshio Kuratomi a22cf8ffc1 Properly add the new test and limit six test to lib 10 years ago
Chris Meyers f864fa8727 run systemd tests for fedora 10 years ago
Brian Coca c1a404e6ec Merge pull request #12799 from resmo/for-ansible
cloudstack: add tests for cs_loadbalancer_rule and _member
10 years ago
James Cammarata 2346a7f170 Merge pull request #12800 from chrismeyersfsu/fix-test_destructive_yum
remove invocation keyword check
10 years ago
James Cammarata 549bdb2503 Merge pull request #12804 from chrismeyersfsu/fix-test_non_destructive_makefile
allow env variable override of creds file
10 years ago
Chris Meyers 1b2d17b844 allow env variable override of creds file
This is important because there is an integration test, test_git, that
require an ssh key to clone a privileged github repo.
10 years ago
James Cammarata 8baea3cba8 Merge pull request #12796 from chrismeyersfsu/fix-test_destructive_mysql_variables
fix up mysql variable assertion logic
10 years ago
Chris Meyers d6dfd9f502 run correct init system tests 10 years ago
Chris Meyers 5177cb3f74 remove invocation keyword check 10 years ago
Rene Moser bb5dcc00b6 cloudstack: add tests for cs_loadbalancer_rule and _member 10 years ago
James Cammarata 450c8d45c6 Merge pull request #12787 from chrismeyersfsu/fix-test_destructive_apt
keyword not in ubuntu 14.04
10 years ago
Chris Meyers 75833c248e fix up mysql variable assertion logic 10 years ago
Chris Meyers ce4e98a6d0 remove module param quotes 10 years ago
Toshio Kuratomi eebd3cc336 Merge pull request #12788 from chrismeyersfsu/fix-test_destructive_state
remove non-existant state var
10 years ago
Chris Meyers a0264983ad remove non-existant state var 10 years ago
Chris Meyers 5c01622457 keyword not in ubuntu 14.04 10 years ago
Brian Coca 6d87bd405d Merge pull request #12765 from bcoca/lookup_inventory_hostname
implemented inventory_hostname lookup in v2
10 years ago
Toshio Kuratomi 49f2b84253 Add a code smell test to make sure we're not using the raw system six
(So we know we have a recent enough version)
10 years ago
Toshio Kuratomi baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 10 years ago
Marius Gedminas 04a7ef416e Python 3: print function in a shell oneliner in Makefile
Fixes

    File "<string>", line 1
      import string,random; print 'ansible-testing-' + ''.join(random.choice(string.ascii_letters + string.digits) for _ in xrange(8));
                                                   ^
  SyntaxError: invalid syntax

when running integration tests with

  . hacking/env-setup
  . .tox/py35/bin/activate
  make -C test/integration test_var_precedence
10 years ago
Marius Gedminas ec3ada1cda Fix test on Python 3: vault code expects bytes
(All tests now succeed on Python 3.5)
10 years ago
Marius Gedminas 5c70f932bd Fix test on Python 3: vault code expects bytes
(Third failing test out of four.)
10 years ago
Marius Gedminas a1d95536f9 Fix test on Python 3: vault code expects bytes
(Different test than the last commit.)
10 years ago
Marius Gedminas f58f0c62e1 Fix test on Python 3: vault code expects bytes 10 years ago
Brian Coca 9b088a1e40 implemented inventory_hostname lookup in v2 10 years ago
Chris Church cb9f350c8f Merge pull request #12720 from jhawkesworth/test_amc_2147
integration tests for ansible modules core 2147
10 years ago
Marius Gedminas 225fe85530 Skip test_module_utils_basic_ansible_module_creation on Python 3
This reverts commit 073f10a52a and instead
disables the failing test.

We're focusing on Python 3 support on the controller first; modules will
come later.
10 years ago
James Cammarata e6d3c6745f Revert to using local file/dir tests in inventory instead of loader's
Fixes #12719
10 years ago
= e141101314 integration tests for ansible modules core 2147 10 years ago
Toshio Kuratomi 15d7f53846 AnsibleModules.log() fix for python3
Also add unittests for AnsibleModules.log()

Fixes #12586
10 years ago
James Cammarata 0e1a5919c8 Adding unit tests for PlaybookExecutor _get_serialized_batches 10 years ago
Brian Coca abf2e13955 Revert "Track local_action internally to prevent it from being overridden"
This reverts commit 49ca0eb797.
10 years ago
James Cammarata de792ba3c2 Improve handling of unicode errors
Fixes #12669
10 years ago
James Cammarata 9c9897805f More ansible-galaxy fixes for the old spec file format 10 years ago
Brian Coca f73329401b galaxy updates
better error reporting on fetching errors
use scm if it exists over src
unified functions in requirements
simplified logic
added verbose to tests
cleanup code refs, unused options and dead code
moved get_opt to base class
fixes #11920
fixes #12612
fixes #10454
10 years ago
Brian Coca 5680a9fa32 removed redundant tests, adjusted makefile expected count 10 years ago
Brian Coca e2ae3215f6 corrected no_log for items and skipped tasks
corrected output from default callback
added new tests for no_log loops
updated makefile test to check for both positive and negative occurrences of no_log
10 years ago
Brian Coca 5c39538a73 added no_log tests as per #12214 10 years ago
James Cammarata 775486c9d6 Merge pull request #12589 from jemmyw/consul-http-checks
Update consul integration test with http checks
10 years ago
Marius Gedminas 0371b14567 Fix test: selinux gets passed byte strings
(I don't have a system with selinux to test if the module still wants
byte strings even on Python 3.)
10 years ago
Marius Gedminas 500e7a1263 Fix test: _to_filesystem_str produces byte strings 10 years ago
Marius Gedminas f7571cb37f Python 3: there's no __builtin__ module
This caused an ImportError in a test module and showed up as one test
failure.  Now the test module can get imported and many more tests fail
(on Python 3).  Such is life.  ;-)
10 years ago
Brian Coca ddafed4403 Merge pull request #12528 from bcoca/task_logging
task logging revamp
10 years ago
James Cammarata 6339bf8a82 Merge branch 'tests' of https://github.com/amenonsen/ansible into amenonsen-tests 10 years ago
James Cammarata dfa33d0f23 Tweak variable manager use in role includes to avoid test failures 10 years ago
Abhijit Menon-Sen d100db837b Add basic tests for expand_hostname_range 10 years ago
Abhijit Menon-Sen 838e71edb7 Add more exhaustive tests for various IPv6 address notations 10 years ago
Brian Coca 8d024c3747 Merge pull request #12472 from resmo/for_ansible
cloudstack: improvements and tests
10 years ago
Brian Coca 37a918438b task logging revamp
* allow global no_log setting, no need to set at play or task level, but can be overriden by them
 * allow turning off syslog only on task execution from target host (manage_syslog), overlaps with no_log functionality
 * created log function for task modules to use, now we can remove all syslog references, will use systemd journal if present
 * added debug flag to modules, so they can make it call new log function conditionally
 * added debug logging in module's run_command
10 years ago
James Cammarata ccddda1ebc Merge pull request #12502 from mgedmin/py3k
Python 3: make test_variable_manager_precedence pass
10 years ago
James Cammarata 31d5f88a1d Use the task loop to calculate multiple delegated hosts
Due to the way we're now calculating delegate_to, if that value is based
on a loop variable ('item') we need to calculate all of the possible
delegated_to variables for that loop.

Fixes #12499
10 years ago
Toshio Kuratomi a1428d6bed Remove tmp as a parameter to the connection plugins
There doesn't appear to be anything that actually uses tmp_path in the
connection plugins so we don't need to pass that in to exec_command.
That change also means that we don't need to pass tmp_path around in
many places in the action plugins any more.  there may be more cleanup
that can be done there as well (the action plugin's public run() method
takes tmp as a keyword arg but that may not be necessary).

As a sideeffect of this patch, some potential problems with chmod and
the patch, assemble, copy, and template modules has been fixed (those
modules called _remote_chmod() with the wrong order for their
parameters.  Removing the tmp parameter fixed them.)
10 years ago
Toshio Kuratomi 03127dcfae remove the stdin return value from connection plugin exec_command() methods
The value was useless -- unused by the callers and always hardcoded to
the empty string.
10 years ago
Marius Gedminas 0624797375 Bugfix: if you define a custom __eq__, you must define a __hash__ too
Also, on Python 3 the stock object.__hash__ raises an error ("unhashable
type"), and we have code that uses Host instances as dict keys.
10 years ago
Marius Gedminas a2bc6b4b26 Bugfix: if you define __eq__, you should define __ne__ too 10 years ago
Marius Gedminas 5d29a2eabd Python 3: shlex.split() wants unicode
On Python 2, shlex.split() raises if you pass it a unicode object with
non-ASCII characters in it.  The Ansible codebase copes by explicitly
converting the string using to_bytes() before passing it to
shlex.split().

On Python 3, shlex.split() raises ('bytes' object has no attribute 'read')
if you pass a bytes object.  Oops.

This commit introduces a new wrapper function, shlex_split, that
transparently performs the to_bytes/to_unicode conversions only on
Python 2.

Currently I've only converted one call site (the one that was causing a
unit test to fail on Python 3).  If this approach is deemed suitable,
I'll convert them all.
10 years ago
Rene Moser 9514ac860d cloudstack: more integration tests 10 years ago
Abhijit Menon-Sen 2fcdb37e7b Support «hosts: groupname[1:]» notation (~= 'the rest of the group') 10 years ago
Abhijit Menon-Sen 21142f5723 Add some tests for split/apply_subscript 10 years ago
Abhijit Menon-Sen 2d420a9bb7 Allow hexadecimal ranges in IPv6 addresses, not only 0-9 10 years ago
James Cammarata 951128d7a6 Merge branch 'hostpatterns' of https://github.com/amenonsen/ansible into amenonsen-hostpatterns 10 years ago
Victor Salgado 01ae60d524 Add more tests for _split_pattern for when the input is a list 10 years ago
Abhijit Menon-Sen abd006657b Add test/units/inventory with a few _split_pattern tests
There were no inventory-specific unit tests earlier, so we add a new
directory for them with some initial low-level tests of _split_pattern
with various valid and deprecated pattern strings.
10 years ago
Florian Apolloner d9f873495e Ported over #7158 to support SELinux context switches. 10 years ago
Florian Apolloner 8548690ca3 Added a test to ensure that sudo is only used if remote and become user difer. 10 years ago
Toshio Kuratomi 3db8070aa3 Fix urlopen usage to use open_url instead
Add a travis test for urlopen usage
10 years ago
Chris Church 43b15ab9a4 Merge pull request #12385 from cchurch/winrm_put_empty_file
Enable winrm put_file to upload an empty file.
10 years ago
Chris Church 93af0b327f Merge pull request #12384 from cchurch/powershell_strict_mode
Add PowerShell exception handling and turn on strict mode.
10 years ago
Chris Church 1d15e8f37a Pass windows command as-is without splitting/rejoining parameters.
* Fixes extra spaces added between parameters from https://github.com/ansible/ansible-modules-core/issues/1929
* Correctly decode PowerShell command encoded as UTF-16-LE so that it displays correctly in debug messages, fixes the other issue from https://github.com/ansible/ansible-modules-core/issues/1929
* Add test to verify that script parameters are passed as-is, so $true is interpreted as a boolean, fixes https://github.com/ansible/ansible/issues/10947
10 years ago
Chris Church 87db5119ea Merge pull request #12049 from cchurch/win_group_tests
Add integration tests for win_group module.
10 years ago
Chris Church b44e02143a Merge pull request #12050 from cchurch/test_win_msi_creates
Add tests for creates parameter to win_msi module.
10 years ago
James Cammarata 3f8e12d1f7 Merge pull request #12359 from cchurch/fetch_no_fail_on_missing
Fix fetch to not fail for missing file when fail_if_missing=False
10 years ago
Chris Church 6ab4cff7db Enable winrm put_file to upload an empty file. 10 years ago
Chris Church 5c65ee7f0c Add PowerShell exception handling and turn on strict mode.
* Add exception handling when running PowerShell modules to provide exception message and stack trace.
* Enable strict mode for all PowerShell modules and internal commands.
* Update common PowerShell code to fix strict mode errors.
* Fix an issue with Set-Attr where it would not replace an existing property if already set.
* Add tests for exception handling using modified win_ping modules.
10 years ago
James Cammarata d818a72375 Merge branch 'normalize_plugin_paths' of https://github.com/bcoca/ansible into bcoca-normalize_plugin_paths 10 years ago
Chris Church 15070e2af8 Merge pull request #11790 from brianlloyd/win_lineinfile
Integration tests for windows implementation of lineinfile
10 years ago
Brian Coca b6d6c2e4db corrected all missing paths changes 10 years ago
Chris Church 904b8ca27b Update win_msi tests to specify msi url and paths via variables. 10 years ago
Chris Church 0300294f6e Add tests for creates parameter to win_msi module. 10 years ago
Chris Church 260b9f648c Fix fetch action plugin to not fail if file is missing and fail_if_missing=False (the default). Add tests to test_fetch role to verify it works as expected. 10 years ago
James Cammarata 36b5858f51 Fix unit tests for change related to local_action 10 years ago
James Cammarata 49ca0eb797 Track local_action internally to prevent it from being overridden
Fixes #12053
10 years ago
Abhijit Menon-Sen 88a20e7a20 Fix broken integration test with unicode hostnames
1. The test did "name: '{{hostnames}}.{{item}}'" inside a with_sequence
   loop, which didn't do what was intended: it expanded hostnames into
   an array, appended ".1", and set name to the resulting string. This
   can be converted to a simple with_items loop.

2. Some of the entries in hostnames contained punctuation characters,
   which I see no reason to support in inventory hostnames anyway.

3. Once the add_host failures are fixed, the playbook later fails when
   the unicode hostnames are interpolated into debug output in ssh.py
   due to an encoding error. This is only one of the many places that
   may fail when using unicode inventory hostnames; we work around it
   by providing an ansible_ssh_host setting.
10 years ago
Abhijit Menon-Sen 7479ab47e0 Be stricter about parsing hostname labels
Labels must start with an alphanumeric character, may contain
alphanumeric characters or hyphens, but must not end with a hyphen.
We enforce those rules, but allow underscores wherever hyphens are
accepted, and allow alphanumeric ranges anywhere.

We relax the definition of "alphanumeric" to include Unicode characters
even though such inventory hostnames cannot be used in practice unless
an ansible_ssh_host is set for each of them.

We still don't enforce length restrictions—the fact that we have to
accept ranges makes it more complex, and it doesn't seem especially
worthwhile.
10 years ago
Abhijit Menon-Sen 065bb52109 Be systematic about parsing and validating hostnames and addresses
This adds a parse_address(pattern) utility function that returns
(host,port), and uses it wherever where we accept IPv4 and IPv6
addresses and hostnames (or host patterns): the inventory parser
the the add_host action plugin.

It also introduces a more extensive set of unit tests that supersedes
the old add_host unit tests (which didn't actually test add_host, but
only the parsing function).
10 years ago
Marius Gedminas f91b28ef23 Fix safe_eval() of set literals
There was code to support set literals (on Python 2.7 and newer), but it
was buggy: SAFE_NODES.union() doesn't modify SAFE_NODES in place,
instead it returns a new set object that is then silently discarded.

I added a unit test and fixed the code.  I also changed the version
check to use sys.version_tuple instead of a string comparison, for
consistency with the subsequent Python 3.4 version check that I added in
the previous commit.
10 years ago
Brian Coca 5809a2e81d Merge pull request #12299 from resmo/feature/test_cs_user
cloudstack: new integration test role test_cs_user
10 years ago
James Cammarata 444987cde6 Fix unit test for plugins after basedir/push_basedir removal 10 years ago
Rene Moser f6382a160d cloudstack: new integration test role test_cs_user 10 years ago
Toshio Kuratomi e2c49b4ef4 Fix problem with "=" in the initial file path. 10 years ago
Toshio Kuratomi 3a50393cf7 Merge pull request #12269 from mgedmin/py3k
Python 3: fix TypeError: unorderable types in test
10 years ago
Toshio Kuratomi c1039de70c Compatibility with six-1.3.0 10 years ago
James Cammarata ac6f61ec7f Properly handle group/host_var files with dots in them
Fixes #12245
10 years ago
Marius Gedminas c22f4ee697 Add a comment explaining why async = 1 in the test 10 years ago
Marius Gedminas 1a1c9203e2 Python 3: fix TypeError: unorderable types in test
The full error was

======================================================================
ERROR: test_task_executor_execute (units.executor.test_task_executor.TestTaskExecutor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/ansible/test/units/executor/test_task_executor.py", line 252, in test_task_executor_execute
    mock_action.run.return_value = dict(ansible_facts=dict())
  File "/home/mg/src/ansible/lib/ansible/executor/task_executor.py", line 317, in _execute
    if self._task.async > 0:
TypeError: unorderable types: MagicMock() > int()

----------------------------------------------------------------------

Experiments show that Python 2 MagicMock() > 0 is true, so I'm setting
the async property on mock_task to 1.  (If I set it to 0, the test fails
anyway.)
10 years ago
James Cammarata ff9f5d7dc8 Starting to add additional unit tests for VariableManager
Required some rewiring in inventory code to make sure we're using
the DataLoader class for some data file operations, which makes mocking
them much easier.

Also identified two corner cases not currently handled by the code, related
to inventory variable sources and which one "wins". Also noticed we weren't
properly merging variables from multiple group/host_var file locations
(inventory directory vs. playbook directory locations) so fixed as well.
10 years ago
Brian Coca c17fbf2f12 simplify become testing and handling, we had drifted and were doulbe checking prompt, become and become_pass
fixed tests to conform to new signature and now tests both with and w/o password
now we are more explicit about self.prompt
10 years ago
Toshio Kuratomi e218bf8da9 Do not escape backslashes when processing a template file.
Fixes #12198
Fixes #12241
10 years ago
James Cammarata b2cb3153f1 Fix unit tests for PlayIterator changes regarding fact gathering 10 years ago
Marius Gedminas a32bf1ec18 Simplify FactCache.copy()
Also fix the bug (missing from six import iteritems) I introduced in
823677b490.
10 years ago
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
10 years ago
Toshio Kuratomi 1b64702b9a Fix templar unittests for change in preserve_trailing_newline parameter's default value 10 years ago
James Cammarata 45aac6a739 Adding unit tests for safe_eval 10 years ago
James Cammarata 843138e7d9 Merge pull request #12202 from mgedmin/py3k
Use rich comparisons for Attribute and FieldAttribute
10 years ago
Toshio Kuratomi 9ecfc30f9a * Mark all strings as unicode -- shouldn't matter for this dataset but
ansible is passing unicode arond internally so we should test the same
  data.
* Add a zero length test for _count_newlines and fix the zero newlines
  test to have no newlines.
10 years ago
Toshio Kuratomi 417bf1c805 Unittest the _count_trailing_newlines function 10 years ago
Brian Coca a7231c2203 actually implemented flags correctly for all priv escalation methods 10 years ago
Brian Coca 14f061d5ea fixed become tests 10 years ago
Marius Gedminas 33a374edde Use rich comparisons for Attribute and FieldAttribute
Because __cmp__ is not supported on Python 3.
10 years ago
Toshio Kuratomi aeff960d02 Cleanup combine_vars
* Dedupe combine_vars() code (removed from VariableManager)
* Fix merge_hash algorithm to preserve the type
* unittest combine_vars and merge_hash
10 years ago
Toshio Kuratomi 7f5080f64a Fix backslash escaping inside of jinja2 expressions
Fixes #11891
10 years ago
James Cammarata ccaf47bd97 Fix unit tests broken by 057712c1 10 years ago
Brian Coca 514fa73fcd galaxy fixes 10 years ago
Marius Gedminas c846bab69b Fix assert statement syntax
`assert (condition, message)` gets parsed by Python as `assert
a_two_tuple`, and a 2-element tuple is never False.

Discovered by compileall on Python 3.4, which emits a SyntaxWarning for
this common mistake.
10 years ago
Marius Gedminas 709dbbc7db Use 0oNNN octal syntax in test/ 10 years ago
Marius Gedminas 727cb8a917 Support print() function in test/ 10 years ago
Marius Gedminas 9ae66a7f5c Use 'except ... as' syntax in contrib/ and test/ too 10 years ago
Abhijit Menon-Sen 4f3a98eff6 Update Vault tests to make sure AES decryption works
Note that this test was broken in devel because it was really just
duplicating the AES256 test because setting v.cipher_name to 'AES'
no longer selected AES after it was de-write-whitelisted.

Now that we've removed the VaultAES encryption code, we embed static
output from an earlier version and test that we can decrypt it.
10 years ago
Abhijit Menon-Sen b84053019a Make the filename the first argument to rekey_file 10 years ago
Abhijit Menon-Sen c4b2540ecc Update tests for VaultEditor API changes 10 years ago
James Cammarata 601a1cc6d9 Multiple fixes for include statements and blocks in general
Fixes #11981
Fixes #11995
Fixes #12039
Fixes #12077
10 years ago
Toshio Kuratomi 9f9891df2c Add unicode characters to the data that we're testing that ansible-vault can decrypt 10 years ago
Toshio Kuratomi 56ae3a032f Merge pull request #12075 from ansible/fix-vault-unicode
Unicode and other fixes for vault
10 years ago
Toshio Kuratomi a3fd4817ef Unicode and other fixes for vault 10 years ago
Brian Coca 846f0b0510 changed no_log expected type to new value 10 years ago
Brian Coca 3e13dfd7e8 used stdoutlines list to avoid string mismatches
added block environment test
10 years ago
Brian Coca efa005c228 added names to assert tasks for easier debugging 10 years ago
Brian Coca d6a1cbeefb corrected varname that started with number and broke templating 10 years ago
Brian Coca 104b8a9a7b avoid hostvars which is not a dict 10 years ago
Brian Coca 857d74a274 made diff ignore whitespace 10 years ago
Brian Coca 6da2587c36 Merge pull request #12058 from resmo/for-ansible
cloudstack: more integration tests and updates
10 years ago
James Cammarata db65503778 Revert "Add PowerShell exception handling and turn on strict mode." 10 years ago
Rene Moser 69d5e62083 cloudstack: test_cs_account: account_state was renamed, fixes tests 10 years ago
Rene Moser eb44f85dc8 cloudstack: test_cs_instance: make it more configurable 10 years ago
Rene Moser 15a7f818e1 cloudstack: add more integration tests 10 years ago
Brian Coca 3ccfebc9f7 Merge pull request #12047 from cchurch/powershell_common_cleanup
Add PowerShell exception handling and turn on strict mode.
10 years ago
Ryan Petrello 1886307845 Fix a parsing bug that prevents IPv6 addresses from being used with `add_host`
Closes #8682
10 years ago
Chris Church af9200c2de Add integration tests for win_group module. 10 years ago
Chris Church 4b2cdadc98 Add PowerShell exception handling and turn on strict mode.
* Add exception handling when running PowerShell modules to provide exception message and stack trace.
* Enable strict mode for all PowerShell modules and internal commands.
* Update common PowerShell code to fix strict mode errors.
* Fix an issue with Set-Attr where it would not replace an existing property if already set.
* Add tests for exception handling using modified win_ping modules.
10 years ago
Brian Coca 01708cc824 added test for environment directive 10 years ago
Feanil Patel 892e230514 Don't convert nulls to strings.
This change is similar to https://github.com/ansible/ansible/pull/10465

It extends the logic there to also support none types.  Right now if you have
a '!!null' in yaml, and that var gets passed around, it will get converted to
a string.

eg. defaults/main.yml
```
ENABLE_AWESOME_FEATURE: !!null # Yaml Null
OTHER_CONFIG:
  secret1: "so_secret"
  secret2: "even_more_secret"

CONFIG:
  hostname: "some_hostname"
  features:
    awesame_feature: "{{ ENABLE_AWESOME_FEATURE}}"
  secrets: "{{ OTHER_CONFIG }}"
```

If you output `CONFIG` to json or yaml, the feature flag would get represented in the output
as a string instead of as a null, but secrets would get represented as a dictionary.  This is
a mis-match in behaviour where some "types" are retained and others are not.  This change
should fix the issue.

I also updated the template test to test for this and made the changes to v2.

Added a changelog entry specifically for the change from empty string to null as the default.

Made the null representation configurable.

It still defaults to the python NoneType but can be overriden to be an emptystring by updating
the DEFAULT_NULL_REPRESENTATION config.
10 years ago
Rene Moser 9d3577a74a cloudstack: fix tests unhashable type: 'dict' 10 years ago
Rene Moser 8f3c181d90 cloudstack: tests: use resource_prefix 10 years ago
Brian Coca 69f380da3a changed mod_args test to match connection 10 years ago
Jeremy Wells 9f9f476b6e Update consul integration test with http checks 10 years ago
Brian Coca ab355218a0 fixed test to new parser options 10 years ago
Brian Coca 1acb29ff9b sequence will now run once for start=end, added test to suite
fixes #11979
10 years ago
Brian Coca ee21ebaffc Merge pull request #11975 from mutemule/become_doas
Add become support for OpenBSD doas
10 years ago
Damian Gerow 1c5611100e Add become support for OpenBSD doas 10 years ago
Brian Coca 43bf9c86d8 fixed typo 10 years ago
Brian Coca d38bb4152d fixed test to match new exception class used 10 years ago
Brian Coca 2eb5333b50 fixed test to match new become output 10 years ago
Brian Coca 43cc27084d corrected on delete also 10 years ago
Brian Coca 089687140d corrected role path 10 years ago
Brian Coca 033c77a13b now creates/removes files/ dir 10 years ago
Brian Coca 464a436f8f fixed testplay host, included lookup path tests in all, added stage for easier debugging 10 years ago
Brian Coca 60803a1d3c added lookup paths testing 10 years ago
Brian Coca 8f106c9a58 Merge pull request #11078 from Yannig/devel
New lookup plugin : ini
11 years ago
Toshio Kuratomi e8452c864e Restore the relative path handling portion of #11865 11 years ago
Brian Coca b9433650d1 Revert "Path of group_vars and host_vars were getting the basedir added twice."
in view of simpler solution incomming from james
This reverts commit bae7a02be5.
11 years ago
Toshio Kuratomi bae7a02be5 Path of group_vars and host_vars were getting the basedir added twice.
Fix inventory so this won't happen and fix DataLoader so that it will
test relative paths relative to self._basedir

Fixes #11789
11 years ago
Yannig Perré 47db352725 Merge remote-tracking branch 'ansible/devel' into devel 11 years ago
Yannig Perré c0bd140959 Add documentation for the ini lookup plugin. 11 years ago
Yannig Perré 733d40a77c When value does not exist, return default value instead of stopping ansible with an exception. 11 years ago
James Cammarata 9891bcbcae Fix unit tests broken by previous commit 11 years ago
Brian Coca aefca24616 Merge pull request #10857 from jeffb-stell/devel
Add test for https://github.com/ansible/ansible/issues/9851
11 years ago
James Cammarata 6b244ed61e update unit tests for role templating changes 11 years ago
James Cammarata a586c74967 Merge pull request #11838 from cchurch/stringify_powershell_unquote_value
Fix for PowerShell unquote method when passed None.
11 years ago
Chris Church cafc35fd5b Fix for PowerShell unquote method when passed None. 11 years ago
Chris Church 6969b5ac8b Make sure raw doesn't eat key=value arguments. 11 years ago
Chris Church 2154212491 Merge pull request #11094 from cchurch/test_win_feature_has_servermanager
Only run win_feature tests when the host has the ServerManager module.
11 years ago
Chris Church e87cf4a3cc Fixes for WinRM/PowerShell support in v2.
- Add support for inserting module args into PowerShell modules.  Fixes #11661.
- Support Windows paths containing spaces.  Applies changes from #10727 to v2.  Fixes #9999.  Should also fix ansible/ansible-modules-core#944 and ansible/ansible-modules-core#1007.
- Change how execution policy is set for running remote scripts.  Applies changes from #11092 to v2.  Also fixes ansible/ansible-modules-core#1776.
- Use codepage 65001 (UTF-8) for WinRM connection instead of default (CP437), convert command to UTF-8 and results from UTF-8.  Replaces changes from #10024.  Fixes #11198.
- Close WinRM connection when task completes.
- Use win_stat, win_file and win_copy modules instead of stat, file and copy when called from within other action plugins (only when using WinRM+PowerShell).
- Unquote Windows path arguments before passing to win_stat, win_file, win_copy and slurp modules (only when using WinRM/PowerShell).
- Check for win_ping module to determine if core modules are missing (only when using WinRM/PowerShell).
- Add stdout_lines to result from running low level commands (so stdout_lines is available when using raw/script).
- Update copy action plugin to use shell functions for joining paths and checking for trailing slash.
- Update fetch action plugin to unquote source path when using Windows paths.
- Add win_copy and win_template action plugins that inherit from copy and template.
- Support running .bat and .cmd scripts using default system encoding instead of UTF-8.
- Always send PowerShell commands as base64-encoded blobs to allow for running simple PowerShell commands via raw.
- Support running modules on Windows with interpreters other than PowerShell.
- Update integration tests to support above changes and test unicode fixes.
- Add test for win_user error from ansible/ansible-modules-core#1241 (fixed by ansible/ansible-modules-core#1774).
- Add test for additional win_stat output values (implemented by ansible/ansible-modules-core#1473).
- Add test for OS architecture and name from setup.ps1 (implemented by ansible/ansible-modules-core#1100).

All WinRM integration tests pass for me with these changes.
11 years ago
Brian Coca c2d8ca4bf7 fixed test to expected output 11 years ago
Brian Lloyd 07b14b9731 integration tests for windows implementation of lineinfile 11 years ago
James Cammarata ba56beda90 Fix include task using a potentially undefined variable 11 years ago
James Cammarata 71867f9480 Remove vars attribute from base
Fixes #11779
11 years ago
James Cammarata 42cfacf83b Switch up the task/host overrides for PlayContext to use the compiled vars dict
Fixes #11436
11 years ago
James Cammarata e505a1b7c4 Fix variable precedence integrationt test 11 years ago
Brian Coca c76a66694f fixed typo 11 years ago
Michael Scherer 106e942faa Document and test 'is undefined' rather than 'is not defined'
According to https://github.com/ansible/ansible/issues/10273,
this syntax should work better for nested dicts.
11 years ago
James Cammarata 8146a193eb Fix strategy base unit tests after 88e1ef8 11 years ago
Toshio Kuratomi b06353791c Don't pass mode from synchronize action plugin to the ansible module
Fixes https://github.com/ansible/ansible-modules-core/issues/1783
11 years ago
James Cammarata 993ce592b1 Update unit tests for flush_handlers fix 11 years ago
James Cammarata 66a8864ae9 Fix environment setting and inheritence
Fixes #11401
11 years ago
James Cammarata 46f74a0d69 Re-adding --start-at-task test to unicode integration test 11 years ago
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
11 years ago
James Cammarata b09eed3353 Merge branch 'test_notify_with_loops' of https://github.com/pilou-/ansible into pilou--test_notify_with_loops 11 years ago
James Cammarata fadd8f23f1 Fix broken strategy unit test from earlier change 11 years ago
James Cammarata dca36c1d16 Reestablishing the use of tags/when for role duplication detection
Not figuring these in can cause problems with "diamond" pattern relationships,
even though this is still not quite optimal.
11 years ago
Pierre-Louis Bonicoli aa23ea8462 tests: checks that handlers work with loops 11 years ago
Pierre-Louis Bonicoli 8c392a94b7 Play.get_name: remove prefix, return name only 11 years ago
James Cammarata 3d77723e3d Cleaning up some stuff related to the connection info/become/executable change 11 years ago
Brian Coca 9dc5607730 Merge pull request #11519 from bcoca/human_readable
new human_readable filter to transform bits and bytes into cake
11 years ago
James Cammarata d6b058eaae Removing invocation from async test, as it's pointless 11 years ago
Brian Coca 323362e23a added stdout to test result 11 years ago
Toshio Kuratomi 327b1676a8 Add support for SNI and TLS-1.1 and TLS-1.2 to the fetch_url() helper
Fixes #1716
Fixes #1695
11 years ago
Brian Coca f6c64a8c00 fixed var file loading 11 years ago
Brian Coca 5eb25a48ee added empty include test 11 years ago
Brian Coca 22165dd046 fixed bad parsing tests 11 years ago
James Cammarata 3b913943b2 Updating base strategy unit test regarding bad file loads based on earlier change 11 years ago
Brian Coca 44aef347cb enabled good parsing tests in parsing target
fixed test_good_parsing role
added raw duplicate parameters to test_good_parsing
11 years ago
James Cammarata 6971e92f39 Fixing up some output stuff 11 years ago
Brian Coca b4de103bb2 Merge pull request #11555 from cchurch/test_win_get_url_updates
Update tests for win_get_url module to test force parameter
11 years ago
Chris Church 1aa2191fd5 Update tests for win_get_url module to test force parameter and invalid URLs/paths. 11 years ago
Brian Coca c6dde19a5e Merge pull request #11537 from chrismeyersfsu/azure-test
assert password or ssh key provided on new image creation
11 years ago
Brian Coca 9c5a6d7b5a fixed all references to old plugins/inventory to point at contrib/inventory 11 years ago
James Cammarata 5430169b77 Cleaning up includes test to match 2.0 behavior
* Perhaps the only precedence change, in 2.0+ variables from set_fact
  will not override params to an include file, as params are expected
  to be more specific than host-based variables.
* Uncommented long-form include example.
11 years ago
James Cammarata 1163e38d39 Fix unit tests for new magic variable addition 'ansible_version' 11 years ago
James Cammarata bbe8f48a46 Update role unit tests for changes made to require a play during loading 11 years ago
James Cammarata b520d5bc60 Lots of fixes for integration test bugs 11 years ago
Chris Meyers 32685f9648 assert password or ssh key provided on new image creation 11 years ago
James Cammarata 27fcf1a4b5 Fix bug in registered variables related to delegate_to changes 11 years ago
James Cammarata f5baad4fb2 Removing unicode --start-at-task test for now as we haven't added that back into devel 11 years ago
James Cammarata 64a1b1e043 Fix first_available_file: support for copy and template actions 11 years ago
marconius 79394f5c8f Added tests for `taggable` module 11 years ago
Brian Coca 48827a31bc added minimal testing for special template vars 11 years ago
James Cammarata bfbb88b4a9 Fix strategy plugin unit tests related to earlier changes 11 years ago
Brian Coca 688088547b new human_readable filter to transform bits and bytes into cake (not really) 11 years ago
Toshio Kuratomi f44f9569e1 Test unquote works as expected and fix two bugs:
* escaped end quote
* a single quote character
11 years ago
Brian Coca aa6486778f fixed become test to match new expected output 11 years ago
James Cammarata 53cd96befe Updating unit tests to account for new magic variable 'vars' 11 years ago
Brian Coca 5122455db8 ported missing sequence updates from 1.9 11 years ago
Matt Martz 2cd3a1be00 assertRaises should be given an exception type. Fixes 11441 11 years ago
Matt Martz 43f81c7c01 Fix YAML formatting issue for rax integration tests 11 years ago
Brian Coca 200706d5ab Merge pull request #9812 from fgsch/fix_1904
Allow globbing in creates= and removes= directives
11 years ago
Matt Martz c440762b61 Make the wait_timeout for rax tests a configurable default 11 years ago
James Cammarata 4fbd4ae18b Update VariableManager test for additional magic variable playbook_dir 11 years ago
Matt Martz b370f6efce Add tests for rax_scaling_group 11 years ago
Toshio Kuratomi 605ddad37e Add test that url lookup checks tls certificates 11 years ago
James Cammarata d913f169a8 Update failed_when integration test to be more thorough 11 years ago
Brian Coca 5ed2e44026 adjusted with_dict test to now work 11 years ago
Brian Coca dc31086a17 added with_dict test 11 years ago
Brian Coca 5bac17de51 fixed pfexec test 11 years ago
Brian Coca 11f1d99a5b added test for first_available and copy 11 years ago
Brian Coca b9bb3e83b7 added new test that allows for listed bare strings
now with_times: barestring, will error out in test
11 years ago
Brian Coca 091caf6279 added missing error class import 11 years ago
Brian Coca e9cf67004b updated fail_on_undefined test to new function signatures 11 years ago
Brian Coca aa6e204b6e Merge pull request #11115 from jhawkesworth/second_go_at_fixing_1404
Part fix for https://github.com/ansible/ansible-modules-core/issues/1404 (replaces #11086)
11 years ago
Matt Martz 230be812ba Don't test for play.become_pass any longer 11 years ago
Matt Martz 49d19e82ab Get tests passing
The largest failure in the tests was due to selinux not being installed.
The tests don't require it to be installed, so mock the import.
11 years ago
James Cammarata 9ac624d2c9 Fix mock DictDataLoader _get_file_contents to match real code 11 years ago
James Cammarata e547e1f9ba Merge branch 'devel' into devel_switch_v2 11 years ago
James Cammarata fe41f109a9 Merge branch 'v2_final' into devel_switch_v2 11 years ago
James Cammarata 4bc7703db3 Fixing some small bugs related to integration tests (v2) 11 years ago
Jon Hawkesworth 30b92a6f4c Get-FileChecksum allways returns a string now,
and the test_win_copy integration tests that depend on the checksum
have been updated in this change too.
11 years ago
Chris Church d2ba0de6aa When running winrm tests against multiple hosts, fail the play when any host has a failure. 11 years ago
Chris Church 8d742df1de Allow prepare_win_tests role to run multiple times, before each role that depends on it. 11 years ago
Chris Church 1e418fe56a Only run win_feature tests when the host has the ServerManager module. 11 years ago
James Cammarata 0828028c71 Fixing unit test for included file changes 11 years ago
Toshio Kuratomi ac14ad1419 Test on fields that are actually set 11 years ago
Toshio Kuratomi 73b7d96501 Test on fields that exist 11 years ago
Toshio Kuratomi 1bda7cc200 Test that uri module validates certs 11 years ago
Toshio Kuratomi 0f4a3409d8 Add test that validate_certs=no works 11 years ago
James Cammarata 60bea844b3 Merge branch 'v2_final' into devel_switch_v2 11 years ago
James Cammarata 2bad888f28 Merge branch 'v2_final' into devel_switch_v2
Conflicts:
	lib/ansible/inventory/__init__.py
	lib/ansible/modules/core
	lib/ansible/utils/__init__.py
	lib/ansible/utils/module_docs.py
11 years ago
Toshio Kuratomi afc19894e1 Make fetch_url check the server's certificate on https connections 11 years ago
Toshio Kuratomi 1ccf2a4685 Make fetch_url check the server's certificate on https connections 11 years ago
James Cammarata e59d4f3b51 More module_utils/basic.py unit tests for v2 11 years ago
Toshio Kuratomi b91532aff3 Drop the mysql test db first so that we test with a clean slate. 11 years ago
Yannig Perre c2968d6d84 New lookup plugin : ini. Can handle ini file and java properties file.
Can also read a list of value in a section using regexp.
11 years ago
James Cammarata 339a02c384 Started reworking module_utils/basic unit tests (v2) 11 years ago
James Cammarata d4a31e8d26 Adding unit tests for TaskExecutor (v2) 11 years ago
Serge van Ginderachter b92d70c5b6 tests files extensions in group/host_vars dir
only files with extensions as per
C.YAML_FILENAME_EXTENSIONS should be parsed
11 years ago
James Cammarata 838ff32001 Fix unit test for conn_info (v2)
The default user expected in the connection information is the current
user, not root
11 years ago
James Cammarata ecd5eb902d Adding unit tests for ConnectionInformation (v2) 11 years ago
Toshio Kuratomi a8d52e3e94 Have to setup the proper mime-types before importing SImpleHttpServer 11 years ago
Toshio Kuratomi 7af2632c87 Forgot to invoke wrapper instead of SimpleHttpServer 11 years ago
Toshio Kuratomi b312e97a30 Think that integration tests are failing in json due to lack of json mimetype. Make a short wrapper to fix that. 11 years ago
Toshio Kuratomi 13253f9c68 Merge pull request #10565 from bcoca/with_sequence_expand
made sequence more flexible
11 years ago
James Cammarata 9921a1d2be Unit tests for base strategy class (v2) 11 years ago
Toshio Kuratomi 13578738bf Merge pull request #11014 from ansible/uri-integration
Uri integration tests
11 years ago
Brian Coca 78985e5c33 Merge pull request #11030 from resmo/feature/cloudstack_tests_cs_portforward
cloudstack: add tests for cs_portforward
11 years ago
Rene Moser 3916dc8f9e cloudstack: add tests for cs_portforward 11 years ago
Rene Moser 3d816402ba cloudstack: add tests for cs_firewall 11 years ago
James Cammarata 21fa385ce7 Reorganizing plugin unit tests and adding start of strategy tests (v2) 11 years ago
James Cammarata a960fcd569 Adding module_utils tests from v1 to v2 11 years ago
James Cammarata 398b1d3e60 Cleaning up template test syntax a bit 11 years ago
James Cammarata 9aa8676bdd More template unit tests for v2 11 years ago
James Cammarata 23cd3294d0 Starting to add v2 tests for template 11 years ago
James Cammarata 48d62fd934 Cleaning up VariableManager tests (v2) 11 years ago
Toshio Kuratomi 0f9ad9dad2 Update integration tests from @darkk to work with the current uri module code 11 years ago
Leonid Evdokimov 3383a7b37a tests: replace start-stop-daemon with async action 11 years ago
Leonid Evdokimov ae9ba4afa1 uri: provide raw_content, parse json without double-decoding. Fixes #7586
Regression potential:
 - `raw_content` is written to `dest` file instead of decoded `content`
 - `raw_content` doubles module reply
11 years ago
James Cammarata a0509cda1e Fix test_role unit tests to use unique role names to avoid role caching errors 11 years ago
Toshio Kuratomi bbda86ad0a Fix parsing tests so that they all run 11 years ago
James Cammarata b94e2a1f4e Fixing bugs related to parsing and fixing up parsing integration tests (v2) 11 years ago
James Cammarata 830225d9c1 Fix errors in subelements lookup plugin and associated tests (v2) 11 years ago
Jan Losinski dcb54d9657 Add integration test to verify #10073
In issue #10073 a misbehaviour in literal handling for inline lookup
arguments that can cause unexpected behaviur was reported. This
integration testcase reproduce the problem.

After applying pull request #10991 the issue is fixed and the test
passes.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
11 years ago
Serge van Ginderachter 9b646dea41 Add optional 'skip_missing' flag to subelements 11 years ago
James Cammarata 1ca8cb8553 Fixing up v2 unit tests 11 years ago