Commit Graph

10896 Commits

Author SHA1 Message Date
Nicole Thomas
1279924f5f
Merge pull request #45991 from terminalmage/fix-duplicate-extra-opts
yumpkg: Fix a couple issues with _get_extra_opts
2018-02-14 11:48:28 -05:00
Erik Johnson
916766f651
yumpkg: Fix a couple issues with _get_extra_opts
`_get_extra_opts()` and `_get_branch_option()` were unnecessarily
quoting the value, causing it to be interpreted as a literal quote by
`subprocess.Popen()`.

Also, because there were separate helpers for repo options,
disableexcludes, branch options, and extra options, and specifically
because `_get_extra_opts()` parses *all* kwargs, any of the options from
the other helper funcs would end up being added to the command line
twice if `_get_extra_opts()` was used.

This commit consolidates all of the kwarg inspection and CLI opts
construction to a single helper function. It also adds unit tests to
make sure that we are formatting our commands properly.

Additionally, it makes a minor fix in `refresh_db()` which was not
accounted for when we changed the osmajorrelease grain to an integer in
2017.7.0.
2018-02-13 22:46:27 -06:00
Ollie Armstrong
ef6ffb1492
Resolve linting errors 2018-02-13 13:27:38 -05:00
Ollie Armstrong
8047066c46
Remove unused import 2018-02-13 13:27:38 -05:00
Ollie Armstrong
8f7c45935a
Add tests for salt.modules.selinux.fcontext_get_policy 2018-02-13 13:27:38 -05:00
Nicole Thomas
b18087cee0
Merge pull request #45711 from bdrung/fix-unicode-tests
Fix Unicode tests when run with LC_ALL=POSIX
2018-02-13 12:42:06 -05:00
Nicole Thomas
cf367dbd04
Merge pull request #45942 from terminalmage/issue45679-2017.7
Fix incorrect translation of docker port_bindings -> ports (2017.7 branch)
2018-02-13 11:10:02 -05:00
gwiyeong
949aefc82b
Merge branch '2017.7' into 2017.7-local-client-hotfix 2018-02-13 11:09:06 +09:00
Nicole Thomas
007214f7bf
Merge pull request #45908 from DimensionDataResearch/fix/issue/45884
Fix for #45884 ("TypeError: can't serialize <NodeImage" when calling salt-cloud with the dimensiondata driver)
2018-02-12 17:05:28 -05:00
GwiYeong
45d663f435
fix for local client timeout bug 2018-02-12 13:00:22 +09:00
Erik Johnson
89cbd72a0d
Don't try to sort ports when translating docker input
This sorting was done mainly for the benefit of the test suite, but
Python 3 will raise an error when you try to sort a mixture of int and
tuple types, so sorting breaks down when there are UDP ports.

Instead, this just leaves them as an unsorted list when passed to the
API, and the test suite does the sorting before the assertEqual.
2018-02-09 11:33:10 -06:00
Erik Johnson
9cd47b39dd
Fix incorrect translation of docker port_bindings -> ports
The logic which ensures that we expose ports which are being bound,
even when not explicitly configured, was done incorrectly. UDP ports
were being passed to the API as '1234/udp' instead of (1234, 'udp').
This results in the port not being exposed properly.

The logic has been corrected. Additionally both the "ports" input
translation function, as well as the post-processing code (where the
port numbers configured in port_bindings were being added) both
contained code to "fix" any ports which were configured using
'portnum/tcp', as these must be passed to the API simply as integers. To
reduce code duplication, this normalization is now only performed at the
very end of the post-processing function, after ports have been
translated, and any missing ports from the port_bindings have been
added.

The unit test for the port_bindings input translation code, which was
written based upon the same incorrect reading of the API docs that
resulted in the incorrect behavior, have been updated to confirm the
(now) correct behavior. The unit test for the ports input translation
code has been updated to reflect the new normalization behavior.

