Commit Graph

213 Commits (1f4c65ab9a36f46d215636eb75385691d8faccbc)

Author SHA1 Message Date
Toshio Kuratomi c1039de70c Compatibility with six-1.3.0 9 years ago
James Cammarata ac6f61ec7f Properly handle group/host_var files with dots in them
Fixes #12245
9 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.
9 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
9 years ago
Toshio Kuratomi e218bf8da9 Do not escape backslashes when processing a template file.
Fixes #12198
Fixes #12241
9 years ago
James Cammarata b2cb3153f1 Fix unit tests for PlayIterator changes regarding fact gathering 9 years ago
Marius Gedminas a32bf1ec18 Simplify FactCache.copy()
Also fix the bug (missing from six import iteritems) I introduced in
823677b490.
9 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.
9 years ago
Toshio Kuratomi 1b64702b9a Fix templar unittests for change in preserve_trailing_newline parameter's default value 9 years ago
James Cammarata 45aac6a739 Adding unit tests for safe_eval 9 years ago
James Cammarata 843138e7d9 Merge pull request #12202 from mgedmin/py3k
Use rich comparisons for Attribute and FieldAttribute
9 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.
9 years ago
Toshio Kuratomi 417bf1c805 Unittest the _count_trailing_newlines function 9 years ago
Brian Coca a7231c2203 actually implemented flags correctly for all priv escalation methods 9 years ago
Brian Coca 14f061d5ea fixed become tests 9 years ago
Marius Gedminas 33a374edde Use rich comparisons for Attribute and FieldAttribute
Because __cmp__ is not supported on Python 3.
9 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
9 years ago
Toshio Kuratomi 7f5080f64a Fix backslash escaping inside of jinja2 expressions
Fixes #11891
9 years ago
James Cammarata ccaf47bd97 Fix unit tests broken by 057712c1 9 years ago
Marius Gedminas 709dbbc7db Use 0oNNN octal syntax in test/ 9 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.
9 years ago
Abhijit Menon-Sen b84053019a Make the filename the first argument to rekey_file 9 years ago
Abhijit Menon-Sen c4b2540ecc Update tests for VaultEditor API changes 9 years ago
Toshio Kuratomi 56ae3a032f Merge pull request #12075 from ansible/fix-vault-unicode
Unicode and other fixes for vault
9 years ago
Toshio Kuratomi a3fd4817ef Unicode and other fixes for vault 9 years ago
Brian Coca 846f0b0510 changed no_log expected type to new value 9 years ago
Ryan Petrello 1886307845 Fix a parsing bug that prevents IPv6 addresses from being used with `add_host`
Closes #8682
9 years ago
Brian Coca 69f380da3a changed mod_args test to match connection 9 years ago
Brian Coca ab355218a0 fixed test to new parser options 9 years ago
Brian Coca ee21ebaffc Merge pull request #11975 from mutemule/become_doas
Add become support for OpenBSD doas
9 years ago
Damian Gerow 1c5611100e Add become support for OpenBSD doas 9 years ago
Brian Coca 43bf9c86d8 fixed typo 9 years ago
Brian Coca d38bb4152d fixed test to match new exception class used 9 years ago
Brian Coca 2eb5333b50 fixed test to match new become output 9 years ago
Toshio Kuratomi e8452c864e Restore the relative path handling portion of #11865 9 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.
9 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
9 years ago
James Cammarata 9891bcbcae Fix unit tests broken by previous commit 9 years ago
James Cammarata 6b244ed61e update unit tests for role templating changes 9 years ago
James Cammarata 42cfacf83b Switch up the task/host overrides for PlayContext to use the compiled vars dict
Fixes #11436
9 years ago
James Cammarata 8146a193eb Fix strategy base unit tests after 88e1ef8 9 years ago
James Cammarata 993ce592b1 Update unit tests for flush_handlers fix 9 years ago
James Cammarata 66a8864ae9 Fix environment setting and inheritence
Fixes #11401
9 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
9 years ago
James Cammarata fadd8f23f1 Fix broken strategy unit test from earlier change 9 years ago
Pierre-Louis Bonicoli 8c392a94b7 Play.get_name: remove prefix, return name only 9 years ago
James Cammarata 3d77723e3d Cleaning up some stuff related to the connection info/become/executable change 9 years ago
Brian Coca 323362e23a added stdout to test result 9 years ago
James Cammarata 3b913943b2 Updating base strategy unit test regarding bad file loads based on earlier change 9 years ago
James Cammarata 1163e38d39 Fix unit tests for new magic variable addition 'ansible_version' 9 years ago