Commit Graph

7315 Commits

Author SHA1 Message Date
Nicole Thomas
4803fef51a
Merge pull request #44648 from isbm/isbm-bsc1068446-develop
DoubleBugfix: a) errors in external pillar causes crash, b) highstate crashes on certain SLS scenarios
2018-01-17 10:58:34 -05:00
Bo Maryniuk
29b67b3b18 Refactor unit tests so they call class-based decorator 2018-01-17 14:13:25 +01:00
rallytime
9e7aeb5e02
Change "to_str" to "to_bytes": needed when opening a file in bytes mode
References: https://github.com/saltstack/salt/pull/45357
2018-01-16 10:41:46 -05:00
Bo Maryniuk
d0c54f43cc Git rebase spaghetti fix 2018-01-15 15:36:06 +01:00
Bo Maryniuk
5ca5046822 Refactor and rename tests while function has been renamed 2018-01-15 15:34:46 +01:00
Bo Maryniuk
6802593a5a Lintfix: E8302 2018-01-15 15:34:13 +01:00
Bo Maryniuk
1133e0c35d Lintfix: W0611 2018-01-15 15:34:13 +01:00
Bo Maryniuk
b3c3b8c679 Lintfix: E0102 2018-01-15 15:34:13 +01:00
Bo Maryniuk
a228ed5ddf Add unit test to unify result converted to false 2018-01-15 15:34:13 +01:00
Bo Maryniuk
48b9a70901 Fix unit test docstring 2018-01-15 15:33:49 +01:00
Bo Maryniuk
8de1301e2d Add unit test for result is converted to a True boolean type 2018-01-15 15:33:49 +01:00
Bo Maryniuk
4e9a5b8033 Fix docstrings 2018-01-15 15:33:21 +01:00
Bo Maryniuk
d9b4ac2d6d Test only comment section conversion 2018-01-15 15:33:21 +01:00
Bo Maryniuk
ac63d35703 Remove leftovers of the old unit test 2018-01-15 15:24:46 +01:00
Bo Maryniuk
e09c21bb8d Add unit test to unify an output data from the state 2018-01-15 15:24:46 +01:00
Bo Maryniuk
a976d1445e Add unit test to ensude there is "name", "result" and "comment" in the state output. 2018-01-15 15:24:20 +01:00
Bo Maryniuk
a9ba5a3fe3 Add unit test checking the entire return is of a dictionary type 2018-01-15 15:23:44 +01:00
Bo Maryniuk
014167c640 Add unit test for checking policy so the "changes" keyword contains a dictionary type 2018-01-15 15:23:08 +01:00
Bo Maryniuk
5902633b3f Remove obsolete unit test code 2018-01-15 15:21:19 +01:00
Bo Maryniuk
fa96d8c528 Use PyTest in tests 2018-01-15 15:20:51 +01:00
Bo Maryniuk
0949c39271 Add unit test for _get_pillar_errors when external pillar has errors and internal is clean 2018-01-15 15:20:50 +01:00
Bo Maryniuk
6ed4262589 Add unit test for _get_pillar_errors when external and internal pillars are clean 2018-01-15 15:20:50 +01:00
Nicole Thomas
53b25752a4
Merge branch 'oxygen' into py3-cache-cli 2018-01-14 16:35:59 -05:00
Nicole Thomas
c00fddd5bb
Merge pull request #45357 from twangboy/win_fix_test_file
Fix `unit.modules.test_file` for Windows
2018-01-14 08:14:24 -05:00
Nicole Thomas
e8e82f2f7f
Merge pull request #45429 from terminalmage/py3-salt.utils-r-s
[PY3] Add unicode_literals to salt.utils modules (R-S)
2018-01-14 08:06:51 -05:00
Nicole Thomas
80f6815c11
Merge pull request #45439 from terminalmage/py3-salt.utils-w-z
[PY3] Add unicode_literals to salt.utils modules (W-Z)
2018-01-14 08:02:22 -05:00
Nicole Thomas
78ce60e4d4
Merge pull request #44977 from terminalmage/remove-more-explicit-unicode-literals
Remove more unnecessary explicit unicode literals
2018-01-14 07:55:29 -05:00
Nicole Thomas
b90e7aedde
Merge pull request #45440 from terminalmage/py3-a
[PY3] Add unicode_literals to states/modules (A)
2018-01-14 07:52:02 -05:00
Nicole Thomas
4d03162227
Merge pull request #45396 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-14 07:44:37 -05:00
Erik Johnson
ce6fccde9c
[PY3] Add unicode_literals to states/modules (A) 2018-01-14 01:31:52 -06:00
Erik Johnson
54f9785e6c
[PY3] Add unicode_literals to salt.utils modules (R-S) 2018-01-13 21:14:09 -06:00
Erik Johnson
b89efc16eb
Remove more unnecessary explicit unicode literals 2018-01-13 21:10:04 -06:00
Erik Johnson
685bfbbd3e
[PY3] Add unicode_literals to cache and cli modules 2018-01-13 21:08:51 -06:00
Erik Johnson
a9c82c47ea
[PY3] Add unicode_literals to salt.utils modules (W-Z) 2018-01-13 20:52:16 -06:00
Nicole Thomas
dcac4d4ce9
Merge pull request #45423 from terminalmage/py3-salt.utils-a-d
[PY3] Add unicode_literals to salt.utils modules (A-D)
2018-01-13 20:33:28 -05:00
Erik Johnson
1044b627a1
[PY3] Add unicode_literals to salt.utils modules (A-D) 2018-01-13 16:08:56 -06:00
Erik Johnson
c57b5a5502
Fix breakage in salt.utils.iam
This fixes breakage introduced in
https://github.com/saltstack/salt/pull/45406 and adds a unit test.
2018-01-13 15:04:18 -06:00
twangboy
e137775c1f
Fix race condition in Windows with the creation time 2018-01-12 16:22:35 -07:00
Nicole Thomas
0c58cb77ac
Merge pull request #45406 from garethgreenaway/oxygen_updating_utils_for_unicode_round_two
[oxygen] Oxygen updating utils and related tests for Unicode round two
2018-01-12 14:07:47 -05:00
Nicole Thomas
1755af821d
Merge pull request #44866 from DSRCorporation/slots3
Slots: use execution function return as a state arg value
2018-01-12 13:58:16 -05:00
Gareth J. Greenaway
0e44911d77
Updating various tests for Unicode goodness 2018-01-12 08:42:39 -08:00
Nicole Thomas
04b8e1cafc
Merge pull request #45401 from gtmanfred/oxygen
fix boto import failures
2018-01-12 10:55:48 -05:00
Nicole Thomas
7fa3df48ac
Merge pull request #45404 from twangboy/win_fix_test_vagrant
Fix `unit.modules.test_vagrant` for Windows
2018-01-12 09:53:12 -05:00
Daniel Wallace
c378c356eb
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-11 17:42:59 -07:00
twangboy
df64c60530
Remove hard-coded, linux-style paths 2018-01-11 23:24:46 +00:00
Erik Johnson
6fbe368b71
Fall back to utf-8 on windows when to_str/to_unicode/to_bytes fail to encode/decode 2018-01-11 16:49:03 -06:00
Daniel Wallace
fdcf71a10c
fix test boto imports
Test boto imports are failing for some reason
2018-01-11 15:14:25 -07:00
rallytime
60370f5fb6
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/config/__init__.py
  - salt/daemons/masterapi.py
  - salt/proxy/dummy.py
  - salt/states/file.py
  - tests/integration/modules/test_state.py
  - tests/integration/runners/test_runner_returns.py
  - tests/integration/ssh/test_state.py
  - tests/support/parser/__init__.py
  - tests/unit/grains/test_core.py
  - tests/unit/states/test_file.py