Finally, an integration test has been added to ensure that we properly
expose UDP ports which are added as part of the post-processing
function.
2018-02-08 23:23:43 -06:00
twangboy
29912adc15
Move the test_rehash test to test_win_functions 2018-02-08 17:44:30 -07:00
Erik Johnson
bb83e8b345
Add regression test for issue 45893 2018-02-08 16:31:23 -05:00
Adam Friedman
1a75786b5a
Fix linter warnings.
saltstack/salt#45884
2018-02-09 05:16:59 +11:00
Adam Friedman
a2bc155c73
Use __utils__['cloud.'] instead of salt.cloud.utils.
saltstack/salt#45884
2018-02-08 08:39:33 +11:00
Adam Friedman
de26b03e2c
Fix copy/paste bug in dimensiondata provider integration test.
saltstack/salt#45884
2018-02-08 08:39:07 +11:00
Adam Friedman
6b1b6be427
Add integration tests for dimensiondata cloud provider.
saltstack/salt#45884
2018-02-08 08:38:58 +11:00
Erik Johnson
9d200efc26
Add regression test for issue 45893 2018-02-07 14:32:59 -06:00
Nicole Thomas
900aadcd67
Merge pull request #45721 from garethgreenaway/44978_show_duration_when_no_state_run
[2017.7] Ensure duration and start time exist
2018-02-05 09:59:32 -05:00
Nicole Thomas
80a2d009b4
Merge pull request #45517 from kstreee/fix-mkdir
Fixes base dir making logic to ensure not raising the exception when base directory already exists.
2018-02-05 09:56:22 -05:00
kstreee
24d41f2451
Fixes base dir making logic to ensure not raising the exception when base directory already exists. 2018-02-02 09:55:08 +09:00
Benjamin Drung
b6181b5ed6 Fix Unicode tests when run with LC_ALL=POSIX
When running the unit tests with the locale set to POSIX, some Unicode
tests fail:

$ LC_ALL=POSIX python3 ./tests/runtests.py --unit
[...]
======================================================================
ERROR: test_list_products (unit.modules.test_zypper.ZypperTestCase)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/modules/test_zypper.py", line 236, in
test_list_products
    'stdout': get_test_data(filename)
  File "tests/unit/modules/test_zypper.py", line 53, in get_test_data
    return rfh.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
828: ordinal not in range(128)

======================================================================
ERROR: test_non_ascii (unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/templates/test_jinja.py", line 341, in test_non_ascii
    result = fp.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)

======================================================================
ERROR: test_non_ascii_encoding
(unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/templates/test_jinja.py", line 303, in
test_non_ascii_encoding
    fp_.read(),
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)
----------------------------------------------------------------------

Therefore open files in binary mode and explicitly decode them with
utf-8 instead of their default locale.
2018-02-01 19:24:23 +01:00
William Villeneuve
217791079b some code cleanup (lint errors and escape_argument as _cmd_quote) 2018-01-28 12:42:33 -05:00
Gareth J. Greenaway
359265869f
Adding a couple tests to ensure that duration is included in state run results even when states do not run. 2018-01-26 12:06:29 -08:00
William Villeneuve
1c29bc5a3d fixed quoting of script path in cmd.script 2018-01-26 09:05:18 -05:00
rallytime
9f78e53d4b
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-24 16:09:17 -05:00
Erik Johnson
4a6ab729dd
Fix failing pkg integration tests for releases with no '.'
Fedora releases are integers, and Arch's osrelease is simply `rolling`,
so https://github.com/saltstack/salt/pull/45636 caused these tests to
regress. This fixes them by moving the osrelease check until after the
MacOS check.

