Commit Graph

10298 Commits

Author SHA1 Message Date
Erik Johnson
d942752e95 Fix usage of assert_called_once in Python 3 < 3.6
This is a more complete fix which builds upon 41c65b0 and covers all
refs to assert_called_once in the suite.
2017-07-03 09:30:12 -05:00
Mike Place
5b2ae2dd04 Merge pull request #42062 from terminalmage/arch-grains-test
Add debug logging for grains tests
2017-06-30 16:58:15 -05:00
Erik Johnson
3071bb7a37 Add debug logging for grains tests
The assert doesn't tell us anything about the grain that is failing.
This adds some debug logging to make this easier to troubleshoot.
2017-06-30 15:39:48 -05:00
rallytime
f0416acc37 Add mode back in for tmp file creation on Linux
The mode arg was removed in PR #41966 to get this test to pass on
Windows. However, this caused the same test to fail on Arch Linux
when running Python 3.

Let's keep the test the way it was for non-windows boxes, and only
remove the mode for windows.
2017-06-30 12:06:54 -06:00
Nicole Thomas
951ed4a9c9 Merge pull request #42032 from terminalmage/py3-tests
Avoid race condition when iterating through processes
2017-06-30 08:29:54 -06:00
Mike Place
32b73efd2d Merge pull request #42034 from rallytime/fix-41971
Add the 'provider' key to salt.cloud.CloudClient.create()
2017-06-30 09:01:19 -05:00
Andrew Bulford
9eea796da8 Add regression tests for #41982
These test the scenarios where another network with a similar name
already exists, verifying that network_absent doesn't attempt to remove
a network which isn't specified, and network_present still attempts to
create the specified network despite a similarly named network already
being present.
2017-06-30 11:03:45 +01:00
Andrew Bulford
3369f0072f Fix broken unit test test_network_absent
This started failing following commit 515c612, which relied on the
'Name' key being present in the return value of dockerng.networks -
as the mock didn't have this set the test started failing.
2017-06-30 11:01:10 +01:00
rallytime
a77e1bd9dd Add integration test for salt.cloud.CloudClient.create() function 2017-06-29 14:37:12 -06:00
Erik Johnson
d31939574b Avoid race condition when iterating through processes
If a process has already exited between when psutil.process_iter() was
invoked, and when we invoke the cmdline() func, it will raise an
exception. This commit catches this exception and skips these processes.
2017-06-29 15:08:17 -05:00
Erik Johnson
26f848e111 Mock socket.getaddrinfo in unit.utils.network_test.NetworkTestCase.test_host_to_ips
This will keep future IP address changes from impacting this test. It
also tests a host which returns an IPv6 address, and a host which cannot
be resolved.
2017-06-29 14:49:39 -05:00
twangboy
cdb53c2657 Set file_roots for Windows Temp 2017-06-29 13:01:10 -06:00
Mike Place
1b194904f3 Merge pull request #41992 from twangboy/win_unit_test_archive
Fix `unit.modules.test_archive` on Windows
2017-06-29 11:53:04 -05:00
Mike Place
9f3438d5e7 Merge pull request #42000 from terminalmage/merge-2017.7
Merge 2016.11 into 2017.7 Merge remote-tracking branch 'upstream/2016.11' into merge-2017.7
2017-06-28 21:44:22 -05:00
Erik Johnson
f13ddeb394 Merge remote-tracking branch 'upstream/2016.11' into merge-2017.7
Conflicts:
- doc/_themes/saltstack2/layout.html
- salt/auth/__init__.py
- salt/utils/schedule.py
2017-06-28 20:27:32 -05:00
Erik Johnson
94316114ee Add test for pyobjects priority 2017-06-28 19:48:46 -05:00
Erik Johnson
dfd0e51794 Update test_map to test declarative ordering 2017-06-28 19:48:46 -05:00
Erik Johnson
91576a7263 Introduce "priority" feature for pyobjects
When there are multiple matches (such as when both an os_family and os
grain both match the minion), the order in which they are processed is
determined by the iteration order of the class' __dict__ attribute.
Since this would be different in different versions of Python, behavior
would be inconsistent depending on which version of Python is being used.

This adds a priority attribute to the Map subclass which, if present,
will re-order the match groups such that the results will be predictable
irrespective of Python version.
2017-06-28 19:48:46 -05:00
Erik Johnson
fb6a93314f Update IP address for unit.utils.network_test.NetworkTestCase.test_host_to_ips
The IP for saltstack.com changed, so this test needs to be updated.
2017-06-28 19:42:52 -05:00
twangboy
a5f7288ad9 Skip test that uses pwd, not available on Windows 2017-06-28 15:35:35 -06:00
twangboy
bf20938f11 Fixes problem with path 2017-06-28 15:02:12 -06:00
rallytime
9cb9547bc0 Rename transport_test file to test_transport and update imports for pytest 2017-06-28 11:35:13 -06:00
rallytime
7d7be2d375 Merge branch '2016.11' into '2017.7'
Conflicts:
  - doc/ref/configuration/master.rst
  - tests/integration/states/test_archive.py
  - tests/unit/transport/test_tcp.py
  - tests/unit/transport/test_zeromq.py
