Gareth J. Greenaway
e846df7409
Fixing a bug when passing pillar values to aliases for the Slack engine. Cleaned up the formatting of the results, color codes don't translate well into Slack output. For any state runs, eg. highstate. apply, sls, we run the output through the highstate formater. For anything else run it though the yaml outputer. Running it though highstate causes errors when the output does match what the highstate output is expecting.
2018-04-19 18:29:48 -07:00
Nicole Thomas
1947ffdf56
Merge pull request #47122 from rallytime/merge-2018.3
...
[2018.3] Merge forward from 2017.7 to 2018.3
2018-04-19 16:44:17 -04:00
Nicole Thomas
291cca7ed8
Merge pull request #47162 from terminalmage/bp-47161
...
Partial backport of #47161 to 2018.3 branch
2018-04-19 15:28:46 -04:00
rallytime
878fa06134
Test fix: remove tornado testing lib from class
...
This use in the test class causing a failure in this branch that doesn't occur
in the 2017.7 branch. This tornado lib is also not necessary for this particular
test class.
This might cause a failure in the windows tests, but I have already spoken
to @dwoz about this and he is going to address this in a separate PR if needed.
2018-04-19 12:04:58 -04:00
Nicole Thomas
2ee8006da3
Merge pull request #47165 from terminalmage/issue47081
...
Make sure a str type is passed to os.walk
2018-04-19 10:59:15 -04:00
Nicole Thomas
6257862bbb
Merge pull request #47070 from terminalmage/with_tempdir
...
Use decorators for temp files/dirs in test suite
2018-04-19 10:01:47 -04:00
Erik Johnson
048728d2b7
Remove unused imports
2018-04-18 19:46:32 -05:00
Erik Johnson
879c557264
Use decorators for temp files/dirs in test suite
...
This adds a new decorator which creates a temporary directory and cleans
it after the test completes. It also modifies an existing decorator for
creating temporary files so that it accepts arguments, which will be
passed through to salt.utils.files.mkstemp().
2018-04-18 19:46:29 -05:00
Erik Johnson
9e29acb477
Make sure a str type is passed to os.walk
...
With strings internally being unicode types in 2018.3.0, we end up
passing a unicode path to os.walk. Python 2 appears to have a bug in the
stdlib in some versions, in which posixpath can't handle unicode types.
This commit ensures that we pass a str type to os.walk in our os.walk
helper.
2018-04-18 15:54:07 -05:00
Nicole Thomas
b46365614b
Merge pull request #47155 from mcalmer/fix-patchinstall
...
Fix patchinstall for yumpkg
2018-04-18 15:24:16 -04:00
Nicole Thomas
13ae1a2413
Merge pull request #47061 from terminalmage/issue47042
...
Fix diffing binary files in file.get_diff
2018-04-18 14:52:09 -04:00
Erik Johnson
d185f97a47
mocked file_roots and pillar_roots should be dicts
2018-04-18 13:20:07 -05:00
Nicole Thomas
cba0f13cd9
Merge pull request #47058 from terminalmage/lsattr
...
Fix calls to file.lsattr when lsattr is not installed
2018-04-18 12:30:11 -04:00
Nicole Thomas
b96ce23b3f
Merge pull request #47104 from terminalmage/issue46929
...
yamlloader: Properly handle colons in inline dicts
2018-04-18 12:22:46 -04:00
Nicole Thomas
c12697b173
Merge pull request #47076 from terminalmage/issue46859
...
pillar_ldap: Load config options as str types
2018-04-18 12:16:22 -04:00
Daniel Wallace
50bd885ec7
Merge pull request #47107 from twangboy/fix_46932
...
Fix issues with reg state, add tests
2018-04-18 10:53:01 -05:00
Michael Calmer
382afba457
fix invalid string compare
2018-04-18 17:37:05 +02:00
Michael Calmer
8c19368938
provide kwargs to pkg_resource.parse_targets required to detect advisory type
2018-04-18 17:19:18 +02:00
Erik Johnson
87f6cefea3
Rewrite flaky utf8 state to make it easier to troubleshoot
2018-04-18 10:14:19 -05:00
Erik Johnson
df6e535f05
Fix diffing binary files in file.get_diff
2018-04-18 10:14:19 -05:00
Nicole Thomas
d6c59696be
Merge pull request #47041 from terminalmage/issue46909
...
Force null bytes to be str types
2018-04-18 10:08:24 -04:00
Nicole Thomas
9a9f6524f8
Merge pull request #47007 from twangboy/fix_46968
...
Fix some issues with the win_servermanager module
2018-04-17 16:57:04 -04:00
Erik Johnson
c06c859caf
pillar_ldap: Load config options as str types
...
Also make the same str type enforcement apply to all calls to _config()
in ldapmod.py.
2018-04-17 15:37:18 -05:00
Erik Johnson
e4182715be
Special check specifically for bytes types
2018-04-17 15:34:17 -05:00
rallytime
a40f007962
lint: get_context is in stringutils.py now
2018-04-17 16:29:48 -04:00
Erik Johnson
eeb067e910
Fix calls to file.lsattr when lsattr is not installed
...
This was partially fixed before 2018.3.0, but some careless programming
since then has caused problems to return. This fixes those by making
`file.lsattr` return `None` when lsattr is not installed, and then fixes
all references to take this into account.
2018-04-17 15:19:15 -05:00
twangboy
ae8ab2ab1a
Fix tests for py3, enable tearDown
2018-04-17 13:59:12 -06:00
rallytime
3416e398c6
Update old utils paths references to use new paths
2018-04-17 11:02:38 -04:00
rallytime
94c2a12be6
Merge branch '2017.7' into '2018.3'
...
Conflicts:
- tests/integration/modules/test_state.py
- tests/unit/templates/test_jinja.py
- tests/unit/test_minion.py
2018-04-17 10:54:42 -04:00
Nicole Thomas
a52137ee36
Merge pull request #47109 from garethgreenaway/46943_slack_engine_fixes
...
[2018.3] fixes to Slack engine
2018-04-17 09:56:26 -04:00
Nicole Thomas
6c16a34c44
Merge pull request #47045 from tankywoo/fix-gentoo-pkg-installed
...
Fix ba7d00f5
for gentoo pkg.installed method
2018-04-17 09:55:44 -04:00
Daniel Wozniak
6a4c0b8a1a
Merge pull request #47108 from dwoz/async_test_fix
...
Fix unit.utils.test_event.TestAsyncEventPublisher.test_event_subscription
2018-04-16 17:25:06 -07:00
Mike Place
ee90dd5d95
Merge branch '2018.3' into issue46909
2018-04-16 16:59:25 -06:00
Mike Place
86c7cfef56
Merge pull request #47053 from clan/jinja-error
...
handle jinja error in <module> level
2018-04-16 16:47:54 -06:00
Gareth J. Greenaway
02baa76595
Fixing a bug that occured when a comment was added to a message sent to Slack by Salt. Also making slack_engine:groups_pillar
optional.
2018-04-16 15:39:20 -07:00
Daniel A. Wozniak
3d85e30ce5
AsyncTestCase is required for AsyncEventPublisher
...
Other tests that use AsyncTestCase's io_loop will break if AsyncTestCase
is not subclassed when a test instantiates AsyncEventPublisher.
2018-04-16 14:18:08 -07:00
twangboy
3cf4ac1475
Add integration tests for reg state
...
Fix issues with binary data found in testing
2018-04-16 14:51:56 -06:00
twangboy
cc259b146f
Cast vdata to appropriate type in reg state
...
Creates a `cast_vdata` function in the reg util
Calls that function from the state to put the data in the appropriate
type
2018-04-16 14:51:56 -06:00
Mike Place
7bfa608e9f
Merge pull request #47062 from rallytime/merge-2018.3
...
[2018.3] Merge forward from 2017.7 to 2018.3
2018-04-16 13:58:31 -06:00
Mike Place
fa27e64a33
Merge pull request #47066 from terminalmage/issue46979
...
Fix regression in handling of environment/saltenv
2018-04-16 13:57:11 -06:00
Mike Place
03892eaf0b
Merge pull request #47068 from cachedout/catch_value_error_socket_test
...
Catch an operation on a closed socket in a test
2018-04-16 13:56:02 -06:00
Erik Johnson
33bf6643cd
Add additional test for plain scalars
2018-04-16 12:17:20 -05:00
Erik Johnson
508659b682
yamlloader: Properly handle colons in inline dicts
...
PyYAML's scanner is not written to handle Python's unicode literal
strings, since they are not part of the YAML spec. With all strings
loaded in the YAML context now being unicode types, this causes errors
when scanning the document to construct the next node. The unicode
string literal is misidentified as a plain scalar and any colons within
it are interpreted as delimiting a mapping node. Since no whitespace appears
after the colon, this causes scanning error.
To fix it, we check for this scanning error and reset the scanner's
position and check if the first char is the "u" prefix. If so, and if
the following char is a quote, then we attempt to scan for a string
literal instead.
2018-04-16 11:29:51 -05:00
Shane Lee
1ea2885ec2
Merge pull request #47065 from dwoz/jinja_test_fix
...
Jinja test fix
2018-04-16 10:16:41 -06:00
Shane Lee
673cd31c65
Merge branch '2017.7' into jinja_test_fix
2018-04-16 10:15:27 -06:00
Daniel Wallace
5293b5b5ca
Merge pull request #47077 from dwoz/test_state_fix
...
Fix failing state test by normalizing line endings
2018-04-16 10:48:38 -05:00
Daniel Wallace
ca967de5da
Merge pull request #47067 from gtmanfred/2017.7
...
use the recommended opennebula lookup method
2018-04-16 10:48:14 -05:00
Daniel A. Wozniak
444da3f893
Fix py3 wart (chr vs bytesstring)
2018-04-14 17:39:29 -07:00
Daniel A. Wozniak
46fa2c04de
Fix py3 os.linesep wart
2018-04-14 17:09:50 -07:00
Daniel A Wozniak
e8acca01c2
Fix failing state test by normalizing line endings
...
Fixes:
integration.modules.test_state.StateModuleTest.test_issue_1896_file_append_source
2018-04-14 15:45:11 -07:00