It also fixes the windows check, which would _always_ evaluate to `True`
since it was not calling the function. Therefore, the `if` would just be
a simple boolean which would resolve to `True` since it was just checking
a function reference.
2018-01-24 10:13:22 -06:00
Nicole Thomas
7934372b7b
Merge pull request #45649 from rallytime/bp-45634
Back-port #45634 to 2017.7.3
2018-01-24 09:59:42 -05:00
Erik Johnson
0a6b06d8ea
Fix unnecessary/incorrect usage of six.binary_type 2018-01-23 17:54:27 -05:00
Nicole Thomas
79ee24c0c7
Merge pull request #45611 from terminalmage/tests-log-level
Fix unnecessary/incorrect usage of six.binary_type
2018-01-23 17:53:19 -05:00
Nicole Thomas
0a07e0d259
Merge pull request #45642 from rallytime/bp-45636
Back-port #45636 to 2017.7.3
2018-01-23 17:00:29 -05:00
Nicole Thomas
dbdef8230e
Merge pull request #45630 from bdrung/2017.7
Fix tests
2018-01-23 16:56:46 -05:00
Nicole Thomas
e5c9cd91e8
Merge pull request #45619 from garethgreenaway/2017_7_test_mac_user_enable_auto_login
[2017.7] Fixing test_mac_user_enable_auto_login
2018-01-23 16:56:03 -05:00
Ch3LL
1c78fc23ea
Add different service name for Mac 10.13 test 2018-01-23 16:53:06 -05:00
Nicole Thomas
c290b6320b
Merge pull request #45634 from Ch3LL/mac-service
Add different service name for Mac 10.13 test
2018-01-23 16:51:56 -05:00
Frode Gundersen
e6917a291e
fix test_archive test for mac on 2017.7 branch 2018-01-23 14:35:32 -05:00
Nicole Thomas
0931b6417d
Merge pull request #45636 from Ch3LL/mac-tests
Fix mac service and pkg tests for 10.13
2018-01-23 13:44:55 -05:00
Ch3LL
df0ad54c9a
remove unnecessary variable for test 2018-01-23 11:47:32 -05:00
Ch3LL
acb14fd43d
fix pylint 2018-01-23 11:42:49 -05:00
Ch3LL
a9b12cd1ea
Fix mac service and pkg tests for 10.13 2018-01-23 11:39:06 -05:00
Ch3LL
31b712e27d
Add different service name for Mac 10.13 test 2018-01-23 10:07:10 -05:00
Benjamin Drung
76d44e9490 Fix skipping test when boto is not installed
When boto and moto are not installed, the BotoVpcTestCaseBase() should
be skipped. _get_boto_version() and _get_moto_version() require that
boto and moto are installed, but are called anyway in the skipIf
condition.
2018-01-23 13:32:22 +01:00
Benjamin Drung
2b9b262357 Fix unit.modules.test_cmdmod.CMDMODTestCase.test_run
The test_run unit tests end result when a command is not found. When
_run() is called without setting cwd, it will use the home directory as
working directory. When the home directory does not exist, the unit test
will fail:

Traceback (most recent call last):
  File "tests/unit/modules/test_cmdmod.py", line 231, in test_run
    ret = cmdmod._run('foo', use_vt=True).get('stderr')
  File "salt/modules/cmdmod.py", line 536, in _run
    .format(cwd)
salt.exceptions.CommandExecutionError: Specified cwd
'/sbuild-nonexistent' either not absolute or does not exist

Therefore set cwd to the current directory since the working directory
is not used in this test case.

