Commit Graph

1386 Commits

Author SHA1 Message Date
Nicole Thomas
4a116beba6
Merge pull request #45639 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-23 17:03:26 -05:00
rallytime
583a89ca6f
Update old utils paths to new paths 2018-01-23 13:34:24 -05:00
rallytime
3c298afa72
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/modules/pip.py
  - salt/modules/reg.py
  - salt/modules/win_pkg.py
  - salt/runners/manage.py
  - salt/states/pkg.py
  - salt/transport/zeromq.py
  - salt/utils/event.py
  - tests/integration/modules/test_pip.py
  - tests/integration/states/test_user.py
  - tests/unit/grains/test_core.py
  - tests/unit/states/test_archive.py
  - tests/unit/utils/test_boto.py
2018-01-23 13:26:43 -05:00
rallytime
10b7b0601d
Add unicode_literals to more modules, states, and tests 2018-01-23 10:08:59 -05:00
Nicole Thomas
9facc5ede5
Merge pull request #45543 from terminalmage/py3-tier1-2
[PY3] Add unicode_literals to more high-priority states/modules
2018-01-23 09:38:21 -05:00
Nicole Thomas
ff997aa552
Merge pull request #45592 from rallytime/unicode-changes-5
Add unicode_literals to modules, states, and tests [n]
2018-01-23 07:50:46 -05:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-22 11:55:54 -05:00
rallytime
8d54b95d8c
Add unicode_literals to modules, states, and tests [n] 2018-01-22 09:42:15 -05:00
rallytime
2e8b86a944
Add more unicode_literals to modules, states, and test files 2018-01-22 09:32:29 -05:00
Erik Johnson
06ec8db7e2
[PY3] Add unicode_literals to more high-priority states/modules 2018-01-22 08:26:28 -06:00
Erik Johnson
9df3dab883
[PY3] Add unicode_literals to pkg/pkgrepo states/modules 2018-01-20 22:21:41 -06:00
Daniel Wallace
0ba39a7108
switch systemd-journald for sshd for arch service test
the running tests run second because of alphabetical order, and stopping sshd
does not kill off the running connection, so we know that sshd has to be on
arch for us to connect, so stop it with dead and start it back with running.

It is also not possible to stop the systemd-journald process without shutting
down the full machine.
2018-01-19 15:17:53 -07:00
rallytime
e0ffa32b49
Merge branch '2016.11' into '2017.7'
Conflicts:
  - tests/integration/modules/test_pkg.py
2018-01-19 10:09:36 -05:00
Daniel Wallace
f4b6367cf9
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-18 14:54:54 -07:00
Daniel Wallace
5455d2dee6
fix centos 6 pip test
flake8 is having problems installing on python2.6, switching to different
module that still works easily on python 2.6
2018-01-17 22:41:06 -07:00
Daniel Wallace
40255194b0
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-17 21:35:41 -07:00
Erik Johnson
4ca7931655
[PY3] Update modules/states for PY3/Unicode compatibility (B)
This includes all the boto modules
2018-01-17 17:06:07 -06:00
Nicole Thomas
de080983e3
Merge pull request #44822 from frogunder/pkg_latestversion
add pkg_latest_version test
2018-01-16 09:16:53 -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
1044b627a1
[PY3] Add unicode_literals to salt.utils modules (A-D) 2018-01-13 16:08:56 -06:00
rallytime
bbe6f54f84
Update old utils paths to new paths 2018-01-12 12:27:08 -05: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
twangboy
0356b3d56f
Backport changes from #45308 2018-01-11 15:36:38 -05:00
Nicole Thomas
2340f0b487
Merge pull request #45380 from twangboy/backport_45308
Backport changes from #45308
2018-01-11 14:45:20 -05:00
Frode Gundersen
08644e02a0
skip if mac 2018-01-11 19:12:31 +00:00
twangboy
419be8a9b5
Backport changes from #45308 2018-01-10 11:16:59 -07:00
Erik Johnson
8bc17e0d7a
Fix integration.modules.test_state.StateModuleTest.test_exclude
test_exclude shares file paths with test_include, and while I can't
reproduce the failures, it is likely that improperly cleaned-up files
from test_include are causing the failures in test_exclude. This is
backed up by the fact that the state.sls return data from the
salt-runtests.log shows no trace of the "to-include-test" file
(suggesting it was excluded as expected), yet os.path.isfile() returns
True for this path, causing the test to fail.

This commit uses a distinct base dir for both tests, which should keep
this sort of failure from happening.
2018-01-10 10:29:15 -05:00
twangboy
53506a5e86
Fix some additional tests
- Fix problem with invalid characters in requisites.prereq_simple2
- Fix problem with true/false commands in Windows. Need to use exit
- Fix some issues with hard-coded paths to /tmp
2018-01-09 16:50:29 -07:00
twangboy
db52f086e3
Fix some tests in integration.modules.test_state
Fixes the following tests:
- test_get_file_from_env_in_top_match
- test_issue_1896_file_append_source
- test_state_sls_id_test

