Commit Graph

76 Commits

Author SHA1 Message Date
rallytime
30f14d15df Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/config/__init__.py
  - salt/engines/slack.py
2017-01-04 16:54:58 -05:00
Jonathan Ballet
2e7f743371 yaml: support unicode serialization/deserialization
Fix: #30454
2017-01-04 13:29:28 +01:00
Jonathan Ballet
df76113c5c jinja: test the "yaml" filter with ordered dicts 2017-01-04 13:29:28 +01:00
rallytime
112903ad7e Merge branch '2016.3' into 'carbon'
Conflicts:
  - conf/master
  - doc/ref/configuration/master.rst
  - salt/cli/daemons.py
  - salt/client/ssh/__init__.py
  - salt/config/__init__.py
  - salt/modules/archive.py
  - salt/modules/cmdmod.py
  - tests/unit/states/service_test.py
2016-09-29 09:56:43 -06:00
Jonathan Ballet
79fdc12395 jinja: fix YAML terminator removal in Jinja's "yaml" filter 2016-09-27 18:52:49 +02:00
rallytime
1fe0b69a6c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/blockdev.py
  - salt/modules/ddns.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/linux_sysctl.py
  - salt/modules/status.py
  - salt/modules/x509.py
  - salt/utils/process.py
  - salt/utils/verify.py
  - tests/integration/__init__.py
  - tests/integration/modules/state.py
  - tests/integration/states/cmd.py