This fixes one failing test of #45627.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-01-23 13:18:18 +01:00
Gareth J. Greenaway
f5f03e1e6c
Fixing integration.modules.test_mac_user.MacUserModuleTest.test_mac_user_disable_auto_login 2018-01-22 14:10:23 -08:00
Erik Johnson
6aa865cf54
Fix unnecessary/incorrect usage of six.binary_type 2018-01-22 11:17:06 -06:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-22 11:55:54 -05:00
Erik Johnson
629e6c9674
Further fixes to for salt-ssh test under heavy load
This makes some further tweaks to make the test more stable under heavy
load. Firstly, the background job sleeps longer, and secondly, we make
up to 3 attempts run state.running instead of just the one, in case our
first attempt was too early. It also uses threading to make the job
sleep, since the method of adding a & to the command seemed to be
producing intermittent failures with returning clean JSON.
2018-01-22 07:33:42 -05:00
Daniel Wallace
f7fd35fc4a
test updating the minion blackout timeout to 10 seconds 2018-01-21 14:42:56 -07:00
Daniel Wallace
bd3cb47fa7
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-20 09:58:22 -07:00
Daniel Wallace
808e26e69a
test simple website 2018-01-20 09:57:20 -07:00
Daniel Wallace
1f71f301ba
specify checking man page path
Without setting the man path, this would be checking that the installed salt
package used to bootstap has an spm man page, which is possible that it
doesn't, and also not what we want to check
2018-01-19 17:53:20 -07: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
Nicole Thomas
b3dc758ab0
Merge pull request #45483 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-18 17:54:11 -05:00
Daniel Wallace
8d907ee1a0
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-18 14:56:31 -07:00
Daniel Wallace
1241ab5fc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-18 14:56:27 -07: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
6c26025664
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-18 10:48:07 -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
Frode Gundersen
ccf062d62e
fix test_archive test for mac on 2017.7 branch 2018-01-17 18:54:35 +00:00
rallytime
de6d85959a
Lint fix 2018-01-17 12:42:38 -05:00
rallytime
9f547a31f0
Merge branch '2016.11' into '2017.7' 2018-01-16 17:19:08 -05:00
Nicole Thomas
5f58a87e84
Merge pull request #45365 from meaksh/2017.7-issue-45345
Return an error when "gid_from_name" is set but group does not exist
2018-01-16 13:31:49 -05: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
rallytime
590a6db626
Lint: use support TMP path instead of integration TMP path 2018-01-16 09:13:27 -05:00
Erik Johnson
919e92c911
Fix git.latest failure when rev is not the default branch 2018-01-14 08:25:30 -05:00
Erik Johnson
c081b2c62c
Fix git.latest failure when rev is not the default branch 2018-01-14 08:23:38 -05:00
Daniel Wallace
b9761971c2
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-13 15:01:14 -05:00
Daniel Wallace
0cd95d1cc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-13 15:01:14 -05:00
Pablo Suárez Hernández
52f9c06908
Fix integration tests for 'user.present' state. 2018-01-12 12:47:29 +00:00
Erik Johnson
0cbc6767bf
Fix git.latest failure when rev is not the default branch 2018-01-11 15:26:35 -06: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
Nicole Thomas
22c3efda06
Merge pull request #45371 from rallytime/bp-45158
Back-port #45158 to 2017.7
2018-01-11 12:51:37 -05:00
Erik Johnson
5473c085d9
Fix loader error in 2017.7 tests 2018-01-11 08:40:27 -06:00
Erik Johnson
ff3039db6c
Skip flaky test on 2017.7 branch
The behavior of the set union used to combine ext_nodes and top file
matches is not consistent on Python 3 (well, 3.5 at least), and this
produces flaky test results.

Since we do not change things like the state compiler in point
releases, the method used to combine the ext_nodes and top file matches
has been changed for Oxygen and is now fully deterministic. This test
will therefore be skipped for the remainder of the 2017.7 release cycle
on Python 3.