2018-01-11 16:00:08 -05:00
Erik Johnson
5473c085d9
Fix loader error in 2017.7 tests 2018-01-11 08:40:27 -06:00
Nicole Thomas
223470519d
Merge pull request #44830 from terminalmage/issue40776
Implement variable fileserver update intervals
2018-01-11 09:10:36 -05:00
Dmitry Kuzmenko
f40cb3f2f1
Slots: bugfixes and tests. 2018-01-11 14:05:58 +03:00
Nicole Thomas
a37f7d7cd4
Merge pull request #45377 from terminalmage/py3-log-grains
[PY3] add unicode_literals to log/grains modules
2018-01-10 15:14:23 -05:00
Erik Johnson
f900715e1c
[PY3] add unicode_literals to log/grains modules 2018-01-10 11:37:59 -06:00
Nicole Thomas
54dc7b76e5
Merge pull request #45340 from twangboy/win_fix_test_beacons
Fix `unit.modules.test_beacons` for Windows
2018-01-10 12:10:52 -05:00
Erik Johnson
de7eea42fb
Add test for modified virtualnames in salt.config 2018-01-09 19:11:17 -06:00
Erik Johnson
2d6760ee40
Add update_interval to gitfs, "fs" to several virtual names
This also adds "fs" to all of the fileserver virtualnames which did not
already have them. This both A) normalizes the usage of the non-roots
backends, and B) makes it easier for the FileserverUpdate process to get
the default update interval for each backend from the opts.
2018-01-09 19:11:17 -06:00
twangboy
5d45a4478f
Fix unit.modules.test_file for Windows
Fixes `_regex_to_static` function for Windows. Regex returns the `\r`
portion of the Windows line ending as part of the regex search. We're
going to trim that off the end.

