Commit Graph

1118 Commits (37acb7423b4ad085af0b3922fa1ab76ddd18bab1)

Author SHA1 Message Date
Virgil Dupras bf48383610 Fix regression in jinja2 include search path (#18617)
* Fix regression in jinja2 include search path

Since commit 3c39bb5, the 'ansible_search_path' variable is used to set
jinja2's search path for {% include %} directives. However, this path is
the the proper one because our templates live in 'templates' subdirs in
our search path.

This is a regression because previously, our include search path would
include the dirname of the currently interpreted file, which worked most
of the time.

fixes #18526

* Fix template lookup search path

Improve fix in commit c96c853 so that the search path contain both
template-suffixed paths as well as original paths.

ref PR #18617

* Add integration test for template lookups

Tests regression at #18526

This test fails on current devel branch and succeeds on PR #18617
8 years ago
Adrian Likins 9b1ce5dfb9 add integration tests for authorized_key (#18130)
Primarily for behavior related to
https://github.com/ansible/ansible-modules-core/issues/4780
8 years ago
Brian Coca ca1514cf2a unified boolean function
optimized boolean function
fixes #17815
8 years ago
John R Barker 4875824357 Network dut (#18668)
* Use dedicated account for testing

This also avoids any instance of "vyos" being masked by no_log

* use vyos-dut-01
8 years ago
John R Barker 54c5ea29bb Update inventory.network (#18654) 8 years ago
John R Barker 0793cf3599 HACK test on older vyos machine (#18653) 8 years ago
John R Barker 09550e4f46 Ops (#18652)
* Link to missing ops.yaml

* Add missing ops.yaml
8 years ago
John R Barker a51d79c7a9 Tests are required for Network modules (#18618)
* Tests are required for Network modules

Also detail how to get help

* Update README.md

* Update README.md
8 years ago
John R Barker 4c1bb31611 Use DUT instance for veos (#18608) 8 years ago
Matt Clay 089ffae107 Make ansible-pull integration tests more robust. 8 years ago
Matt Clay 3fd13aaffe Detect default group in template integration test. 8 years ago
John R Barker 346aa8f1b2 Use DUT instance for vyos (#18599)
We now have a dedicated test machine, so use that
8 years ago
Adrian Likins 25aa757e80 add a intg test for vault encrypted inventory (#18550) 8 years ago
Matt Clay 324702c38f Use output_dir instead of outputdir for tests. 8 years ago
Sam Doran f68b49057f Add test cases for VyOS commands that don't honor paging settings (#18553)
* Add test cases for VyOS commands that don't honor paging settings

Testing for issue fixed in PR #18546

* Add provider line and fix indentation

For the way we invoke the tests we need to specify the `provider:` 
Also fix the indentation on `register:`
8 years ago
Toshio Kuratomi 493fb4b665 Test that changing the flags on a mounted filesystem works (#18552)
* Test that changing the flags on a mounted filesystem works
8 years ago
Matt Davis 4dba83afc5 disable win_async_wrapper success loop test to keep CI happy 8 years ago
Matt Clay 4d616366c0 Update test to use keyserver.ubuntu.com. 8 years ago
Matt Davis 602bba4a82 retag win_async_wrapper test to run on module changes 8 years ago
Ganesh Nalawade f6437f1b6e Fix command typo in integration tests README file (#18539) 8 years ago
James Cammarata 4f06a86161 Alternately track listening handlers by uuid if no name is set
Fixes #17846
8 years ago
Adrien Vergé 0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
8 years ago
John R Barker de13f91a50 Update docker-setup-rht.yml 8 years ago
James Cammarata bd4f7fca27 Fixing incorrect use of version_compare in docker integration test 8 years ago
Tom Melendez b9e07c8dd7 [GCE] updates to gce integration test (#18097)
* Added test for sequenced-name instance generation (num_instances)
* Added param-check tags to tests that only do argument checking
Should be merged AFTER ansible/ansible-modules-core#4276
8 years ago
Matt Clay 3f785ee173 Remove unnecessary file. 8 years ago
Matt Clay c955688772 Move ansible ad-hoc tests to integration targets. 8 years ago
John R Barker 947e0f264e Network Tests - Extend examples (#18451) 8 years ago
Tom Melendez 28dc527b2c Basic integration test for gce_tag. (#17928) 8 years ago
Matt Clay 86c5eddb05 Move ec2_vpc_nat_gateway integration test role. 8 years ago
Matt Clay 71819c0a60 Test reorganization and cleanup. (#18270)
- Correct directory name in test/README.md
- Move code-smell tests to test/sanity/code-smell
- Update code-smell.sh to use new script paths
- Add test/integration/target-prefixes.win for ansible-test
- Move module unit tests to match module directory layout
8 years ago
Toshio Kuratomi 02859a3e32 Add tests for dnf modelled after the yum tests (#18226) 8 years ago
John R Barker 0f8ff0701d Disable testing on csr01 (#18264) 8 years ago
John R Barker 5b4ea08a1f Formatting (#18260)
* Formatting

* Update README.md

* Update
8 years ago
John R Barker 2f35ccb562 Network Test Documentation (#18234)
* Network Test Documentation

Will need improving over time, though this ensure that everything that was in `ansible/test-network-modules` is in `ansible/ansible`

* Update README.md

* Inventory file
8 years ago
John R Barker 5fa82f2b4e ops not openswitch (#18256)
The openswitch modules have a prefix of `ops`, not `openswitch`, which is the directory name.
8 years ago
John R Barker 9ca1025ea8 Network module prefixes (#18246)
* Network module prefixes

In ansible-test we should skip tests for these modules, they will be
tested via another process.

* Update target-prefixes.network
8 years ago
John R Barker 8331e915e0 Network inventory file (#18240) 8 years ago
John R Barker e0cc7b3415 Migrate Network Tests into ansible/ansible (#18233)
* Docs Networking tests

* Copy networking tests from test-network-modules

* Networking transport settings - group_vars

* Network playbooks

* Debug should be off by default

* Update nxos.yaml

* Remove items from top level

* Use dependencies, not pre-tasks

* Remove trailing blank lines

* Remove backup files

* newlines
8 years ago
Adrian Likins 0a1f391881 Fix fact gathering intg test asserts (#18168)
If the facts returned by setup included strings that
had double quotes in them, the asserts in test_gathering_facts.yml
would fail with errors like:

    "The conditional check '\"[{u'mounts': {u'options':
    u'rw,context=\"system_u:\"'}}]\" != \"UNDEF_HW\"' failed. The error was:
    template error while templating string: expected token 'end of statement
    block', got 'system_u'. String: {% if \"[{u'mounts': {u'options':
    u'rw,context=\"system_u:\"'}}]\" != \"UNDEF_HW\" %} True {% else %}
    False {% endif %}"

For one example, if mount facts returned an 'options' field that
included double quoated selinux context ids, the test would fail.

Fix is removing the double quoting in the assert 'that:' lines,
and removing the unneeded double curly brackets.
8 years ago
Matt Davis c1b7d2e560 add large interleaved stdout/stderr integration tests for win_shell/win_command 8 years ago
Toshio Kuratomi 589e71dbc5 Fix the uri testserver to run on python3 8 years ago
Matt Davis 9a78273665 reenable win_async loop test 8 years ago
Pierre-Louis Bonicoli 3edac76e1b tests: check that handlers are able to use 'include' 8 years ago
Adrian Likins f99ffb5620 Fix test_filters fail because of dict sort (#18105)
Fixes #17308
8 years ago
Toshio Kuratomi b902b5d046 Pixelrebel amc pr2654 (#18089)
* Add tag verification test (ansible-modules-core PR 2654)

* Fix typo

* Use smaller repo for testing, add dependency control

* Test is gpg exists before running git signing tasks

* Correct the test conditionals so that gpg1 is tested
8 years ago
Michael Scherer 5215832f15 Make the test run when used on a local system (#18050)
ANSIBLE_ROLES_PATH is relative to the config directory, if found. Use an absolute path instead.
8 years ago
Toshio Kuratomi 7e0bd5632d epdb doesn't work on python3 so we need a different package to test pip 8 years ago
Matt Clay c2ec86cb78 Migrate Windows CI roles to test targets. (#18005) 8 years ago
Matt Clay 75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 8 years ago
Matt Clay 374e4348e4 Split out var_blending test into targets dir. (#17996) 8 years ago
Matt Clay 410b96d716 Clean up integration tests. (#17991) 8 years ago
Matt Clay 80a5c70ad7 Split integration tests out from Makefile. (#17976) 8 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
8 years ago
Matt Davis aa0ad073b8 bugfixes to JSON junk filter, added unit/integration tests to exercise (#17834) 8 years ago
Matt Clay 21857e8618 Disable privileged mode on Shippable. (#17844) 8 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.
8 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
8 years ago
Matt Clay 6d78397b8b Update get_url test to use httptester. (#17787) 8 years ago
Toshio Kuratomi 1f311f0739 Disable mount tests for now. Mount is buggy on too many platforms 8 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
8 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.
8 years ago
Tom Melendez 97a1b7ded1 Integration Playbook for Google Cloud DNS module. (#17698) 8 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
8 years ago
Matt Clay 3874e653c1 Remove tests for deprecated su and sudo. (#17697) 8 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.
8 years ago
Matt Clay 39c5c558f8 Switch tests from sudo to become. (#17694) 8 years ago
Toshio Kuratomi 7889e1ffc1 Additional tests for check mode idempotence (#17679) 8 years ago
Matt Clay e0ad02c6dd Remove test for deprecated first_available_file. (#17674) 8 years ago
Rob Cutmore 2716fe4362 Add test for checking pip package in check mode (#17360) 8 years ago
Steve Gargan a06da86d52 update consul tests to reflect fixes to the core and session modules (#17451) 8 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) 8 years ago
Matt Clay 355b29573c Use default on undefined vars in tests. (#17601) 8 years ago
Matt Clay 16baef1f72 Do not use bare vars in integration tests. (#17599) 8 years ago
Matt Davis f497d771c8 win_shell/win_command changes + tests (#17557) 8 years ago
Matt Clay 7b3cbafbe9 Add python 3 awareness to apt module tests. (#17574)
Also remove unnecessary dependency from ubuntu1604py3 Dockerfile.
8 years ago
René Moser 28feba2fb3 jenkins_job: extend integration tests (#17558) 8 years ago
Michael Scherer e9ffe2062f Add test for the pause in loop feature (#17336)
See https://github.com/ansible/ansible/pull/17289
8 years ago
René Moser 6a3e948a7c jenkins_job: add integration tests (#17499) 8 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.
8 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.
8 years ago
Matt Clay 784810a84c Add python 3 support to test_apt_repository. (#17472) 8 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.
8 years ago
Matt Davis f239e1e61f windows async changes and tests (#17400) 8 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.
8 years ago
Toshio Kuratomi d6ebf9bdc6 Symink integration tests for fetch and stat 8 years ago
Michael Scherer 918d1e038e Do not hardcode python executable in test (#17380)
Based on https://github.com/ansible/ansible/pull/17376
8 years ago
Matt Clay 4ae59b2743 Use ansible_python for interpreter in test_uri. (#17376) 8 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.
8 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.
8 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.
8 years ago
Jonathan Mainguy a4cee11649 Add test for specific privlege grants on database.table (#17328)
For the mysql_user module
8 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
8 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.
8 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
8 years ago
René Moser 26118a51f8 exo_dns: new module utils and integration tests for exoscale DNS (#17230) 8 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.
8 years ago
Toshio Kuratomi 380a5801e9 Enable integration tests on python3 that are already working (#17212) 8 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
8 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.
8 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
8 years ago
Matt Clay a695e18615 Add support for OS X CI on Shippable. (#17160) 8 years ago
Matt Clay 04bd6a3619 Make tests more cross platform. (#17154) 8 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.
8 years ago
Matt Davis e0bdb502e3 raw now returns changed: true (#17112)
for consistency w/ shell/command/script "non-idempotent" modules.

Updated tests, changelog.
8 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.
8 years ago
Matt Clay 80385a47bd Remove FreeBSD interpreter test hacks. (#17007)
* Add TEST_FLAGS to no_log target.
8 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
8 years ago
Matt Clay d2fb845955 Enable more FreeBSD integration tests. (#16991) 8 years ago
Matt Davis 746ea64d30 fix for unspecified retries on until + test (#16963)
fixes #16907
8 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
8 years ago
Matt Clay 5f12731797 Run more integration tests on FreeBSD. (#16923) 8 years ago
Matt Clay 00fbc76e69 Increase async time limit on tests to 10 seconds. (#16921) 8 years ago
Matt Clay ff4f4bc8a0 Add binary module tests to Windows CI. (#16914) 8 years ago
Matt Clay e2602e9be0 Add FreeBSD to Shippable CI. (#16883) 8 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.
8 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.
8 years ago
Matt Clay 380ed053e8 Add Windows integration tests to Shippable. (#16803)
Enable Windows integration tests on Shippable.
8 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
8 years ago
Matt Martz 4065acc37d indent callback output if using 3verbosity or higher (#16231) 8 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
8 years ago
nitzmahone 7aa39981c4 fix setup test for renamed windows fact 8 years ago
James Cammarata 153133132d Updating tests for new module feature for remote_src in unarchive
Fixes #10218
8 years ago
Matt Clay 0ada7eae5e Add test tags for shell and command modules. 8 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.
8 years ago
Matt Clay bbffa0a0e9 Add tags for modules without dedicated test roles. 8 years ago
James Cammarata cd4412016a Updating integration tests for async testing 8 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
8 years ago
Matt Clay 9a6b8ab271 Add more tags to test_async role. 8 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
8 years ago
Robin Roth 8021adfe97 use git-core ppa instead of menulibre
menulibre is no longer actively maintained and does not support 16.04
8 years ago
Robin Roth a5e394d23a reenable apt_repository tests in ubuntu 16.04
fixes #15718
8 years ago
matsu-chara 9f8b0cabcd fix default/main.yml to defaults/main.yml 8 years ago
Matt Clay 4e369a31db Fix test_async. (#16552)
* Conditionally run test_async in docker containers.
* Revise test_async test.
8 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
8 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.
8 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.
8 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
8 years ago
nitzmahone 1f92ade584 add integration test to assert included tasks run in proper order 8 years ago
jctanner b7f9037b5b Add test for multi-options in authorized_key (#16375)
Addresses https://github.com/ansible/ansible-modules-core/issues/1715
8 years ago
nitzmahone 7bc3be64ae fix win_setup integration test to match fact name 8 years ago
= 9857af2b6e added further tests for win_regedit to cover the changes made
under https://github.com/ansible/ansible-modules-extras/pull/2436
8 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
8 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.
8 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.
8 years ago
Matt Clay 6e1e86028f Split integration tests into multiple groups.
This will allow tests to complete much faster.
8 years ago
Adrien Vergé 4d48711242 Fix YAML source and check it on Shippable (#15678)
Fix YAML source and check it on Shippable
8 years ago
Matt Clay 7a533406f9 Merge pull request #13145 from Mic92/devel
lxc connection plugin
8 years ago
Toshio Kuratomi 08fd017d99 Test file needed to be renamed 8 years ago
Toshio Kuratomi 2a5ef4496a Workaround test failures on OSX controllers for now -- will have to look
more heavily into normailizing the unicode later.
8 years ago
Brian Coca 3387d557bc Revert "Add prefixing and suffixing fuctionality to assemble module" (#16084) 8 years ago
Matt Clay e45b3b89a2 Skip some service tests for systemd. 8 years ago
Chris Houseknecht ce34397cf8 Merge pull request #10399 from underyx/assemble-with-prefix-and-suffix
Add prefixing and suffixing fuctionality to assemble module
8 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
8 years ago
Bence Nagy 13210e346f Add integration test for assemble with a header and a footer 8 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.
8 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.
8 years ago
Jörg Thalheim 88482234e6
lxc connection plugin 8 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
8 years ago
nitzmahone 42f6114b61 fix windows integration tests to run under kerberos users 8 years ago
Matt Martz 651b83d8be Run test_binary_modules 8 years ago
Matt Martz 2d18607f1e Add GPL3 header to helloworld.go 8 years ago
Matt Martz 6ad8ec0919 Add integration tests for binary modules 8 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
8 years ago
Toshio Kuratomi 7ccb08cc7e Switch to a different url for testing SNI right now. (#15798) 8 years ago
Rene Moser 5583027f99 tests, postgresql: add ubuntu 16.04 support 9 years ago
Rene Moser 39e4caafb2 tests, apt_repository: disable Ubuntu 16.04 as there is no package yet 9 years ago
Rene Moser c20d1fced7 tests: fix tests on Debian 8 9 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
9 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.
9 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
9 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
9 years ago
Toshio Kuratomi 85bef402b1 Merge pull request #14614 from gundalow/test_binary
non-destructive says we should run test_binary at v2
9 years ago
= bd74091ed9 win_regedit integration test to cover change to allow empty strings to be compared 9 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
9 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
9 years ago
Robin Roth 59bad647b6 Revert "Disable new git tests until a fix for rhel6/7 is merged."
This reverts commit 197d3dfe97.
9 years ago
Toshio Kuratomi 197d3dfe97 Disable new git tests until a fix for rhel6/7 is merged. 9 years ago
Brian Coca 33761efd19 Merge pull request #15417 from bcoca/copy_vaulted
Copy vaulted
9 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
9 years ago
Matt Davis 822f904aa6 Merge pull request #14813 from mattclay/lxd-plugin
Add lxd connection plugin.
9 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
9 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)
9 years ago
James Cammarata ed35e8bce2 Don't override the http status code when successful in urls.py 9 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
9 years ago
Matt Clay 5fc76df18b Add lxd connection plugin. 9 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 9 years ago
Robin Roth b48e628429 test git version before running test on depth 9 years ago
= 157072a39f Windows: win_regedit integration tests (following https://github.com/ansible/ansible-modules-extras/pull/2034 ) 9 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
9 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
9 years ago
Matt Clay af8258cdf2 Revert "Increase verbosity of connection tests." (#15305) 9 years ago
Matt Martz dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
9 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.
9 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
9 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
9 years ago
Toshio Kuratomi 4b0f65a3e5 Merge pull request #15207 from mattclay/verbose-test
Increase verbosity of connection tests.
9 years ago
Matt Davis 3f70d7a70d Merge pull request #15144 from mattclay/winrm-test
Add winrm tests and fix exposed unicode errors.
9 years ago
James Cammarata 180a0a8e77 Fixing up the logic in the test_script tests removal portion 9 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.
9 years ago
Matt Clay a0361626c9 Increase verbosity of connection tests. 9 years ago
Michael Gruener 94806e1953 Add integration tests for the cloudflare_dns module 9 years ago
Brian Coca 1ebc2fda71 removes python requirement to script
mistakenly added when checksum was made to use stat module
fixed assertion in test
9 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.
9 years ago
Toshio Kuratomi c3548677de Add TEST_FLAGS to test_hash 9 years ago
Brian Coca 9c6b49fd3d Merge pull request #15004 from agx/zypper-repository-integration-tests
Integration tests for zypper repository
9 years ago
Toshio Kuratomi 6824f3a7cc Change url so that we don't test https in the tests for file perms 9 years ago
Toshio Kuratomi cbd93b6ad3 Add integration test for #11821 9 years ago
nitzmahone b95286c88e re-integrate test_test_infra output checking
added secondary run with overridden inventory/test args per bcoca request
9 years ago
nitzmahone 6578e63e63 improve test_test_infra debug messaging, rc check 9 years ago
Matt Clay 9a922fcf0d Update test to use mysql connect_timeout option. 9 years ago
Guido Günther 2095d1ab33 Integration tests for zypper repository 9 years ago
Rene Moser 5d5d905e36 cloudstack: new integration tests test_cs_resourcelimit 9 years ago
Rene Moser 4d6a15ebc3 cloudstack: new integration tests test_cluster 9 years ago
Rene Moser d50026b108 cloudstack: new integration tests test_cs_pod 9 years ago
Rene Moser ae6d2a5602 cloudstack: new integration tests test_cs_instance_facts 9 years ago
Rene Moser d9f7589460 cloudstack: new integration tests test_cs_configuration 9 years ago
René Moser 7587c20d27 Merge pull request #13183 from resmo/for-ansible
[2.1] cloudstack: add tests for cs_volume
9 years ago
Toshio Kuratomi ea58ccfd5e Make the fact gathering give a little more information on failure 9 years ago
Toshio Kuratomi 9a6a5a5516 add a fact gathering check for the default of all 9 years ago
Toshio Kuratomi f0e6d28815 Make integration tests for fact gathering assert on failure 9 years ago
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 9 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
9 years ago
Matt Clay a44b88936b Add unicode dir to connection tests. 9 years ago
Matt Clay 20eee14a2c Lower connect timeout for test_mysql_variables. 9 years ago
Matt Clay 5c206eaf0b Add additional plugins to connection tests.
- docker
- libvirt_lxc
- jail

These tests will not run as part of the build, but can be run manually.
9 years ago
Brian Coca a07495e4c8 allow tests to run with parameters
also fixed test_test_infra to allow tags
9 years ago
James Cammarata c2441c15c3 Revert "corrected failed_when test"
This reverts commit 140df20504.
9 years ago
James Cammarata 963178f392 Revert "complete correction of test, key exists but is false"
This reverts commit 7e6343213b.
9 years ago
Brian Coca 923548f6d5 removed test_infra from setup as it fails when using --tags 9 years ago
Brian Coca 7e6343213b complete correction of test, key exists but is false 9 years ago
Brian Coca 140df20504 corrected failed_when test 9 years ago
nitzmahone 6c835b2600 ensure assert and fail work before we test anything else 9 years ago
James Cammarata 9d61a6cba8 Fixing PlayIterator bugs
* Unit tests exposed a problem where nested blocks did not correctly
  hit rescue/always portions of parent blocks
* Cleaned up logic in PlayIterator
* Unfortunately fixing the above exposed a potential problem in the
  block integration tests, where a failure in an "always" section may
  always lead to a failed state and the termination of execution
  beyond that point, so certain parts of the block integration test
  were disabled.
9 years ago
Matt Davis 22344c5320 Merge pull request #14812 from mattclay/test-connection
Add tests for connection plugins.
9 years ago
Matt Martz 8aee648bc9 Add as dependency of the parsing make target 9 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
9 years ago
Matt Clay 49892b287b Use vars to eliminate redundant test commands. 9 years ago
Matt Clay ca62bc5db3 Add tests for connection plugins. 9 years ago
James Cammarata 80b10bd669 Moving creating of testing work dir out of dep role and into Makefile 9 years ago
Toshio Kuratomi 7160b40ab1 Fix the Makefile to run under dash (POSIX /bin/test syntax) 9 years ago
Matt Davis 3d58fd1402 Merge pull request #13481 from jhawkesworth/a21_reg_merge_tests
windows; adding integration tests for win_regmerge (extras module)
9 years ago
James Cammarata 9de24a3735 Assert things against the recursive copy result to make sure it did something 9 years ago
Matt Martz cacb74aeeb Merge pull request #14340 from sivel/uri-no-httplib2
Add RedirectHandler class for controlling redirects in urllib2
9 years ago
Matt Martz 3e9408e317 Add some additional integration tests that mix SSL verification and redirects 9 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.
9 years ago
James Cammarata 58a6cf822a Merge pull request #13203 from willthames/galaxy_10620
Allow tree-ish versions for ansible-galaxy
9 years ago
Brian Coca bb155e1142 added test for cartesian lookup 9 years ago
Brian Coca 08b3dbcda3 corrected several usages of deprecated bare vars 9 years ago
Matt Martz 97e0f29a5b Add/improve tests for the uri module 9 years ago
James Cammarata b713f1ca53 Fix for copy test as ansible_ssh_user is not set by default now 9 years ago
James Cammarata 8039ceee0f Tweak block integration tests to also test the free strategy 9 years ago
James Cammarata 5466510edb Removing .out file for integration tests and adding to .gitignore 9 years ago
James Cammarata f4bd3be71f Adding block integration tests 9 years ago
Robin Roth ed059ffca9 add integration test for ansible-pull
* this test includes the behavior described in #13688 and #13681
* it runs a minimal playbook and checks for correct use of inventory and limit
9 years ago
Brian Coca 46fde754af Merge pull request #14044 from skorochkin/devel
Adding support for scm-based role source urls (ansible-galaxy)
9 years ago
James Cammarata fb797a9e77 Fixing role dependency chain creation
The dep chain for roles created during the compile step had bugs, in
which the dep chain was overwriten and the original tasks in the role
were not assigned a dep chain. This lead to problems in determining
whether roles had already run when in a "diamond" structure, and in
some cases roles were not correctly getting variables from parents.

Fixes #14046
9 years ago
Sergii Korochkin 13e8732598 [hotfix] add missed playbook file 9 years ago
Sergii Korochkin 1325c21ca0 Adding support for scm-based role source urls (incl. integration test to cover it) 9 years ago
Matt Davis acf49cf837 Merge pull request #13569 from mattclay/apt-repository-filename
Test for filename option in apt_repository module.
9 years ago
Toshio Kuratomi bcb22b0e1a Integration tests for https://github.com/ansible/ansible-modules-core/pull/558 9 years ago
James Cammarata 749fbd43ef Removing test for map filter until we can figure out how that's supposed to work 9 years ago
Brian Coca e7804a6fdd fixed test to use hostvars and not expect vars sub
vars is at the same level as hostvars and was only included in hostvars
temporarily as a bug
9 years ago
Toshio Kuratomi 46903c80fa More fixes for unicode handling in the connection plugins.
Tested that ssh, docker, local, lxc-libvirt, chroot all work with the
updated unicode integration test.
9 years ago
Toshio Kuratomi c0a8cd950b Fix problems with non-ascii values passed as part of the command to connection plugins
@drybjed discovered this with non-ascii environment variables and
command line arguments to script and raw module.
9 years ago
James Cammarata 08b580decc Parallelize make command for integration test runner
Also adds a new var, used by the prepare_tests role, to prevent it from
deleting the temp test directory at the start of each play to avoid any
potential race conditions
9 years ago
Brian Coca 2281c455db Merge pull request #13616 from resmo/for-ansible-stable-2.0
[stable-2.0] cloudstack: test_cs_instance: more integration tests
9 years ago
James Cammarata 54455a06e5 Disable docker test for Fedora, due to broken packaging 9 years ago
Rene Moser b85b92ecdd cloudstack: test_cs_instance: more integration tests
cloudstack: extend test_cs_instance addressing recovering

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

This reverts commit 9abef1a1d7.
9 years ago
Toshio Kuratomi b90506341a Fixes for tests that assumed yum as package manager for systems that
have dnf
9 years ago
Toshio Kuratomi 9abef1a1d7 Troubleshooting has reduced us to this 9 years ago
Toshio Kuratomi 1cc83dd0d9 Make tests that use kennethreitz retry. 9 years ago
James Cammarata 12c0bb9414 Use --source instead of -e for awk in integration Makefile 9 years ago
Toshio Kuratomi c5eda277ac Fix get_url tests in light of distros backporting SNI support 9 years ago
Toshio Kuratomi 8c6f56f982 kennetreitz.org times out but www.kennethreitz.org is fine 9 years ago
Toshio Kuratomi ce1febe28b debug line needs var not msg 9 years ago
Brian Coca 8db4415e2e changed test to use filter for accurate reporting 9 years ago
James Cammarata 857456ea5f Fixing template integration test for python 2.6 versions
No longer immediately fallback to to_json if simplejson is not installed
9 years ago
Toshio Kuratomi fffd29d1ab Update mysql setup to handle installing mysql with dnf too. 9 years ago
Toshio Kuratomi 1116bc6ca6 Merge pull request #13191 from Jmainguy/mysql
Add shared connection code for mysql modules
9 years ago
Jonathan Mainguy 34e88e48a5 Add shared connection code for mysql modules 9 years ago
Toshio Kuratomi 375eb501b3 Update url to site that has an invalid certificate 9 years ago
Matt Clay 9942d71d34 Test for filename option in apt_repository module. 9 years ago
Toshio Kuratomi 457f86f61a Minor: Correct type pyhton => python 9 years ago
Toshio Kuratomi fc19ad21ef Merge pull request #13494 from Jmainguy/msyql_hash_tests
add tests for encrypted hash mysql_user
9 years ago
Jonathan Mainguy 49dc9eea16 add tests for encrypted hash mysql_user 9 years ago
James Cammarata 97554fc222 Fixing filter test for extract to use proper group 9 years ago
James Cammarata c402325085 Fixing up docker integration tests a bit 9 years ago
= ea72fd6547 adding integration tests for win_regmerge module (extras) 9 years ago
Brian Coca 7d073bdd17 Merge pull request #13345 from amenonsen/extract
Add an 'extract' filter
9 years ago
Toshio Kuratomi ac54ac618c Something's strange... let's see if python2.6 is really the same now... 9 years ago
Toshio Kuratomi eb7db067f9 Fix template test results on python2.6 9 years ago
Abhijit Menon-Sen 8cf1815867 Add an 'extract' filter
At its most basic, this is nothing more than an array or hash lookup,
but when used in conjunction with map, it is very useful. For example,
while constructing an "ssh-keyscan …" command to update known_hosts on
all hosts in a group, one can get a list of IP addresses with:

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

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

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

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

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

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

Thankfully there was a syntax error in the previous
version, so no database would have been dropped.
There was no check for whether it succeeded or not.
9 years ago
Robin Roth 6cefdfe148 add test for changing git remote url
integration test for https://github.com/ansible/ansible-modules-core/pull/721
clone a repo from one url
clone an updated version of that repo from a new url
make sure the remote url and the working copy are updated
9 years ago
Brian Coca 5d645f3a8b Merge pull request #13127 from willthames/test_become
Elevate privileges when checking for file existence
9 years ago
Brian Coca 206cc50bd9 breaks testing in non virtual envs, since env var can be used in those
cases removing it from here
9 years ago
Will Thames 5bb759e7ab Elevate privileges when checking for file existence
Certain OSs default to home directories as 0700
Without elevating privileges, checking for file existence
fails.
9 years ago
James Cammarata 23ff08ee6b Merge pull request #13016 from dvarrazzo/pip-vcs-changed
Added tests to verify pip installation with VCS urls
9 years ago
Will Thames 91b6004149 Allow blank lines and comments/spaces in galaxy spec files
Fixes #10641 again. (Regression)
Added test to discourage future such regression.
9 years ago
Daniele Varrazzo 542a430e84 Added tests to verify pip installation with VCS urls
The test reproduces:
- bug ansible/ansible#1705
- bug ansible/ansible-modules-core#1645
9 years ago
Brian Coca c267e1906e removed invocation from tests as it is only available on very very verbose mode 9 years ago
Chris Meyers 4b88cce6a1 update ansible_test_service checksum 9 years ago
James Cammarata 1910f23144 Merge pull request #12801 from chrismeyersfsu/fix-test_destructive_init
run correct init system tests
9 years ago
James Cammarata 9b22004540 Merge pull request #12795 from chrismeyersfsu/fix-test_destructive_mysql_user
remove module param quotes
9 years ago
Toshio Kuratomi ce2b18174e Merge pull request #12878 from ansible/invocation-fix
Invocation fix
9 years ago
Toshio Kuratomi 2e87c1f74e Two fixes to action plugins
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
  module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
  value from the base class run() method into account so that invocation
  makes its way to the output.

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

This reverts commit 6ce6b20268.

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

Revert "keyword not in ubuntu 14.04"

This reverts commit 5c01622457.

Revert "remove invocation keyword check"

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

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

Fixes #11486. Also addresses the problem alluded to in #10620.
9 years ago
Chris Meyers 6c265cde49 invoke systemd test for ubuntu >= 15.04 else invoke upstart test 9 years ago
Chris Meyers f864fa8727 run systemd tests for fedora 9 years ago
Brian Coca c1a404e6ec Merge pull request #12799 from resmo/for-ansible
cloudstack: add tests for cs_loadbalancer_rule and _member
9 years ago
James Cammarata 2346a7f170 Merge pull request #12800 from chrismeyersfsu/fix-test_destructive_yum
remove invocation keyword check
9 years ago
James Cammarata 549bdb2503 Merge pull request #12804 from chrismeyersfsu/fix-test_non_destructive_makefile
allow env variable override of creds file
9 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.
9 years ago
James Cammarata 8baea3cba8 Merge pull request #12796 from chrismeyersfsu/fix-test_destructive_mysql_variables
fix up mysql variable assertion logic
9 years ago
Chris Meyers d6dfd9f502 run correct init system tests 9 years ago
Chris Meyers 5177cb3f74 remove invocation keyword check 9 years ago
Rene Moser bb5dcc00b6 cloudstack: add tests for cs_loadbalancer_rule and _member 9 years ago
James Cammarata 450c8d45c6 Merge pull request #12787 from chrismeyersfsu/fix-test_destructive_apt
keyword not in ubuntu 14.04
9 years ago
Chris Meyers 75833c248e fix up mysql variable assertion logic 9 years ago
Chris Meyers ce4e98a6d0 remove module param quotes 9 years ago
Toshio Kuratomi eebd3cc336 Merge pull request #12788 from chrismeyersfsu/fix-test_destructive_state
remove non-existant state var
9 years ago
Chris Meyers a0264983ad remove non-existant state var 9 years ago
Chris Meyers 5c01622457 keyword not in ubuntu 14.04 9 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
9 years ago
= e141101314 integration tests for ansible modules core 2147 9 years ago
James Cammarata 9c9897805f More ansible-galaxy fixes for the old spec file format 9 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
9 years ago
Brian Coca 5680a9fa32 removed redundant tests, adjusted makefile expected count 9 years ago