Fixes https://github.com/saltstack/salt-jenkins/issues/686.
2018-01-10 16:02:32 -06:00
twangboy
419be8a9b5
Backport changes from #45308 2018-01-10 11:16:59 -07:00
Erik Johnson
3565bc2bf2
Don't use include-test SLS in orch tests
This was the _actual_ cause of the failing test in the state module
integration tests.
2018-01-10 10:29:15 -05: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
Nicole Thomas
fb87010461
Merge pull request #45297 from Ch3LL/mac_service_state
Allow macosx service state tests to check for pid return
2018-01-09 15:47:23 -05:00
Nicole Thomas
8d04c2b3d4
Merge pull request #44856 from Ch3LL/running_test
Add state.running ssh integration test
2018-01-08 16:40:49 -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
Nicole Thomas
f49b204b75
Merge pull request #45302 from gtmanfred/proxyp3
fix proxy tests for py3 on 2017.7
2018-01-08 12:41:57 -05: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
e6178fe6d4
Merge branch '2017.7' into test_directory 2018-01-05 17:08:58 -05:00
Ch3LL
9a35a73711
add time limit to while loop 2018-01-05 16:18:31 -05:00
Daniel Wallace
e2824a7253
fix py3 tests 2018-01-05 13:36:08 -07:00
Daniel Wallace
24114e91c1
test was different slightly on 2017.7 2018-01-05 12:25:09 -07:00
Ch3LL
4e569b5802
Allow macosx service state tests to check for pid return 2018-01-05 12:25:44 -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
Nicole Thomas
f09d0e5fdb
Merge pull request #45277 from rallytime/bp-45025
Back-port #45025 to 2017.7
2018-01-05 10:35:52 -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
Daniel Wallace
cf98ed472e
fix up symlinks 2018-01-04 17:29:45 -05:00
Nicole Thomas
2934b60d53
Merge pull request #45254 from Ch3LL/fix_mac_grain_ssh
Add darwin value for ssh grain items tests on MacOSX
2018-01-04 16:31:34 -05:00
Nicole Thomas
d0a3770035
Merge pull request #44930 from frogunder/man_spm
man_spm_test
2018-01-04 15:58:01 -05:00
Ch3LL
b4b59b89cd
remove platform from salt.utils call for 2017.7 2018-01-04 14:42:30 -05:00
Ch3LL
74e6ed60ea
Fix MacOSX Service Status Check and integration test 2018-01-03 17:19:51 -05:00
rallytime
68f971b38f
Apply test fixes from #45034 to parsers_test.py 2018-01-03 15:10:04 -05:00
Ch3LL
85e853a63d
Add darwin value for ssh grain items tests on MacOSX 2018-01-03 13:58:28 -05:00
Nicole Thomas
eba360870a
Merge pull request #45233 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-03 10:33:59 -05:00
rallytime
a3d251b2cd
Merge branch '2016.11' into '2017.7' 2018-01-02 15:21:58 -05:00
Daniel Wallace
2d0a9bbf7e
enable UsePAM for ssh tests 2018-01-02 12:29:43 -05:00
Nicole Thomas
4f514a29a7
Merge branch '2017.7' into pkg-uptodate 2018-01-02 09:56:28 -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
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
Nicole Thomas
5991d8ca15
Merge pull request #45203 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-28 20:11:02 -05: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
rallytime
430c913c8c
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/auth/pam.py
  - salt/master.py
  - tests/unit/test_target.py
2017-12-28 12:15:54 -05:00
rallytime
a26d4795bd
[2017.7] Fix docstring integration test failure 2017-12-28 10:59:16 -05:00
Gareth J. Greenaway
48eafe3206
Adding some tests to tests cmd.script with cwd 2017-12-21 15:53:38 -08:00
Nicole Thomas
b49ee97938
Merge pull request #45124 from gtmanfred/2017.7
enable using kitchen-salt with ec2 on 2017.7
2017-12-21 14:11:27 -05:00
Daniel Wallace
d0586013eb
fix pylint 2017-12-21 10:40:54 -07:00
Gareth J. Greenaway
0ff811de70
Swapping import to be the old path for 2016.11 2017-12-21 08:17:53 -08:00
Daniel Wallace
59e2e56d13
chmod the xml files before trying to copy 2017-12-21 08:17:10 -07:00
Daniel Wallace
a5c1410e23
catch IOError when copying xml files back 2017-12-20 18:26:18 -07:00
Gareth J. Greenaway
b3e2f388f5
Fix to allow nodegroups to include sequences 2017-12-20 16:56:16 -08:00
Daniel Wallace
23bd38ad66
enable using kitchen-salt on ec2
These changes are needed to run the test suite on ec2 using sudo.
2017-12-20 17:18:39 -07:00
Nicole Thomas
42e894570d
Merge pull request #45087 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-20 17:24:50 -05:00
Ch3LL
1bd7110a14
Fix spm big file build test to check /tmp 2017-12-20 14:40:10 -05:00
rallytime
fe81e2d39a
Merge branch '2016.11' into '2017.7'
No conflicts.
2017-12-20 10:26:10 -05:00
Erik Johnson
80b6bd6813
Fix integration.states.test_pip.PipStateTest.test_pip_installed_weird_install
Carbon 1.1.1 for some reason added six to their setup.py, which breaks
this test since it's not installed into the virtualenv. This PR forces
this test to use a version of carbon which does not dep on six in its
setup.py.
2017-12-20 06:54:30 -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
Nicole Thomas
5137be01ec
Merge pull request #44951 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-16 08:16:23 -05:00
Frode Gundersen
48e6953e1f
fix_string_error 2017-12-14 22:40:59 +00:00
twangboy
40665d7b08
Skip test_log_created on Windows 2017-12-13 14:12:07 -07:00
rallytime
a0d2dd2069
Lint fix 2017-12-13 14:06:11 -05:00
rallytime
9db4179462
Merge branch '2016.11' into '2017.7'
Conflicts:
  - tests/unit/grains/test_core.py