Fixes in issue in file.managed where a command execution error was being
raised if the target file did not exist.
2018-01-09 15:21:58 -07: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
Ch3LL
74e6ed60ea
Fix MacOSX Service Status Check and integration test 2018-01-03 17:19:51 -05: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
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
Erik Johnson
4bf072435d
Fix integration.modules.test_state.StateModuleTest.test_exclude
test_exclude shares file paths with test_include, and while I can't
reproduce the failures, it is likely that improperly cleaned-up files
from test_include are causing the failures in test_exclude. This is
backed up by the fact that the state.sls return data from the
salt-runtests.log shows no trace of the "to-include-test" file
(suggesting it was excluded as expected), yet os.path.isfile() returns
True for this path, causing the test to fail.

This commit uses a distinct base dir for both tests, which should keep
this sort of failure from happening.
2017-12-24 12:08:57 -06:00
Gareth J. Greenaway
48eafe3206
Adding some tests to tests cmd.script with cwd 2017-12-21 15:53:38 -08:00
rallytime
9ded5e1cbb
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/config/__init__.py
  - salt/grains/core.py
  - salt/modules/win_lgpo.py
  - salt/returners/mysql.py
  - salt/states/libcloud_dns.py
  - tests/integration/runners/test_runner_returns.py
  - tests/unit/grains/test_core.py
2017-12-21 15:58:08 -05:00
Frode Gundersen
dfb68f32d2
fix if statements and string 2017-12-19 19:45:19 +00:00
Nicole Thomas
e0d7b330fa
Merge pull request #44650 from frogunder/status
add status.pid test
2017-12-19 11:21:08 -05:00
Erik Johnson
8cdb9ea54f
[PY3] Add print_function import to files with unicode_literals already added
This makes the 2.x usage invalid syntax and forces the use of print as a
function. This adds the import to the files which I've updated in the
last couple of days but forgot to add it.
2017-12-15 12:14:18 -06:00
Nicole Thomas
653ad2a224
Merge pull request #44946 from terminalmage/unicode-file
[PY3] Update file state/execution modules and associated files with unicode_literals
2017-12-14 16:26:50 -05:00
Erik Johnson
5e1f75aab0
[PY3] Add unicode_literals to docker state/execution modules 2017-12-13 22:49:23 -06:00
Erik Johnson
1bfc53fc57
Update file state/execution modules and associated files with unicode_literals
This updates the file state and execution modules to use
unicode_literals. Since the serializers and the cmd module are touched
by the file state/exec module, those are also updated here, as well as
the cmd state module, for good measure.

Additionally, I found that salt.utils.data.decode_dict (and decode_list)
are misnamed for what they actually do. Since they *encode* the
contents, the functions should be named encode_dict and encode_list,
respectively. And we also should have counterparts which actually
decode, so I've added them. The compatibility functions from salt.utils
still use the old "decode" names to preserve backward compatibility, but
they now invoke the renamed "encode" functions in salt.utils.data. Note
that this means that the compatibility functions
salt.utils.decode_dict/list, and their cognates in salt.utils.data now
do different things, but since the move to salt.utils.data is also
happening in the Oxygen release this is as good a time as any to correct
this oversight.

I've updated the jinja filter docs to include information on the renamed
jinja filters, and also added a section on jinja filter renaming to the
Oxygen release notes. There was another filter that I renamed during the
process of moving functions from salt.utils which I did not properly
document in the release notes, so this is now included along with the
others.
2017-12-13 16:43:45 -06:00
rallytime
db5866d097
Update old utils paths to new utils paths 2017-12-11 18:43:33 -05:00
rallytime
08c71f13e4
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/thorium/index.rst
  - salt/beacons/__init__.py
  - salt/client/mixins.py
  - salt/client/ssh/wrapper/state.py
  - salt/daemons/masterapi.py
  - salt/grains/extra.py
  - salt/minion.py
  - salt/modules/cron.py
  - salt/modules/file.py
  - salt/modules/mac_user.py
  - salt/modules/napalm_network.py
  - salt/modules/state.py
  - salt/modules/win_file.py
  - salt/modules/win_pkg.py
  - salt/proxy/dummy.py
  - salt/state.py
  - salt/states/file.py
  - salt/states/lxc.py
  - salt/utils/__init__.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_file.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/ssh/test_state.py
  - tests/integration/states/test_file.py
  - tests/unit/daemons/test_masterapi.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_disk.py
  - tests/unit/modules/test_napalm_network.py
  - tests/unit/modules/test_state.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_process.py
2017-12-11 18:24:41 -05:00
Nicole Thomas
54d29a61cb
Merge pull request #44787 from rallytime/groupadd-destructive-clean
GroupAdd test: Add destructive test decorator to entire class
2017-12-11 13:14:17 -05:00
Nicole Thomas
2a2fad5037
Merge pull request #44818 from Ch3LL/test_true_minion
Allow test arg to be used on master or pillar
2017-12-08 17:36:25 -05:00
Nicole Thomas
74ee7ce541
Merge pull request #44748 from twangboy/osx_fix_auto_login
Fix auto login support for OSX
2017-12-07 09:22:22 -05:00
Nicole Thomas
904c0da893
Merge branch '2017.7' into status 2017-12-06 12:51:52 -05:00