Skips `test_check_file_meta_no_lsattr` as there is this is Linux
specific

Opens files in binary mode on Windows in the tests

Changes to the appropriate assert calls

Fixes line ending issues in the file_content and file_modified variables
in the test
2018-01-09 15:17:25 -07:00
Nicole Thomas
12c0f99e8c
Merge pull request #45293 from terminalmage/py3-acl-auth-netapi
[PY3] Add unicode_literals to acl, auth, and netapi modules
2018-01-09 16:32:59 -05:00
Nicole Thomas
56de7bcf5d
Merge pull request #45305 from terminalmage/py3-daemons
[PY3] Add unicode_literals to daemons modules
2018-01-09 16:30:36 -05:00
Nicole Thomas
4919b9f27d
Merge pull request #45335 from twangboy/win_fix_test_load_beacon
Skip test_load_match on Windows
2018-01-09 15:54:11 -05:00
Nicole Thomas
e402807cc0
Merge pull request #45332 from frogunder/fix_mac_archive_tests
fix test_archive tests for mac
2018-01-09 15:49:12 -05:00
Nicole Thomas
bf38bdca6c
Merge pull request #45280 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-09 15:37:52 -05:00
Nicole Thomas
227cdbda70
Merge pull request #45337 from twangboy/win_fix_test_core
Fix `unit.grains.test_core` for Windows
2018-01-09 10:03:11 -05:00
twangboy
fe2d4ae65b
Fix paths on Windows 2018-01-08 17:20:02 -07:00
twangboy
48f12a3bbc
Skip linux specific tests 2018-01-08 15:38:26 -07:00
twangboy
df0958e699
Fix decorator, fix asserts for Windows 2018-01-08 14:53:18 -07:00
twangboy
b49b52e113
Skip test_load_match on Windows 2018-01-08 14:31:46 -07:00
Nicole Thomas
981776b9ac
Merge pull request #45322 from Ch3LL/isci_test_mac
Skip iscsi grains test if MacOSX
2018-01-08 16:28:13 -05:00
Nicole Thomas
d0e5e70277
Merge pull request #45295 from gtmanfred/test_directory
test directory that doesn't exist
2018-01-08 15:59:52 -05:00
Frode Gundersen
9edca8a6cf
fix test_archive tests for mac 2018-01-08 20:18:52 +00:00
Nicole Thomas
eea7158e82
Merge pull request #45279 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-08 12:26:48 -05:00
Nicole Thomas
154c9255f5
Merge pull request #45316 from terminalmage/py3-engines
[PY3] Add unicode_literals to engines
2018-01-08 12:08:57 -05:00
Ch3LL
0919d8787b
Skip iscsi grains test if MacOSX 2018-01-08 10:54:45 -05:00
Erik Johnson
7c9d95a725
[PY3] Add unicode_literals to config, executors 2018-01-07 14:48:45 -06:00
Erik Johnson
0d975c335d
Add unicode_literals to engines 2018-01-07 14:01:48 -06:00
Nicole Thomas
e6178fe6d4
Merge branch '2017.7' into test_directory 2018-01-05 17:08:58 -05:00
Erik Johnson
5b91c78cb6
[PY3] Add unicode_literals to daemons modules 2018-01-05 15:34:48 -06:00
Daniel Wallace
24114e91c1
test was different slightly on 2017.7 2018-01-05 12:25:09 -07:00
Nicole Thomas
239ab765d9
Merge pull request #45271 from terminalmage/py3-cloud
[PY3] Add unicode_literals to salt-cloud modules
2018-01-05 12:38:01 -05:00
Daniel Wallace
d20fc93625
test directory that doesn't exist
sometimes /etc/grub.conf exists and is a symlink to /boot/grub/grub.conf, and
this won't do the right thing.
2018-01-05 09:51:58 -07:00
Erik Johnson
49dd5b32e9
[PY3] Add unicode_literals to acl, auth, and netapi modules 2018-01-05 10:31:11 -06:00
rallytime
59076f5ee8
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/client/ssh/wrapper/state.py
  - salt/modules/yumpkg.py