2017-12-12 15:24:30 -05:00
Daniel Wallace
66bb755751
add test for effective acls 2017-12-12 09:58:08 -07:00
Frode Gundersen
c9fa4ed2a7
man_spm_test 2017-12-11 19:52:32 +00:00
Frode Gundersen
19a2244cb7
whitelist_acl_test 2017-12-11 18:25:46 +00:00
Nicole Thomas
85160fd297
Merge pull request #44921 from Ch3LL/log_test
Add test to ensure log files are created
2017-12-11 13:24:15 -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
Ch3LL
3bb58fb577
skip salt-key log creation test 2017-12-11 10:59:10 -05:00
Nicole Thomas
df28f312ac
Merge pull request #44879 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-10 11:53:43 -05:00
Nicole Thomas
f5a143f8c5
Merge pull request #44621 from isbm/isbm-bsc1068446-2017.7
Bugfix: errors in external pillar causes crash, instead of report of them
2017-12-08 13:46:55 -05:00
rallytime
23c5a4ca3e
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/win_pkg.py
  - salt/states/file.py
  - tests/integration/states/test_file.py
  - tests/unit/states/test_file.py
2017-12-07 17:33:03 -05:00
Ch3LL
6a379195bc
Add test to ensure log files are created 2017-12-07 17:31:26 -05:00
Nicole Thomas
abe089ad54
Merge pull request #43379 from twangboy/win_fix_file.managed
Fix file.managed on Windows with test=True
2017-12-07 16:10:42 -05:00
Gareth J. Greenaway
edcd581ca5
Merge branch '2017.7' into win_fix_file.managed 2017-12-07 10:00:55 -08:00
Daniel Wallace
3f1268d67f
fix patching for python 2.6 2017-12-07 08:25:26 -07:00
Nicole Thomas
7adcfbf8ec
Merge branch '2017.7' into develop2 2017-12-07 10:14:52 -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
Ch3LL
aeb5f4e248
Add state.running ssh integration test 2017-12-06 13:23:55 -05:00
Nicole Thomas
904c0da893
Merge branch '2017.7' into status 2017-12-06 12:51:52 -05:00
Nicole Thomas
019169ed61
Merge pull request #44824 from Ch3LL/spm_args
Add spm -y and -f arg integration tests
2017-12-05 16:49:31 -05:00
Ch3LL
d8f81d2e4d
fix pylint 2017-12-05 14:39:36 -05:00
Nicole Thomas
59b930668c
Merge pull request #44742 from Ch3LL/cloud_action_test
Add salt-cloud action rename integration test
2017-12-05 12:44:49 -05:00
Nicole Thomas
23d151b40a
Merge pull request #44784 from rallytime/merge-2017.7-1
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-05 12:13:48 -05:00
Ch3LL
951d09ca2f
remove unnecessary try/except block 2017-12-04 16:18:01 -05:00
Ch3LL
c329ced7ee
Add salt-cloud action rename integration test 2017-12-04 16:16:08 -05:00
Ch3LL
61ac5cf157
Add spm -y and -f arg integration tests 2017-12-04 16:06:14 -05:00
twangboy
a27bb6993a
Fix py3 error 2017-12-04 14:05:54 -07:00
twangboy
0ff9fa498a
Fix test_directory 2017-12-04 14:05:54 -07:00
twangboy
187bc1e61e
Add back the try/finally blocks 2017-12-04 14:05:54 -07:00
twangboy
d7241d004f
Fix 2 more tests 2017-12-04 14:05:54 -07:00
twangboy
d5dd42aebe
Fix integration tests for Windows 2017-12-04 14:05:53 -07:00
twangboy
af5565859e
Use file functions for symlink and remove 2017-12-04 14:05:53 -07:00
twangboy
a24b964ea5
Fix unit test to handle new Exception 2017-12-04 14:05:52 -07:00
twangboy
4602f499a2
Remove loader module mixin, add linux paths 2017-12-04 14:05:52 -07:00
twangboy
99b27c037f
Add tests to avoid future regression 2017-12-04 14:05:51 -07:00
twangboy
068e463870
Fix lint, add integration tests 2017-12-04 13:29:37 -07:00
Frode Gundersen
3504083849
add pkg_latest_version test 2017-12-04 20:28:52 +00:00
Daniel Wallace
1d0bd5bb32
Merge branch '2016.11' into 2016.11 2017-12-04 10:13:15 -07:00
Bo Maryniuk
0d2675c4fe Use variable, instead of direct value 2017-12-04 15:51:56 +01:00
Bo Maryniuk
1ddc47da0a Add unit test for _get_pillar_errors when external pillar is clean and internal contains errors 2017-12-04 15:51:56 +01:00
Bo Maryniuk
68480d5dc9 Add unit test for _get_pillar_errors when both external and internal pillars contains errors 2017-12-04 15:51:56 +01:00
Bo Maryniuk
218a59e93b Add unit test for _get_pillar_errors when external pillar has errors and internal is clean 2017-12-04 15:51:56 +01:00
Bo Maryniuk
3ce19356c2 Add unit test for _get_pillar_errors when external and internal pillars are clean 2017-12-04 15:51:56 +01:00
Bo Maryniuk
67034139d9 Fix unit test: wrong error types in side effect 2017-12-04 15:51:56 +01:00
Bo Maryniuk
d9359bca13 Bugfix: unit test mistakenly expects pillar errors as a string, while it is a list 2017-12-04 15:51:56 +01:00
Nicole Thomas
4ebac09f60
Merge pull request #44735 from gracinet/42713_backport_2017.7
Backported issue #42713 to 2017.7
2017-12-03 20:43:22 -05:00
Erik Johnson
153bf45b03
Fix regression in file.managed when source_hash used with local file
This ensures that we enforce the passed source_hash when the source is a
file local to the minion.
2017-12-03 00:01:44 -06:00
twangboy
a5737e8fc3
Fix lint errors 2017-12-01 16:45:18 -07:00
twangboy
be96de09cc
Fix pickling error by decorating 2017-12-01 16:45:18 -07:00
rallytime
3d9eafc4bd
Lint: Remove extra empty lines at end of files 2017-12-01 14:46:27 -05:00
rallytime
817ac002b0
Add destructive test decorator to test class
Because the destructive test decorator was applied to the tearDown
function, the tests show a stacktrace instead of a nice skip message
when running without the `--run-destructive` flag. By applying the
decorator to the test class (since all tests are destructive anyway)
we can keep the output clean and still skip tests appropriately.
2017-12-01 14:33:38 -05:00
twangboy
5615862f23
Fix some lint 2017-12-01 10:25:48 -07:00
twangboy
627d5ab0c9
Mock salt.utils.which
cmd.run return values are mocked
2017-12-01 10:25:48 -07:00
twangboy
e5a96fe00f
Skip test_fstype on Windows
no lsblk on Windows
2017-12-01 10:25:48 -07:00
rallytime
239f3511bf
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/reg.py
  - salt/modules/state.py
  - salt/modules/win_pkg.py
  - salt/netapi/rest_cherrypy/app.py
  - salt/utils/__init__.py
  - tests/integration/modules/test_file.py
  - tests/integration/output/test_output.py
  - tests/unit/grains/test_core.py
