Commit graph

128 commits

Author SHA1 Message Date
René Moser
aaf4f04574 automated integration tests for cloudstack (#20552) 2017-05-09 11:32:11 +08:00
Adrian Likins
8830cde28d Fix 'task name is not templated in retry callback' (add task_name property to TaskResult) (#21214)
Fix 'task name is not templated in retry callback'

Add a task_name property to TaskResult that knows to
check in TaskResult._task_fields.

Add integration test for v2_retry_runner callback

Fixes #18236
2017-02-24 12:33:24 -05:00
Matt Martz
537b3b75a6 Add jinja2 groupby filter override to cast namedtuple to tuple. Fixes #20098 (#20362)
* Add jinja2 groupby filter override to cast namedtuple to tuple. Fixes #20098

* Address some of the requested changes

* Quoting

* Print the python path and version

* Be less explicitly verbose, rely on implicit verbosity
2017-01-19 11:39:59 -08:00
gaudenz
08e08ac775 new module cloudscale_server (#20175) 2017-01-17 23:15:20 +01:00
Matt Clay
324702c38f Use output_dir instead of outputdir for tests. 2016-11-21 16:46:59 -08:00
Matt Clay
c955688772 Move ansible ad-hoc tests to integration targets. 2016-11-10 23:58:32 -08:00
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.
2016-10-17 20:32:50 -07:00
Matt Clay
c2ec86cb78 Migrate Windows CI roles to test targets. (#18005) 2016-10-13 18:03:19 +01:00
Matt Clay
75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 2016-10-13 09:09:25 -07:00
Matt Clay
374e4348e4 Split out var_blending test into targets dir. (#17996) 2016-10-12 22:22:46 -07:00
Matt Clay
80a5c70ad7 Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
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
2016-10-06 10:46:58 -04:00
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
2016-09-21 17:25:54 -07:00
René Moser
6a3e948a7c jenkins_job: add integration tests (#17499) 2016-09-13 16:03:58 +02:00
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.
2016-09-02 23:14:44 -07:00
René Moser
26118a51f8 exo_dns: new module utils and integration tests for exoscale DNS (#17230) 2016-08-30 21:48:28 +02:00
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
2016-08-23 20:03:11 -04:00
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.
2016-08-10 12:49:19 -05:00
Matt Clay
80385a47bd Remove FreeBSD interpreter test hacks. (#17007)
* Add TEST_FLAGS to no_log target.
2016-08-08 13:10:03 -07:00
Matt Clay
5f12731797 Run more integration tests on FreeBSD. (#16923) 2016-08-02 14:00:56 -07:00
Matt Clay
ff4f4bc8a0 Add binary module tests to Windows CI. (#16914) 2016-08-02 10:42:07 -07:00
Matt Clay
e2602e9be0 Add FreeBSD to Shippable CI. (#16883) 2016-08-01 13:46:37 -07:00
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.
2016-07-31 08:48:32 -07:00
Matt Clay
380ed053e8 Add Windows integration tests to Shippable. (#16803)
Enable Windows integration tests on Shippable.
2016-07-28 21:03:14 -07:00
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
2016-07-25 14:07:15 -07:00
Matt Martz
4065acc37d indent callback output if using 3verbosity or higher (#16231) 2016-07-23 18:10:53 -04:00
Matt Clay
4e369a31db Fix test_async. (#16552)
* Conditionally run test_async in docker containers.
* Revise test_async test.
2016-07-01 17:59:06 -07:00
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
2016-07-01 14:52:45 -07:00
Matt Clay
6e1e86028f Split integration tests into multiple groups.
This will allow tests to complete much faster.
2016-06-04 12:02:11 -07:00
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.
2016-05-31 14:35:24 -07:00
Matt Martz
651b83d8be Run test_binary_modules 2016-05-12 12:53:44 -05:00
Matt Martz
6ad8ec0919 Add integration tests for binary modules 2016-05-12 12:25:09 -05:00
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
2016-04-14 14:12:48 -04:00
Matt Clay
af8258cdf2 Revert "Increase verbosity of connection tests." (#15305) 2016-04-14 11:06:46 -04:00
Toshio Kuratomi
4b0f65a3e5 Merge pull request #15207 from mattclay/verbose-test
Increase verbosity of connection tests.
2016-03-31 22:02:19 -07:00
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.
2016-03-31 08:32:41 -07:00
Matt Clay
a0361626c9 Increase verbosity of connection tests. 2016-03-30 06:57:53 -07:00
Michael Gruener
94806e1953 Add integration tests for the cloudflare_dns module 2016-03-25 21:22:29 +01:00
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.
2016-03-23 21:21:52 -07:00
Toshio Kuratomi
c3548677de Add TEST_FLAGS to test_hash 2016-03-22 13:19:29 -07:00
nitzmahone
b95286c88e re-integrate test_test_infra output checking
added secondary run with overridden inventory/test args per bcoca request
2016-03-18 10:14:22 -07:00
nitzmahone
6578e63e63 improve test_test_infra debug messaging, rc check 2016-03-18 08:51:43 -07:00
Toshio Kuratomi
512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 2016-03-14 14:53:29 -07:00
Brian Coca
923548f6d5 removed test_infra from setup as it fails when using --tags 2016-03-10 00:29:32 -05:00
nitzmahone
6c835b2600 ensure assert and fail work before we test anything else 2016-03-09 17:36:39 -08:00
Matt Davis
22344c5320 Merge pull request #14812 from mattclay/test-connection
Add tests for connection plugins.
2016-03-08 04:17:30 +00:00
Matt Martz
8aee648bc9 Add as dependency of the parsing make target 2016-03-07 17:38:47 -06:00
Matt Clay
49892b287b Use vars to eliminate redundant test commands. 2016-03-04 18:14:52 -08:00
Matt Clay
ca62bc5db3 Add tests for connection plugins. 2016-03-04 13:16:31 -08:00
James Cammarata
80b10bd669 Moving creating of testing work dir out of dep role and into Makefile 2016-03-03 15:26:08 -05:00