2018-01-04 17:45:29 -05:00
rallytime
8025b14584
Merge branch '2016.11' into '2017.7'
Conflicts:
  - tests/unit/utils/test_parsers.py
2018-01-04 17:37:48 -05:00
Steve Weber
942c14bb29
pillar body overrides includes
vars in pillar body override pillar includes
2018-01-04 17:33:39 -05:00
Erik Johnson
d3f8c13414
[PY3] Add unicode_literals to salt-cloud modules 2018-01-04 13:39:59 -06:00
Erik Johnson
1dc6e79638
[PY3] Add unicode_literals to ext_pillar modules 2018-01-04 08:46:40 -06:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
rallytime
68f971b38f
Apply test fixes from #45034 to parsers_test.py 2018-01-03 15:10:04 -05:00
Nicole Thomas
4ae309af6a
Merge pull request #45222 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-02 14:33:07 -05:00
Nicole Thomas
4f514a29a7
Merge branch '2017.7' into pkg-uptodate 2018-01-02 09:56:28 -05:00
Nicole Thomas
cc13a54e21
Merge pull request #45219 from gtmanfred/test_directory
test directory that doesn't exist
2017-12-30 13:11:33 -05:00
rallytime
da1e33abea
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - pkg/windows/req_base.txt
  - salt/engines/slack.py
  - salt/modules/cmdmod.py
  - salt/modules/osquery.py
  - salt/modules/pip.py
  - salt/modules/win_pkg.py
  - salt/states/pip_state.py
  - tests/integration/modules/test_cmdmod.py
2017-12-30 08:44:11 -05:00
Nicole Thomas
abed378981
Merge pull request #45204 from garethgreenaway/45176_fixes_to_osquery_module
[2017.7] Fixes to osquery module & addition of unit tests
2017-12-30 08:25:37 -05:00
Nicole Thomas
4637a3b43c
Merge pull request #45211 from terminalmage/py3-transport
[PY3] Add unicode_literals to transports
2017-12-30 07:40:51 -05:00
Daniel Wallace
fd6597a2b4
test directory that doesn't exist
sometimes /etc/grub.conf exists and is a symlink to /boot/grub/grub.conf, and
this won't do the right thing.
2017-12-29 10:19:24 -07:00
Adam Mendlik
29ef67bac2
Test pkg.uptodate with failed upgrades 2017-12-29 07:18:50 -07:00
Adam Mendlik
7c67ec39d9
Add tests for pkg.uptodate state 2017-12-29 07:18:49 -07:00
Gareth J. Greenaway
d834bd1b6f
Fixing some minor lint issues. 2017-12-28 17:07:38 -08:00
Gareth J. Greenaway
4738205154
Fixing a bug when attributes are passed to various osquery module functions. 2017-12-28 17:07:38 -08:00
Erik Johnson
3f85b60077
[PY3] Add unicode_literals to transports 2017-12-28 17:10:42 -06:00