2016-08-12 16:21:58 -06:00
Erik Johnson
a375dd7e1f Clean up open filehandles (#35359)
* salt/crypt.py: clean up open filehandles

* salt/fileclient.py: clean up open filehandles

* salt/grains/core.py: clean up open filehandles

* salt/modules/cp.py: clean up open filehandles

* salt/modules/data.py: clean up open filehandles

* salt/modules/dnsutil.py: clean up open filehandles

* salt/modules/dockerng.py: clean up open filehandles

* salt/modules/inspectlib/collector.py: clean up open filehandles

* salt/modules/file.py: clean up open filehandles

* salt/modules/hosts.py: clean up open filehandles

* salt/modules/incron.py: clean up open filehandles

* salt/modules/dpkg.py: clean up open filehandles

* salt/modules/linux_sysctl.py: clean up open filehandles

* salt/modules/netbsd_sysctl.py: clean up open filehandles

* salt/modules/network.py: clean up open filehandles

* salt/modules/nftables.py: clean up open filehandles

* salt/modules/openbsd_sysctl.py: clean up open filehandles

* salt/modules/rh_ip.py: clean up open filehandles

* salt/modules/portage_config.py: clean up open filehandles

* salt/modules/status.py: clean up open filehandles

* salt/modules/tls.py: clean up open filehandles

* salt/modules/xapi.py: clean up open filehandles

* salt/modules/x509.py: clean up open filehandles

* salt/modules/virt.py: clean up open filehandles

* salt/modules/zcbuildout.py: clean up open filehandles

* salt/returners/local_cache.py: clean up open filehandles

* salt/utils/cloud.py: clean up open filehandles

* salt/states/pkgrepo.py: clean up open filehandles

* salt/states/x509.py: clean up open filehandles

* salt/transport/mixins/auth.py: clean up open filehandles

* salt/utils/__init__.py: clean up open filehandles

* salt/states/pkg.py: clean up open filehandles

* salt/utils/minion.py: clean up open filehandles

* salt/utils/openstack/nova.py: clean up open filehandles

* salt/utils/openstack/swift.py: clean up open filehandles

* salt/utils/process.py: clean up open filehandles

* salt/utils/templates.py: clean up open filehandles

* salt/utils/virt.py: clean up open filehandles

* tests/integration/__init__.py: clean up open filehandles

* tests/integration/cli/grains.py: clean up open filehandles

* tests/integration/client/standard.py: clean up open filehandles

* tests/integration/modules/hosts.py: clean up open filehandles

* tests/unit/utils/vt_test.py: clean up open filehandles

* tests/integration/shell/enabled.py: clean up open filehandles

* tests/integration/states/cmd.py: clean up open filehandles

* tests/integration/states/file.py: clean up open filehandles

* tests/integration/states/match.py: clean up open filehandles

* tests/unit/config_test.py: clean up open filehandles

* tests/unit/templates/jinja_test.py: clean up open filehandles

* tests/unit/utils/find_test.py: clean up open filehandles

* tests/integration/modules/state.py: clean up open filehandles

* Update dnsutil_test to reflect changes in fopen usage
2016-08-11 10:45:24 -06:00
rallytime
c7c9e3b64b PY3: Fixup jinja template unit tests 2016-08-03 12:45:29 -06:00
Mike Place
b3b1536afd Derp 2015-06-10 15:50:53 -06:00
Mike Place
7e153bc6a9 Fix unit test warnings 2015-06-10 15:37:01 -06:00
Michael Steed
f9cf15ad46 fix new failures on ubuntu 14.04 2015-06-09 14:18:04 -06:00
Michael Steed
8669dacaf1 likewise in test_render_with_utf8_syntax_error() 2015-06-09 11:48:13 -06:00
Michael Steed
4b34b60623 set encoding in test_render_with_unicode_syntax_error() 2015-06-09 11:43:23 -06:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
Erik Johnson
59e7481e2b Fix TestSaltCacheLoader tests
Similar fixes as made for TestGetTemplate
2015-01-26 16:04:21 -06:00
Erik Johnson
d34c0c7787 Fix jinja tests
With recent edits to the jinja templating system, file_roots and
pillar_roots are referenced, so they need to be in the mocked opts dict.
2015-01-26 13:10:05 -06:00
Erik Johnson
c1fd180c45 Fix jinja tests
These tests were using the now-outdated method of looking in the
file_roots for cached templates in masterless mode.
2014-12-10 18:41:32 -06:00
Pedro Algarvio
aaf0f4aba0 Fix imports 2014-11-26 21:08:13 +00:00
Thomas S Hatch
e2d640962a Fix Jinja test 2014-09-23 14:02:34 -06:00
Thomas S Hatch
7355f53057 Add fileserver_backend to jinja tests local opts 2014-09-22 10:29:25 -06:00
Seth House
0d8cc41c61 Added tests for calling functions via Jinja with dot-lookup syntax
Yay!
2014-07-25 12:27:45 -06:00
Khris Richardson
1acd82f3f1 add sphinx spelling extension. enforce en_us 2014-07-13 13:43:33 -05:00
Erik Johnson
0104ccc400 Fix failing jinja unit tests
These began failing due to a recent change in the error reporting for
undefined jinja variables.
2014-06-12 14:33:53 -05:00
Seth House
c94cd38c65 Added unit test for the import_text tag 2014-03-06 17:30:47 -08:00
Pedro Algarvio
7a42bf24fc Jinja's sequence filter does not need to be an extension. 2014-02-15 17:26:35 +00:00
Xavier Barbosa
d7eb1d2f9d fix jinja SequenceExtension 2014-02-13 08:59:29 +01:00
Thomas S Hatch
a7baf5936c Revert "add sequence filter for jinja"
This reverts commit cbe04b8231.
2014-02-11 15:59:22 -07:00
Xavier Barbosa
cbe04b8231 add sequence filter for jinja 2014-02-11 20:42:40 +01:00
Pedro Algarvio
ec75329a88 Ignore and remove unused imports 2014-02-08 08:01:12 +00:00
Mathieu Le Marec - Pasquet
9a9eada12f Better trace for nested jinja errors 2014-01-03 18:16:11 +01:00
Thomas S Hatch
30c49e32c7 Revert "Better trace for nested jinja errors"
This reverts commit 78899493bb.
2013-12-31 12:22:24 -07:00
Thomas S Hatch
697bffcf1d Revert "division test fix"
This reverts commit 56bcfbb03c.
2013-12-31 12:22:13 -07:00
Mathieu Le Marec - Pasquet
56bcfbb03c division test fix 2013-12-31 14:34:29 +00:00
Mathieu Le Marec - Pasquet
78899493bb Better trace for nested jinja errors 2013-12-31 13:25:57 +00:00
Thomas S Hatch
5eaca79810 Revert "Better trace for nested jinja errors"
This reverts commit 99a2791917.
2013-12-30 11:32:53 -07:00
Mathieu Le Marec - Pasquet
99a2791917 Better trace for nested jinja errors 2013-12-25 18:00:15 +00:00
Pedro Algarvio
2648ed90ba Fix lint issues. 2013-12-09 20:02:25 +00:00
regilero
7d05551062 Manage errors containing utf-8 or unicode charcters at the jinja level 2013-12-05 18:46:43 +01:00
Pedro Algarvio
aa8ead9897 Remove duplicate method 2013-11-27 13:06:59 +00:00
Pedro Algarvio
0ae1a15c61 PEP8 E302 and E303 blank lines fixes. 2013-11-27 12:11:45 +00:00
Pedro Algarvio
d02a2bc224 Include the python encoding file header on tests. 2013-11-27 11:19:24 +00:00
Pedro Algarvio
8ba59ea6c6 Adapt the tests to the latest Jinja2 template changes. 2013-11-14 01:21:57 +00:00
Pedro Algarvio
f4cba0d293 Deprecate env usage in favor of saltenv. 2013-11-12 01:01:50 +00:00
Xavier Barbosa
a5575aca13 deprecated assertEquals 2013-10-25 02:33:17 +02:00
Xavier Barbosa
a218aea003 fix jinja unittest 2013-10-25 02:33:16 +02:00
Xavier Barbosa
1309ef9887 fix jinja rendering of nested structures 2013-10-25 02:33:16 +02:00
Henrik Holmboe
77fd1acb7f Change assertEquals to assertEqual
According to
http://docs.python.org/2/library/unittest.html#deprecated-aliases
assertEquals is a deprecated alias of assertEqual.
2013-10-24 11:39:04 +02:00
Seth House
54cc36566e Added a pprint.pformat Jinja filter to match the file.serialize state 2013-10-16 09:23:14 -06:00
Pedro Algarvio
30e747060d Jinja needs to be "fed" Unicode data. Fixes #7576.
Additionally, what's returned from `render_jinja_tmpl` is also a Unicode string to that the `SLS_ENCODER` can properly encode them. Encoding UTF-8 data as UTF-8 data using the `SLS_ENCODER` does not, of course, work.
2013-10-08 00:11:44 +01:00
Pedro Algarvio
a5a87ca1fc Mimic the test case shown @ http://goo.gl/UI7uS8 2013-10-08 00:11:19 +01:00