2017-12-01 11:12:44 -05:00
Nicole Thomas
d23192c492
Merge pull request #44747 from gtmanfred/roster_defaults
use a copy so roster_defaults doesn't mangle
2017-12-01 10:13:47 -05:00
Daniel Wallace
911411ed8f
add unit test 2017-11-30 13:48:30 -07:00
Nicole Thomas
06fb80b69c
Merge pull request #44640 from vutny/fix-cron-schedule-splay
Fix #44583: splay with cron-like scheduled jobs
2017-11-30 10:30:40 -05:00
Nicole Thomas
e5a1401b82
Merge pull request #44712 from Ch3LL/ssh_pillar_items
Add pillar ssh integration tests
2017-11-30 10:29:32 -05:00
Denys Havrysh
d1f247e49e
Add basic unit tests for schedule util eval func 2017-11-30 12:43:52 +02:00
Nicole Thomas
7bde48282e
Merge pull request #44737 from twangboy/win_skip_test_ipc
Skip `unit.transport.test_ipc` for Windows
2017-11-29 14:18:20 -05:00
Georges Racinet
6806d83314
Merge branch '2017.7' into 42713_backport_2017.7 2017-11-29 19:00:38 +01:00
twangboy
4e0359b603
Skip IPC transport tests in Windows, not supported 2017-11-29 09:19:51 -07:00
Georges Racinet
fb586c6dce
Backported issue #42713 to 2017.7
Cherry-picked and squashed the two commits from the develop branch
(details at the end of this message)

