Commit Graph

6181 Commits

Author SHA1 Message Date
Denys Havrysh
c7cf79e959 cp.get_url: add note and test for https:// URL with `dest=None` 2016-10-17 17:39:52 +03:00
Denys Havrysh
ff55f77179 cp.get_url: write more verbose docstring 2016-10-17 16:01:02 +03:00
Denys Havrysh
94a34a08ba cp.get_url: add integration tests 2016-10-17 15:46:49 +03:00
Erik Johnson
7c78d6f419 Add unit tests for systemd scope usage 2016-10-07 17:35:09 -05:00
Denys Havrysh
bba9d0d105 alternatives.install state: detect alternatives command failed 2016-09-29 18:09:16 +03:00
Mike Place
3d098c64ef
Remove possible race between grains dumps in test
It's not always reasonable assume that grains will be the same byte-for-byte
between invocations. Remove that assumption since it isn't related to the what's under test here anyhow.
2016-09-29 15:34:50 +09:00
Mike Place
8cfe371a5a Merge pull request #36663 from cachedout/skip_pip_tests_on_download_fail
Fix error in pip test
2016-09-29 15:15:52 +09:00
Mike Place
0c7fb91dc5
Fix error 2016-09-29 15:14:37 +09:00
Mike Place
e3f8618982 Merge pull request #36662 from cachedout/skip_pip_tests_on_download_fail
Skip over tests where upstream pip isn't there
2016-09-29 15:12:26 +09:00
Mike Place
0bbc60ccd7
Skip over tests where upstream pip isn't there 2016-09-29 15:11:38 +09:00
Mike Place
3249a11e71 Merge pull request #36661 from cachedout/fix_grain_test_race
Fix race between minion job timeout and cli test timeout
2016-09-29 13:42:23 +09:00
Mike Place
2dcb92134d
Fix race between minion job timeout and cli test timeout 2016-09-29 13:23:26 +09:00
Mike Place
f4906fe771
Fix test not to rely on external resources
We can still model the original issue without needing to call all the way out to pypi to do it.
2016-09-29 12:35:02 +09:00
Mike Place
4ab52ae0f6 Merge pull request #36607 from vutny/detect-service-fail
`salt.states.service`: detect that service failed to start/stop
2016-09-28 11:39:51 +09:00
Jonathan Ballet
79fdc12395 jinja: fix YAML terminator removal in Jinja's "yaml" filter 2016-09-27 18:52:49 +02:00
Denys Havrysh
c4f899b3b3 salt.states.service: detect that service failed to start/stop 2016-09-27 18:24:37 +03:00
Nicole Thomas
07c9d040c0 Fixup the rabbitmq_user state test failure (#36541) 2016-09-23 15:05:40 -06:00
Mike Place
41d3c09857 Merge pull request #35433 from terminalmage/issue34790
git.latest: Add a hint for possible rev changes resulting in non-fast-forward failures
2016-09-21 16:02:18 +09:00
Thomas S Hatch
5625827ee2 Merge pull request #36378 from terminalmage/issue36321
git.latest Treat an up-to-date checkout with local changes as up-to-date
2016-09-19 12:43:29 -06:00
Erik Johnson
bb4d69f58a git.latest: fail gracefully for misconfigured remote repo (#36391)
* git.latest: fail gracefully for misconfigured remote repo

When the remote repo's HEAD refers to a nonexistent ref, this was
causing a traceback when we tried to check if the upstream tracking
branch needed to be changed after cloning the repo. This commit fixes
this traceback by gracefully failing the state when the remote HEAD is
not present in the ``git ls-remote`` output, but the desired remote
revision doesn't exist.

Additionally, a similar graceful failure now happens if the state is run
again after we gracefully fail the first time, and we need to set the
tracking branch. Trying to set the tracking branch when there is no
local branch would fail with an ambiguous error like "fatal: branch
'master' does not exist", so before we even attempt to set the tracking
branch, the state is failed with a more descriptive comment.

* Add integration test for #36242
2016-09-19 09:33:00 -06:00
Erik Johnson
71b51f49ba Add integration tests for PR #35433 2016-09-17 22:55:47 -05:00
Erik Johnson
7b1f621206 Fix git.latest test with local changes to reflect changes in state 2016-09-17 21:56:31 -05:00
Nicole Thomas
df9d9b3624 Merge pull request #36355 from rallytime/bp-36288
Back-port #36288 to 2015.8
2016-09-16 08:59:47 -06:00
Denys Havrysh
3f308d7694 postgres_extension: report changes when an extension was installed (#36335)
* postgres_extension: report changes when extension was installed or upgraded

* postgres_extension state: fix unit tests
2016-09-16 08:23:20 -06:00
Mike Place
70ffdafbf0 Schema test requires jsonschema 2.5.0 or above 2016-09-15 17:23:51 -06:00
Pablo Suárez Hernández
dc518c5340 Skip test_resize2fs if resize2fs does not exists (#36325) 2016-09-15 10:14:50 -06:00
Pablo Suárez Hernández
ed2d2bd331 Integration tests fixes for 2015.8 (#36262)
* Fixing integration tests if azure is not present

* Fixing integration tests failures if 'git' command is missing

Skip git state integration tests if 'git' does not exists
Prevent OSError if 'git' command not found during _git_version()
2016-09-13 15:24:06 -06:00
Pablo Suárez Hernández
fdf40907b7 Some unit tests fixes (#36227)
* Prevent tests failures if boto does not exists

* Prevent tests failure if /etc/fstab does not exists
2016-09-12 11:43:12 -06:00
Mike Place
f74ca15f50 Remove test for file dir behavior
Refs #34809
2016-09-08 11:36:17 +01:00
Eric Radman
c65aefee20 Fix tests that assert CommandExecutionError (#32485)
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
2016-09-08 11:36:17 +01:00
twangboy
f8c0b439b8 Fixed more lint 2016-09-08 11:36:17 +01:00
twangboy
63ff731009 Fixed tests 2016-09-08 11:36:17 +01:00
Dmitry Kuzmenko
04b1a4a9ca Fixed use of assert_has_calls in tests.
The method logic was changed in mock-1.1.0.
This mades the use of the method compatible with both <1.1.0 and >=1.1.0
2016-09-08 11:36:17 +01:00
Dmitry Kuzmenko
46e4bb58e5 Fixed LoadAuthTestCase 2016-09-08 11:36:17 +01:00
rallytime
4e9733ad6d Rename dockerio.py unit tests to dockerio_test.py
These tests have never run automatically because of an incorrect file name.

Added a skipIf on these tests as they are currently non-functioning and the
module they're testing has been deprecated.
2016-09-08 11:36:17 +01:00
Pedro Algarvio
ec0cc943e0 Make sure spm tests are picked up by runtests.
Lists in py2 don't have the clear method
2016-09-08 11:36:17 +01:00
kstreee
2605f34849 Fix missing first data in stream when subscribing stream using a function 'read_async'. 2016-09-08 11:36:17 +01:00
Pablo Suárez Hernández
305bab8be0 Fixed _interfaces_ifconfig output for SunOS test 2016-09-08 11:36:17 +01:00
Eric Radman
b5ca02c867 Fix tests that assert CommandExecutionError (#32485)
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
2016-09-08 11:36:17 +01:00
Mihai Dincă
1fb6340fef Fix tests (#35693)
* Fix tests/unit/modules/useradd_test.py::UserAddTestCase::test_info

* Fix unit/pyobjects_test.py::MapTests::test_map

* Fix tests/unit/pyobjects_test.py::RendererTests::test_extend

* Fix tests/unit/pyobjects_test.py::RendererTests::test_requisite_implicit_list
2016-09-08 11:36:17 +01:00
Eric Radman
5977f1f54c Skip utils_test if timelib is not installed (#32699)
date_cast() throws a RuntimeError, not an ImportError
2016-09-08 11:36:17 +01:00
Pablo Suárez Hernández
d1b9a4061e Fixing skipped boto tests to prevent errors if boto3 does not exists. 2016-09-08 11:36:17 +01:00
Nicole Thomas
7cdbc546f1 Back-port #36062 to 2015.8 (#36118)
* Comment all lines in the minion config file

* Add unit tests to check for all files in conf/ to be commented out

* Make sure cont/cloud.profiles file is commented out

Matches the cloud.providers file format and other sample config files.

* Add unit tests for sample files in cloud.profiles.d, cloud.providers.d,
and cloud.maps.d

* Make sure all sample config files in cloud.maps.d are commented out

* Make sure all sample config files in cloud.profiles.d are commented out
2016-09-07 16:01:34 -06:00
Mike Place
6cf56843d4 Revert "service state integration tests" 2016-09-02 21:38:15 +09:00
Erik Johnson
eb4d2f299b Better unicode handling in gitfs (#35802)
* Revert "Don't use six.text_type() in salt.utils.gitfs"

This reverts commit d76659a63a.

* salt.utils.path_join: handle mixed unicode/binary-unicode paths

* Add test for mixed unicode and binary-unicode paths

* salt.utils.gitfs: replace os.path.join with salt.utils.path_join
2016-08-26 10:44:22 -06:00
Daniel Wallace
2d2bc1ffea use aws.get_location in s3 modules
Also load the __utils__ into pillar and fileserver and fileclient so
that this function can be used there with __opts__.

Also sets the default for s3 to 'us-east-1' like it is documented.

Closes #30976
Closes #28913
2016-08-23 12:12:15 -05:00
Thomas S Hatch
c9070c212f Merge pull request #35569 from rallytime/test-for-35384
Write test for multiple unless commands where 1st cmd passes and 2nd fails
2016-08-19 13:28:01 -06:00
Erik Johnson
beb6ca8ef9 Update linux_sysctl tests to reflect new context key (#35584)
* Update docstring to reflect optional context argument

It used to not be optional.

* Update linux_sysctl tests to reflect new context key

This key was changed in 5b12f03, this updates the tests to reflect the
change.
2016-08-18 20:56:08 -06:00
rallytime
30f42d5352 Write test for multiple unless commands where 1st cmd passes and 2nd fails
This is a regression integration test for #35384, which was fixed by #35545,
and back-ported to the 2015.8 branch in #35566.
2016-08-18 11:04:08 -06:00
Mike Place
205d8e2e7b Merge pull request #35483 from gtmanfred/2015.8
use __utils__ in salt.cloud
2016-08-18 22:32:22 +09:00