2017-06-28 10:48:37 -06:00
garethgreenaway
4fe273f78e Merge pull request #41969 from twangboy/win_unit_test_config
Fix `unit.config.test_config` for Windows
2017-06-28 08:18:07 -07:00
garethgreenaway
7c96200e42 Merge pull request #41967 from twangboy/win_unit_test_api
Fix `unit.config.test_api` for Windows
2017-06-28 08:17:21 -07:00
twangboy
98bc208db9 Fix paths, skip impossible 2017-06-27 17:31:23 -06:00
Andreas Ulm
76fd941d91 added tests for rabbitmq 3.6.10 output handler
Signed-off-by: Andreas Ulm <andreas.ulm@root360.de>
2017-06-28 01:13:30 +02:00
twangboy
1f497d8f78 Fix paths 2017-06-27 16:43:54 -06:00
twangboy
3eca45e000 Fix unit tests for ssh 2017-06-27 15:29:44 -06:00
Mike Place
4209be843d Merge pull request #41959 from DSRCorporation/bugs/minor_dict_diff_enhance
Minor dict diff enhance in tests.
2017-06-27 15:18:16 -05:00
Mike Place
f9965ccfcb Merge pull request #41939 from cachedout/mdadm_py3_test
Gate assert check behind mock ver
2017-06-27 13:04:23 -05:00
Mike Place
e3bfd5a593 Merge pull request #41952 from meaksh/2017.7-suse-leftovers-part-two
Fix "zypp_plugins" unit test for Python 3
2017-06-27 12:42:00 -05:00
Dmitry Kuzmenko
e01e566779 Minor: show full dict diffs if test fails. 2017-06-27 16:22:09 +03:00
Pablo Suárez Hernández
7affbce83a Fix zypp_plugins unit test for Python 3 2017-06-27 09:26:35 +01:00
Mike Place
1c74b8909e Merge pull request #41942 from terminalmage/add-maxdiff
Add maxDiff to pyobjects test for troubleshooting
2017-06-26 13:01:30 -05:00
Mike Place
e28e10ded2 Merge pull request #41914 from vutny/fix-archive-extracted-local-file-hash
archive.extracted: fix hash sum verification for local archives
2017-06-26 12:59:27 -05:00
Erik Johnson
3fac9b3b06 Add maxDiff to pyobjects test for troubleshooting 2017-06-26 12:58:49 -05:00
Mike Place
41c65b0e2c
Gate assert check behind mock ver 2017-06-26 11:04:49 -06:00
Denys Havrysh
54910fe55f archive.extracted: fix hash sum verification for local archives 2017-06-26 19:08:47 +03:00
Mike Place
ff67d47a2e Merge pull request #41516 from kstreee/fix-blocking-waiting-tcp-connection
Implements MessageClientPool to avoid blocking waiting for zeromq and tcp communications.
2017-06-26 09:41:38 -05:00
kstreee
df96969959 Removes redundant closing statements. 2017-06-26 04:58:24 +00:00
Ch3LL
9a4b3dbaba Fix some formatting 2017-06-23 18:46:25 -04:00
Ch3LL
73271ce94d Add vmware test to check new disk on seperate datastore 2017-06-23 18:36:50 -04:00
Mike Place
eb2bf865b8
Merge branch '2016_11_to_7' of github.com:cachedout/salt into 2016_11_to_7 2017-06-23 10:51:04 -06:00
Erik Johnson
61870075aa Add building_highstate odict to mock HighState class 2017-06-23 11:48:00 -05:00
Mike Place
bee68beb8e
Lint fix 2017-06-23 10:18:06 -06:00
Mike Place
00746cafce
Lint fix for win_certutil 2017-06-23 10:11:48 -06:00
Mike Place
8647086de8
Merge branch '2016_11_to_7' of github.com:cachedout/salt into 2016_11_to_7 2017-06-22 15:39:38 -06:00
Mike Place
048befb5fe
Fix lint 2017-06-22 15:36:21 -06:00
Erik Johnson
2ee43fc743 Fix default opts handling
Starting in 2017.7 the dunder dicts are handled differently in unit
tests.
2017-06-22 13:40:40 -05:00
Mike Place
7697d0d1d2
Remove merge conflict line 2017-06-22 12:35:28 -06:00
Mike Place
80cb57e02b
Fix win_certutil merge error 2017-06-22 11:40:56 -06:00
Mike Place
481797b147
Merge branch '2016.11' into '2017.7' 2017-06-21 15:49:39 -06:00
Mike Place
6e9e0714f0
Merge forward from 2016.11 to 2017 2017-06-21 14:51:02 -06:00
garethgreenaway
4a326444fe Merge pull request #41882 from Ch3LL/fix_crypt_test
Add pycryptodome to crypt_test
2017-06-21 12:51:09 -07:00
Ch3LL
6f70dbd0e1 Add pycryptodome to crypt_test 2017-06-21 13:41:12 -04:00
Mike Place
a25818b90b Merge pull request #41872 from DSRCorporation/bugs/py3_DiskTestCase
Py3: test_disk fix: don't expect dict iteration order will be the same
2017-06-21 12:09:57 -05:00
Mike Place
eea9cafba0 Merge pull request #41874 from DSRCorporation/bugs/py3_mdadm_test
Py3 mdadm test
2017-06-21 12:03:33 -05:00
Mike Place
13df29ed9b Merge pull request #41877 from Ch3LL/fix_netstat_test
Fix netstat and routes test
2017-06-21 11:16:58 -05:00
Mike Place
66f8c83c93 Merge pull request #41566 from morganwillcock/certutil
win_certutil: workaround for reading serial numbers with non-English languages
2017-06-21 10:40:28 -05:00
Mike Place
ccd81ed047 Merge pull request #41859 from DSRCorporation/bugs/py3_tests_2017.7
Py3 etcd unit test fix.
2017-06-21 10:33:15 -05:00
Mike Place
4d0f5c433d Merge pull request #41679 from terminalmage/get-top-file-envs
Prevent unnecessary duplicate pillar compilation
2017-06-21 10:32:42 -05:00
Mike Place
278b5614d0 Merge pull request #41856 from meaksh/2017.7-suse-leftovers-part-two
SUSE leftovers for 2017.7.0 RC
2017-06-21 10:24:37 -05:00
Dmitry Kuzmenko
e1e8d96ef2 Removed unneeded import. 2017-06-21 18:08:44 +03:00
Ch3LL
d2076a6c93 Patch salt.utils.which for test_route test 2017-06-21 10:55:01 -04:00
Ch3LL
51f7e107dc Patch salt.utils.which for test_netstat test 2017-06-21 10:50:03 -04:00
Erik Johnson
a916e8da49 Improve normalization of saltenv/pillarenv usage for states 2017-06-21 08:49:34 -05:00
Erik Johnson
02f293a19c Update state unit tests to reflect recent changes 2017-06-21 08:19:05 -05:00
Dmitry Kuzmenko
1401b2d5ba Py3: mdadm test fix: don't expect kwargs iteration order 2017-06-21 15:45:55 +03:00
Dmitry Kuzmenko
127e48025a Py3: tests_disk fix: don't expect dict iteration order will be the same 2017-06-21 14:48:59 +03:00
Pablo Suárez Hernández
a3e9b5cdbe Fixes mocking error 2017-06-21 11:56:36 +01:00
Dmitry Kuzmenko
596ab0421d Py3: pass Exception to side effect friendly for both mock<1.1 and mock>=1.1 2017-06-21 12:46:46 +03:00
Pablo Suárez Hernández
6eea8179ad Pylint fixes 2017-06-21 10:09:11 +01:00
Pablo Suárez Hernández
686c45b8ab Fix buggy test 2017-06-21 09:32:01 +01:00
Morgan Willcock
c337d52d0c Fix test data for test_get_serial, and a typo 2017-06-21 00:26:47 +01:00
twangboy
a2c4ff0ebc Don't run coverage it not admin 2017-06-20 15:32:55 -06:00
Morgan Willcock
7f6961378e test and lint fixes 2017-06-20 22:30:11 +01:00
Mike Place
4f8714037d Merge pull request #41851 from DSRCorporation/bugs/py3_tests_nitrogen
Minor Py3 related tests fixes.
2017-06-20 15:11:43 -05:00
Dmitry Kuzmenko
c25ebe3a6e Py3: fix test for Py34. Fixed the etcd util error case handling. 2017-06-20 21:47:51 +03:00
Mike Place
f04888d88f Remove unused import 2017-06-20 12:15:50 -06:00
Dmitry Kuzmenko
ea1a351f5f Code review fixup. 2017-06-20 20:26:58 +03:00
Mike Place
594b7631f7 Merge pull request #41850 from DSRCorporation/bugs/py3_tests_2017.7
Py3 tests fix for 2017.7
2017-06-20 12:17:28 -05:00
Michael Calmer
24bad5b078 translate variable arguments if they contain hidden keywords (bsc#1025896)
- includes a test
2017-06-20 17:28:39 +01:00
Bo Maryniuk
1c817bb6c9 Add zypp-notify plugin
* Add unit test to the libzypp drift detector plugin
2017-06-20 17:18:31 +01:00
Mike Place
f720a849ba Merge pull request #41795 from isbm/isbm-suse-upstream-leftovers
Things, that didn't made to 2017.7 for some reasons
2017-06-20 09:28:21 -05:00
Dmitry Kuzmenko
ea656e92c6 Py3: Disabled augeas test that segfaults the test suite.
Because of a bug in python-augeas:
https://github.com/hercules-team/python-augeas/issues/30
2017-06-20 16:59:38 +03:00
Dmitry Kuzmenko
5a1bdd368e Py3: minor tests updates
Correct skipping explanation and correctly disable by proper conditions.
BTW, mysql works on Py3. There's a port of python-mysql and test passes.
2017-06-20 16:59:38 +03:00
Dmitry Kuzmenko
2cff18e2ef Py3: fix boto elb test 2017-06-20 16:59:38 +03:00
Dmitry Kuzmenko
9de940d3d3 Py3: don't use mock.assert_called_once implemented in 3.6. 2017-06-20 16:34:22 +03:00
Dmitry Kuzmenko
e079b4657a Py3: PyDSL test fix. Ignore kwargs order. 2017-06-20 14:29:00 +03:00
Mike Place
58387b127a Merge pull request #41786 from whiteinge/runner-arg-parsing-regressions
Runner arg parsing regressions
2017-06-19 18:00:06 -05:00
Mike Place
f1def17e8e Merge pull request #41836 from DSRCorporation/bugs/py3_disable_pytest_log_handler
Temporary POC: disable runtests log handler for Py3 tests.
2017-06-19 17:21:42 -05:00
Nicole Thomas
c84a6f36f4 Merge pull request #41808 from gtmanfred/py3
Fix last of the failing mac/py3 tests
2017-06-19 13:57:32 -06:00
Dmitry Kuzmenko
dd4273e268 Temporary POC: disable runtests log handler for Py3 tests. 2017-06-19 22:26:06 +03:00
Mike Place
5bc7a20327 Missing colon 2017-06-19 10:52:45 -06:00
Mike Place
a3efd53371 Merge pull request #41784 from gtmanfred/2017.7
use our own mock_open
2017-06-19 11:25:07 -05:00
Mike Place
445f603568 Fix incorrect indentation 2017-06-19 09:37:00 -06:00
Bo Maryniuk
fe97520bc7 Merge branch '2017.7' into isbm-suse-upstream-leftovers 2017-06-19 15:21:13 +02:00
Bo Maryniuk
b08d790ede Lintfix: wrap lines over 120 chars 2017-06-19 14:54:22 +02:00
Bo Maryniuk
25686352bd emove openstack_test UT in favour of test_openstack 2017-06-19 14:03:09 +02:00
Bo Maryniuk
3845c84e65 Remove nova_test UT in favour of test_nova 2017-06-19 14:02:21 +02:00
Bo Maryniuk
6220380c3d Remove an older version of the unit test 2017-06-19 14:00:52 +02:00
Bo Maryniuk
d834bc2c8b Remove old tester. 2017-06-19 13:57:54 +02:00
Nicole Thomas
4dedf01956 Merge pull request #41811 from rallytime/bp-41806
Back-port #41806 to 2017.7
2017-06-16 16:48:39 -06:00
Ed Pelc
a536111b83 add tests for single docker log_config option fix 2017-06-16 14:57:17 -06:00
Daniel Wallace
4bf030ff65 don't break py2 2017-06-16 13:11:51 -06:00
rallytime
58262608cd Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/config/__init__.py
  - salt/master.py
  - salt/modules/zypper.py
  - tests/unit/modules/timezone_test.py
2017-06-16 10:43:02 -06:00
Daniel Wallace
b65edc786c handle unordered sets in unique jinja tests 2017-06-16 08:40:40 -06:00
Pablo Suárez Hernández
fb444db0f2 Search the entire CACHE_DIR because storage paths change across versions
Prevents zero length error on Python 2.6

Fixes Zypper unit test

Enhances pkg.list_downloaded information of a package

Listing all patches instead of security ones only

Adapting Zypper test to new list_downloaded output

Fixes zypper test error after backporting

Pylint fixes
2017-06-16 15:28:42 +02:00
Pablo Suárez Hernández
27ef83fd62 Adding support for installing patches in yum/dnf execution module
Adding support for installing patches in Zypper module

Adding list_downloaded function to Zypper module

Adding list_downloaded function to Yum module

Adding new pkg.downloaded state

Adding documentation for pkg.downloaded state

Adding pkg.patched and pkg.patch_downloaded states

Check targets for advisory patches installation

Adds support for listing advisory patches with Zypper

Adds support for listing advisory patches with Yum

Improving function naming

Moving advisory ids checks into pkg_resource.parse_targets

Fixes _find_download_targets to call _preflight_check

Fixes parse_targets when advisory id is passed as name

Pylint fixes

Enables pkg.downloaded to verify packages after package manager call.

Adding missing kwargs parameters to pkg.install call

Adding versionadded flags

Some refactoring and minor fixes

Adding unit tests for Zypper execution module

Adding more unit tests for Zypper module

Pylint fix
2017-06-16 15:28:10 +02:00
Peter V. Saveliev
4761e711fe clean up change attribute from interface dict
The attribute is hidden in IPDB from the high-level logics since
pyroute2 version 0.4.2.

Bug-Url: https://github.com/saltstack/salt/issues/41461

unit tests: add pyroute2 interface dict test

Bug-Url: https://github.com/saltstack/salt/pull/41487
Bug-Url: https://github.com/saltstack/salt/issues/41461

unit tests: fix absolute imports in test_pyroute2

Bug-Url: https://github.com/saltstack/salt/pull/41533

unit tests: add encoding clause into test_pyroute2

Bug-Url: https://github.com/saltstack/salt/pull/41533

unit tests: test_pyroute2 -- add skipIf

... and comments

Bug-Url: https://github.com/saltstack/salt/pull/41533

Update new pyroute2 unit test to conform with 2016.11 branch standards
2017-06-16 14:39:08 +02:00
Michael Calmer
f7cd2f6722 Fix os_family case in unittest 2017-06-16 14:39:08 +02:00
Bo Maryniuk
e9de0746ae Fix grain for os_family on SUSE series 2017-06-16 14:39:08 +02:00
Bo Maryniuk
2d8c9883ff Use correct grain constants for timezone
Adjust the test so it is using the right grain for SUSE systems

Bugfix: use correct grain constant for platform

Refactor with setup/teardown

Add UT for RedHat's set_zone

Fix doc for RH UT

Remove unnecessary mock patch

Doc fix

Add UT for set_zone on SUSE series

Adjust UT to use correct grain for SUSE series

Bugfix: use correct os_family grain value for SUSE series

Add UT for gentoo on set_zone

Add UT for Debian on set_zone

Remove duplicate code

Add UT for get_hwclock on UTC/localtime

Remove dead code

Add UT for get_hwclock on SUSE platform

Bugfix: use correct grain for SUSE and RedHat platform

Add UT for RedHat/SUSE platforms on get_hwclock

Add UT for Debian on get_hwclock

Add UT on Solaris

Add UT for AIX on get_hwclock

Add UT for set_hwclock on AIX

Fix docstrings

Add UT for set_hwclock on solaris

Add UT for set_hwclock on Arch

Add UT for set_hwclock on RedHat

Fix UT names

Add UT set_hwclock on SUSE

Bugfix: use correct grain name for SUSE platform

Add UT for set_hwclock on Debian

Add UT on set_hw_clock on Gentoo

Fix lint issues

Rewrite test case for using no patch decorators

Disable the test for a while

Do not use multiple variables in "with" statement as of lint issues
2017-06-16 14:39:08 +02:00
Bo Maryniuk
23d2aca59b Add unit test for skip false values from preferred_ip
- Add fake preferred IP function for testing
- Add initial unit test for openstack cloud module
- Move out nested function to be unit-testable
- Lintfix
- Add unit test for nova connector
- Move out nested function for testing purposes
- Fix name error exception
- Skip test, if libcloud is not around
- Add unit test for node ip filtering
- Lintfix E0602
- Fix UT parameter changes
- Fix lint, typos and readability
- PEP8: fix unused variable
- Reformat idents, fix typos
- Describe debug information
2017-06-16 14:39:08 +02:00
Piotr Kaźmierczak
ea4d085694 fixing beacons.list integration test failure 2017-06-16 14:39:08 +02:00
Daniel Wallace
05f2c66604 handle bytes strings in mock_open 2017-06-15 22:43:40 -06:00
Daniel Wallace
4f7c6d1161 use our own mock_open
test.support.mock.mock_open specifies a side effect so that if you constantly
read a mocked open call, it will only iterate through it once, and then after
it will appear as if the end of the file has been reached.

This is needed for salt.modules.cp.push to be tested correctly.
2017-06-15 17:50:35 -06:00
Seth House
9d1cc1a176 Add test to check that runners ignore invalid kwargs
I dunno if this is what we want long-term but this tests current
behavior.
2017-06-15 17:40:38 -06:00
Mike Place
b12611d122 Merge pull request #41617 from cro/n_proxy_tests
Port salt-proxy tests to the testsuite changes in Nitrogen.
2017-06-15 12:07:29 -05:00
Mike Place
d8b83af3d6 Merge pull request #41745 from terminalmage/fix-runtests-helpers
Fix runtests_helpers.modules_available when multiple modules passed
2017-06-15 10:14:16 -05:00
Mike Place
c58f3811ce Merge pull request #41746 from rallytime/version-added-nitrogen
Update Nitrogen references to 2017.7.0
2017-06-15 10:12:18 -05:00
rallytime
b6cc0b6bf0 Manually backport the changes in PR #41615
The automatic back-porting process did't work for this file since the
testing file has been renamed. I manually added the changes to
`timezone_test.py` that were present in PR #41615.
2017-06-15 08:53:25 -06:00
rallytime
33905fd520 Disable new part of test_exit_status_correct_usage test for now
This new part of the test_exit_status_correct_usage test was added
in PR #41382. This test, along with some memory leakage for the
test running in Python 3, has exposed an underlying issue with
Minion._thread_return subprocessing in the test suite. Due to this
issue, this test is extremely flaky.

Per @DmitryKuzmenko's recomendation in https://github.com/saltstack/salt-jenkins/issues/378,
this test should be commented out for the time being. He is planning
on coming back to this issue to uncomment the test once the underlying
problem has been resolved.
2017-06-15 08:44:34 -06:00
Nicole Thomas
2c24012ded Merge pull request #41753 from rallytime/bp-41449
Back-port #41449 to 2016.11
2017-06-14 16:16:10 -06:00
Sébastien Wains
fae41c2875 Adjusting SVN unit test 2017-06-14 13:40:50 -06:00
rallytime
16a2747d7d Merge branch '2016.11' into '2017.7'
Conflicts:
  - pkg/windows/buildenv/salt.bat
  - salt/modules/pillar.py
  - salt/utils/openstack/nova.py
  - tests/unit/cloud/clouds/test_dimensiondata.py
  - tests/unit/cloud/clouds/test_gce.py
2017-06-14 13:31:42 -06:00
rallytime
89834e49c2 Merge branch '2016.3' into '2016.11'
Conflicts:
  - conf/master
  - salt/utils/schedule.py
2017-06-14 13:24:11 -06:00
Erik Johnson
bdaeb55a77 Merge pull request #40902 from lorengordon/pillar-get-merge-lists
Removes duplicates when merging pillar lists and adds pillar.get override for pillar_merge_lists
2017-06-14 13:39:08 -05:00
rallytime
2b51a20d02 Replace "nitrogen" references with 2017.7.0, too! 2017-06-14 12:20:45 -06:00
Erik Johnson
5c970d81e5 Fix runtests_helpers.modules_available when multiple modules passed
tests.support.helpers passes the single-asterisk tuple of args as
individual arguments to runtest_helpers.modules_available. This breaks
tests which pass more than one argument to the requires_salt_modules
decorator.

This has been fixed by making runtests_helpers.modules_available accept
an arbitrary number of args via using a single-asterisk.
2017-06-14 13:16:30 -05:00
rallytime
b0145578bf Update Nitrogen references to 2017.7.0 for states, utils, tests directory
Also updated version.py with release tuple
2017-06-14 11:54:27 -06:00
rallytime
1e9a06000b Bump version check down to 1.4.0 and use distutils.version lib 2017-06-14 09:30:22 -06:00
Loren Gordon
6e35673fe3 Preserves order when removing duplicates 2017-06-13 17:45:08 -04:00
Loren Gordon
18eda7084c Updates list merge tests to check for sorted, unique lists 2017-06-13 17:45:08 -04:00
Mike Place
10b68e9375 Merge pull request #41698 from rallytime/flaky-decorator-tcp-test
Add flaky decorator to test_badload in tcp unit tests
2017-06-13 16:13:44 -05:00
rallytime
a30f654b04 Support apache-libcloud work-around for issue #32743 for versions older than 2.0.0
If apache-libcloud 2.0.0 is installed, the workaround outlined in issue #32743
no longer applies and should be avoided. However, we still need to support older
versions of apache-libcloud that need this work-around.

The minimum version required of apache-libcloud has been updated to 2.0.0 in pull
request #40837, which will released in Oxygen. #40837 has removed all of the
work-arounds needed for issue #32743 for 2.0.0. Until Oxygen is released, however,
we need to support both the work-around for older versions of apache-libcloud as
well as 2.0.0.
2017-06-13 14:22:32 -06:00
rallytime
bdf33d7f5f Merge branch '2016.11' into 'nitrogen'
No conflicts.
2017-06-13 09:26:05 -06:00
Nicole Thomas
740e933028 Merge pull request #41703 from gtmanfred/nitrogen
mark all mac power tests as flaky
2017-06-12 16:03:15 -06:00
Daniel Wallace
0fa380f75c npm 5 and greater requires --force for cache clean
This is the error

```
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and
data extracted from the cache is guaranteed to be valid. If you want to make
sure everything is consistent, use 'npm cache verify' instead.

npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command
with --force.
```
2017-06-12 14:48:43 -06:00
Daniel Wallace
b202505923 mark all mac power tests as flaky
After talking to @cro, all of the mac power modules became super flaky in
Sierra.  Because of this, I am marking all of the mac power tests with the
flaky decorator.
2017-06-12 13:34:12 -06:00
C. R. Oldham
628f709c3c Correct test--caching requires files on disk but the test just supplies
what would have been read from disk.
2017-06-12 12:55:14 -06:00
rallytime
67f0c17da3 Add flaky decorator to test_badload in tcp unit tests 2017-06-12 11:10:22 -06:00
Erik Johnson
a29b458416 Update orphan finding code to handle differences in psutil on PY3
This should fix the remainder of the test flakiness for
integration.shell.test_proxy.ProxyTest.test_exit_status_correct_usage
2017-06-09 15:20:23 -05:00
Gareth J. Greenaway
08a92e041e Removing rogue file that shouldn't be referenced 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
53a216378c Fixing the last text failure. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
4d3399c6c4 Couple more typos, assert not asset. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
14a903ef61 Fixing typo in assertSaltTrueReturn, assertSaltFalseReturn and assertSaltNoneReturn. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
a531d01b26 Updating the assert tests for develop based on changes from 41569. 2017-06-09 09:16:09 -06:00
Nicole Thomas
c292b1161f Lint: quick fix to add missing blank line 2017-06-08 16:04:59 -06:00
Daniel Wallace
5010e1a89d Disable libcloud test if the module doesn't load
This is causing the mac tests to fail.  apache-libcloud 0.20.1 is what is being
imported, and the libcloud_dns module is not being used.
2017-06-08 11:27:24 -06:00
Erik Johnson
0428617b52 Wait for orphans in test_exit_status_correct_usage
Also ensure that the shutdown will be run even when assertions fail
2017-06-08 00:44:52 -05:00
Erik Johnson
cb91437b08 Add wait_for_orphans to testprogram classes
This allows for the shutdown function to also terminate any orphaned
processes which were spawned during the time between when
terminate_process is invoked, and when the processes are actually
killed.
2017-06-08 00:25:53 -05:00
Erik Johnson
846200f11e Include terminate_process_list in import 2017-06-08 00:24:53 -05:00
Mike Place
143dad59af Merge pull request #41408 from s0undt3ch/nitrogen
Partially revert 1b84bee06. Fixes #40517
2017-06-07 12:05:25 -05:00
Mike Place
45326ccdec Merge pull request #41621 from gtmanfred/mac
Fix some mac tests
2017-06-07 10:19:25 -05:00
Erik Johnson
913450bd45 Merge pull request #41620 from Ch3LL/skip_mac_git
Skip git_pillar tests on MacOSX
2017-06-07 09:07:01 -05:00
Nicole Thomas
832b96ea05 Merge pull request #41614 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-06-06 18:42:44 -06:00
rallytime
8aaadd8787 Revert "Update new pyroute2 unit test to conform with 2016.11 branch standards"
This reverts commit 535b8e8d8e.
2017-06-06 16:35:12 -06:00
Ch3LL
0e35605f20
Skip git_pillar tests on MacOSX 2017-06-06 17:17:57 -04:00
Mike Place
8f9ba1f258 Merge pull request #41615 from Ch3LL/fix_mac_clock
Fix get_hwclock_aix test on MacOSX
2017-06-06 15:52:32 -05:00
C. R. Oldham
4540f82aaa Port salt-proxy tests to the testsuite changes in Nitrogen. 2017-06-06 13:49:16 -06:00
Daniel Wallace
b25b487ceb create home directory for issue-1959
Fixes https://github.com/saltstack/salt-jenkins/issues/388
2017-06-06 13:32:57 -06:00
Ch3LL
ea147701f4
Fix get_hwclock_aix test on MacOSX 2017-06-06 15:06:08 -04:00
rallytime
1a40e105e5 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - tests/integration/__init__.py
  - tests/integration/modules/test_state.py
2017-06-06 12:57:44 -06:00
Mike Place
53ecb5c4b0 Merge pull request #41553 from terminalmage/issue41527
Fix installing RPMs via remote URLS which are 30x redirects
2017-06-06 13:23:41 -05:00
Daniel Wallace
fd23f7dad3 Mark known flaky mac power test 2017-06-06 12:19:45 -06:00
Mike Place
b720ecb732 Merge pull request #41569 from gtmanfred/fix_test_result_check
Check all entries in result
2017-06-06 13:18:16 -05:00
Ch3LL
8d27bb31b2
Disable home dir check for mac in more test_user tests 2017-06-06 11:20:18 -04:00
Ch3LL
85e77c9cc8
Disable home dir check for mac in test_user 2017-06-06 11:02:19 -04:00
rallytime
535b8e8d8e Update new pyroute2 unit test to conform with 2016.11 branch standards 2017-06-05 20:55:44 -06:00
Nicole Thomas
ebfc9f214a Merge pull request #41594 from Ch3LL/fix_mac_check_cmd
change group to wheel for macosx in tests
2017-06-05 20:45:02 -06:00
Nicole Thomas
be0683de78 Merge pull request #41595 from gtmanfred/nitrogen
Make sure runtests_engine is ASCII text
2017-06-05 20:43:50 -06:00
Nicole Thomas
fa9d7015ca Merge pull request #41589 from Ch3LL/fix_locale_map
Skip locale tests on MacOSX
2017-06-05 20:42:48 -06:00
Mike Place
d7fe4ba7a9 Merge pull request #41592 from terminalmage/py3-tests
Kill child PIDs when shutting down a testprogram daemon
2017-06-05 19:01:49 -05:00
Daniel Wallace
19ea5481b6 remove test that never passed 2017-06-05 17:45:23 -06:00
Daniel Wallace
f309bae8b4 Make sure runtests_engine is ASCII text
If this is has any unicode characters in it, it won't load on systems that do
not default to a unicode locale.

find . -type f | while read line; do ret=$(file $line); if [[ $ret == *UTF-8* && $line == *.py ]]; then echo $line; fi; done

The above will list all files that have unicode characters in it and won't load
with locale set to C or POSIX
2017-06-05 17:30:28 -06:00
Peter V. Saveliev
5c86dee73c unit tests: test_pyroute2 -- add skipIf
... and comments

Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
026b39493f unit tests: add encoding clause into test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
9ab203d54b unit tests: fix absolute imports in test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
1f507cfa7a unit tests: add pyroute2 interface dict test
Bug-Url: https://github.com/saltstack/salt/pull/41487
Bug-Url: https://github.com/saltstack/salt/issues/41461
2017-06-05 17:22:48 -06:00
Erik Johnson
8e380679cc Kill child PIDs when shutting down a testprogram daemon
This fixes the test failures recently observed in
integration.shell.test_master.MasterTest.test_exit_status_correct_usage.
The test failures were not a regression, but rather a symptom of a
greater problem with the TestProgram class' shutdown() func. When
terminating the process using the terminate_process helper from
pytest-salt, it does not pass kill_children, which defaults to False.
This makes the helper only kill the main PID, leaving all the other PIDs
running.

This means that every time the integration suite was being run, each
time the TestProgram class was used to spawn a temporary daemon, it
would leave all the child PIDs running when the shutdown() is invoked.

By passing kill_children=True, we ensure that the child PIDs are also
killed. This should provide a significant perfomance improvement in the
test suite.
2017-06-05 16:38:23 -05:00
Ch3LL
ddcb1ca9a7
change group to wheel for macosx in tests 2017-06-05 17:16:54 -04:00
Ch3LL
8c10cbd01d
Skip locale tests on MacOSX 2017-06-05 15:57:20 -04:00
rallytime
903e2f9922 Merge branch '2016.11' into 'nitrogen'
No conflicts.
2017-06-05 13:38:51 -06:00
Nicole Thomas
cc6c98a8d8 Merge pull request #41509 from seanjnkns/fix-keystone-v3-endpoint_present
Add keystone V3 API support for keystone.endpoint_present|absent
2017-06-02 21:01:05 -06:00
Daniel Wallace
e2a4d5e1e2 Check all entries in result
Without this change, we ony check the first return from state tests, if
there is more than one state run, we do not check subsequent tests.
2017-06-02 17:26:07 -06:00
Nicole Thomas
a49348cc89 Merge pull request #41535 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-06-01 16:25:35 -06:00
Erik Johnson
c512142899 Add integration test for cp.cache_file 2017-06-01 17:20:58 -05:00
Pedro Algarvio
451d8f98e3
The file listing needs to be sorted to return expectable results.
This seems like the only reasonable way to override, for example, grains.
Grains from `custom_grains_2` should override grains from `custom_grains_1`.
2017-06-01 18:47:22 +01:00
rallytime
cb69296f55 Remove test_win_firewall unit tests: they don't actually test anything 2017-06-01 10:07:23 -06:00
Dmitry Kuzmenko
7ba25db473 Replace assertCountEqual not-implemented in Py2 2017-06-01 16:52:09 +03:00
Dmitry Kuzmenko
64954d8e40 Fixed pylint errors. 2017-06-01 16:49:57 +03:00
Dmitry Kuzmenko
2ae68ee591 Added cache test.
Implemented some time ago, but forgotten.
2017-06-01 16:49:57 +03:00
Dmitry Kuzmenko
4a2406f178 Py3: fixed some tests.
tls module: convert bytes to string
gzip util: use BytesIO for 'wb' file
django module: ignore arguments order in assert
pillar module: correctly test pillar merge
2017-06-01 16:49:57 +03:00
Dmitry Kuzmenko
fef0e0ea67 Catch errors on socket.shutdown.
It throws an exception if the socket wasn't connected.
2017-06-01 16:49:57 +03:00
Dmitry Kuzmenko
2b3276077c Py3: Fixed schema serialization. Enabled tests back. 2017-06-01 16:49:49 +03:00
Sergey Kizunov
07d5862773 unit.transport.tcp_test: Clean up channel after use
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-05-31 18:30:19 -05:00
Sean Jenkins
095e5949a3 Fix unit tests for PR #41509 2017-05-31 17:22:07 -06:00
rallytime
63ea033ec3 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/win_status.py
  - salt/states/selinux.py
  - tests/unit/modules/test_ssh.py
2017-05-31 14:29:12 -06:00