The unit test module didn't exist at all on 2017.7, hence a conflict during
cherry picking, resolved by introducing only the new tests (the other ones
don't pass as is on 2017.7)

Also, the mock in unit tests for mine.get had to be adapted,
because the return of salt.utils.minions.CkMinions._check_compound_minions()
takes a different form on 2017.7 (just the list of minions).

Original cherry-picked commits:

commit 115ebef6a089dedf8dbadd3b4cca768adbb4a710
Author: Georges Racinet <gracinet@anybox.fr>
Date:   Wed Nov 8 18:02:29 2017 +0100

    Unit test for backwards compatibility of mine.get

    Could not find calls to RemoteFuncs in unit tests, therefore started a
    new one, hope it's in the appropriate place.

    The test replaces the caceh by its own (very limited) one. It's quite
    possible it could be improved by reusing another one meant for unit tests.

commit dc884478399355f3fbea8626a8366b933580dee0
Author: Georges Racinet <gracinet@anybox.fr>
Date:   Mon Oct 30 13:49:13 2017 +0100

    Backwards compat for mine.get on pre-Nitrogen minions

    With this change, the master will accept `expr_form` from
    its minions doing a `mine.get`, which is what minions versions
    before Nitrogen would do. This solves issue #42713.

    In case both `tgt_type` and `expr_form` are present, the former
    gets precedence.

    Performance-wise, this adds a single dict lookup for minions
    running Nitrogen onwards, and two for pre-Nitrogen minions.
    This is, in my opinion, acceptable.
2017-11-29 16:17:52 +01:00
Ch3LL
9b7421b261
Change check to the state id 2017-11-29 10:15:56 -05:00
Ch3LL
9cc853e3d5
Add masterless state.highstate integration test 2017-11-29 10:15:56 -05:00
Nicole Thomas
2dc3e5c42a
Merge pull request #44613 from Ch3LL/pillar_masterless
Add pillar.items test for masterless
2017-11-29 09:43:10 -05:00
Nicole Thomas
cc05481026
Merge pull request #44659 from Ch3LL/ssh_sls_id
Add state.sls_id to ssh wrapper and tests
2017-11-29 09:41:47 -05:00