Commit Graph

871 Commits

Author SHA1 Message Date
Pedro Algarvio
3bf84e2a4e
Rename classes in order not to be collected up by pytest 2017-04-28 13:33:34 +01:00
Pedro Algarvio
1d8f02f635
Drop @patch usage. Py3 Compat. 2017-04-28 13:33:32 +01:00
Nicole Thomas
b735b8f574 Merge pull request #40603 from kiorky/fix40602
Fix #40602: onfail_stop: test loop order is broken
2017-04-12 10:06:55 -06:00
Mike Place
5c2be60d7b Space for lint 2017-04-11 16:46:38 -06:00
Ronald van Zantvoort
24adf57814 DNS2: pylint fixes 2017-04-11 14:52:16 +02:00
Ronald van Zantvoort
4e573a93e6 DNS2: Add some docs 2017-04-11 13:17:51 +02:00
Ronald van Zantvoort
fba643a64f DNS2: Add nslookup tests 2017-04-11 13:11:35 +02:00
Ronald van Zantvoort
8e37eab1cb DNS2: Raise ValueError on wrong DNS type plus testing 2017-04-11 11:03:19 +02:00
Ronald van Zantvoort
f9d3fbb379 DNS2: Re-add DNSSEC test, add tests for host 2017-04-11 09:02:53 +02:00
Mathieu Le Marec - Pasquet
80d9482248 Fix #40602: onfail_stop: test loop order is broken 2017-04-10 10:22:03 +02:00
Ronald van Zantvoort
9dff676f8f DNS2: bugfixes, cleanup, drill tests 2017-04-06 10:13:01 +02:00
Ronald van Zantvoort
e3239d90cf DNS2: dig lookup testing 2017-04-06 10:13:00 +02:00
Ronald van Zantvoort
a30dd2ed0c DNS2: Add tests for getaddrinfo() 2017-04-06 10:13:00 +02:00
Ronald van Zantvoort
5a77b2520f DNS2: Add first batch of unit tests 2017-04-06 10:13:00 +02:00
Nicole Thomas
4d7871e4d7 Merge pull request #40494 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-04-05 14:15:05 -06:00
Pedro Algarvio
7b713d9256
Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
Pedro Algarvio
dcf0a55daf
Use the test run temporary path, not the system temporary path 2017-04-04 18:58:21 +01:00
Pedro Algarvio
61003bca0a
Take care of resource leakage on tests 2017-04-04 18:58:20 +01:00
Pedro Algarvio
2ee6d5d589
Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
Pedro Algarvio
8031ac0209
Move mixins to tests.support.mixins.
The adapted config mixin get config methods are not static methods
2017-04-04 17:29:34 +01:00
Mike Place
6056ee302a Merge pull request #40339 from s0undt3ch/features/py3-pt2
[WIP] Move unit tests which were in integration tests - More py3 and mocking fixes
2017-04-04 10:21:46 -06:00
rallytime
24e812add6 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/cache/__init__.py
  - salt/grains/core.py
  - salt/utils/gitfs.py
  - tests/unit/cache/test_localfs.py
  - tests/unit/modules/test_ssh.py
2017-04-03 10:17:11 -06:00
Pedro Algarvio
9fd126c904
Use a temporary configuration instead 2017-04-01 18:58:03 +01:00
Pedro Algarvio
4f068f5217
Misplaced test. Use tests.support.unit instead. 2017-04-01 14:23:00 +01:00
Pedro Algarvio
a15aa32404
Proper mocking. 2017-04-01 14:22:59 +01:00
Pedro Algarvio
9a11538b54
Stop using deprecated TestCase methods 2017-04-01 14:22:57 +01:00
Pedro Algarvio
f9b58aa2e2
This is not an integration test. Skip test.
Skipping tests since I have no clue what is supposed to be tested here
with that `raise Exception(ret)` at the end.
2017-04-01 14:22:53 +01:00
Pedro Algarvio
cde0af757e
Update tests to the new sorting 2017-04-01 14:22:53 +01:00
Pedro Algarvio
dc7169f8bd
Rename decorators in order not to be picked up by pytest as test cases 2017-04-01 14:22:53 +01:00
rallytime
0da4c46b68 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/utils/__init__.py
  - salt/utils/gitfs.py
  - tests/unit/modules/ssh_test.py
2017-03-31 09:59:59 -06:00
Mathieu Le Marec - Pasquet
0c7317e6ea Add a flag to mark onfail states as handlable 2017-03-31 00:22:59 +02:00
Mathieu Le Marec - Pasquet
fa2f9cf7bd Make returncode friendly to onfail requisites
Ensure that correctly handled states execution (via onfail)
will return a 0 code if onfail requisites suceed.
2017-03-31 00:22:51 +02:00
Nitin Madhok
dd62310941 Adding unit tests for vmware_test 2017-03-30 00:54:57 -04:00
Nitin Madhok
034ef30f7c Remove old vmware unit tests 2017-03-30 00:53:09 -04:00
Erik Johnson
cafa08d8e0 Add ability for salt.utils.path_join to force the use of posixpath
Also remove unused and unnecessary behavior from this function when the
first path component is of single length. An empty first parameter to
this function will normalze to "." and result in an incorrectly-joined
result.
2017-03-28 14:18:29 -05:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage 2017-03-28 19:03:59 +01:00
Pedro Algarvio
278275cf37
Fix StringVersion and LooseVersion. Add unit tests. 2017-03-28 19:00:52 +01:00
Pedro Algarvio
1f7a0aa65b
Proper mocking 2017-03-28 19:00:51 +01:00
rallytime
62b31d7620 Pylint fixes 2017-03-23 10:00:20 -06:00
rallytime
235a768872 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/returners/influxdb_return.py
  - salt/states/dockerng.py
  - salt/utils/schedule.py
  - tests/unit/modules/test_docker.py
  - tests/unit/states/dockerng_test.py
  - tests/unit/utils/test_schedule.py
2017-03-22 17:44:08 -06:00
Erik Johnson
5ad476936d Overhaul Docker support
This does the following:

- Splits states for container/volume/image/network management into four
  separate state modules.

- Preserves backward compatibility by making ``docker.image_present``
  invoke ``docker_image.present``, etc.

- Changes how Salt detects that a container needs to be replaced.
  Instead of comparing each passed argument to the named container's
  configuration, it creates a temporary container, and compares that
  container to the named container. If the two differ, then the older
  container is removed, and the new one is renamed and started, becoming
  the named container.

- Removes the unit tests for container management and replaces them with
  integration tests.

- Adds unit tests for the new salt.utils.docker
2017-03-21 16:53:19 -05:00
Bo Maryniuk
9e5bf58e42 Fix test: underscore alias is found 2017-03-21 10:49:18 +01:00
Bo Maryniuk
bceb6d0f56 Add with_deprecated test misconfiguration 2017-03-21 10:48:54 +01:00
Bo Maryniuk
54416ed2e8 Add with_deprecated test with opt-in policy configured 2017-03-21 10:47:26 +01:00
Bo Maryniuk
9f8bb257df Add with_deprecated test with opt-in policy by default 2017-03-21 10:46:53 +01:00
Bo Maryniuk
66dff82062 Fix unit test: log messages has been changed 2017-03-21 09:29:48 +01:00
Vyacheslav Spiridonov
9d5db1910c fix initial data structure for schedule tests 2017-03-15 21:02:08 +03:00
Vyacheslav Spiridonov
d3a2489c9c schedule tests to ensure pillar jobs are not modified 2017-03-15 18:36:15 +03:00
Pedro Algarvio
0b41b92d7d
Use salt.utils.versions instead of distutils.version 2017-03-08 19:22:33 +00:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
f9015ff1e4
Don't even try to concatenate non string types 2017-02-24 09:11:21 +00:00
Pedro Algarvio
b0794617c5
Fix unit.utils.test_warnings after the rename changes 2017-02-23 23:19:45 +00:00
Pedro Algarvio
cb7a25e4a2
Somehow salt.utils.boto3 is "landing" as boto3 in sys.modules 2017-02-23 23:19:43 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00
Pedro Algarvio
e48ea8fa1b
Don't use assert_called_once() or assert_not_called().
These worked in Py2 but not in Py3.
A read of http://engineroom.trackmaven.com/blog/mocking-mistakes/ specially the section "Mocking the unexpected" will enlighten one.
2017-02-23 10:40:58 +00:00
Sergei Zviagintsev
ad5b52ce3c Add unit test for salt.utils.cloud.check_key_path_and_mode 2017-02-22 11:38:40 +01:00
Pedro Algarvio
20882bfcb4
These tests require root for default paths and create directories if non existing 2017-02-17 20:48:57 +00:00
Pedro Algarvio
c093d97a93
Only run the ascii case on Py2 2017-02-17 20:48:55 +00:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Erik Johnson
d35c2f810c salt.utils.gitfs: remove dulwich support, make refspecs configurable (#39210)
* Add config params for custom refspecs

* Add exceptions for errors encountered modifying git config

* Make the refspecs a configurable parameter

* Make refspecs a per-remote parameter

* Update master config template to include custom refspecs opts

* Add documentation for new config params

* Update GitFS walkthrough with a section on custom refspecs

* Remove dulwich support from salt.utils.gitfs

Dulwich still lacks important features, including (but not limited to)
the following:

- Lack of the necessary support for checking out a ref needed for
  git_pillar/winrepo support

- No support in its config objects for multivar git config items, making
  it impossible to detect when repos have multiple refspecs set for a
  given git remote

Given this information, and the fact that it trails as a distant third
to Pygit2 and GitPython, Salt will cease to support Dulwich as a git
interface moving forward.

* Excise references to dulwich from documentation

* Add mention of custom refspecs to Nitrogen release notes

* Add gitfs_refspecs to mocked opts in gitfs integration tests

Also remove dulwich from unit tests

* Add information about opts argument not being intended for CLI use
2017-02-09 09:50:45 -07:00
rallytime
a9c2c106c1 Pylint fix 2017-02-09 08:50:56 -07:00
rallytime
f6aad99db2 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/loader.py
  - salt/output/highstate.py
  - salt/runners/fileserver.py
2017-02-08 16:57:54 -07:00
Erik Johnson
1b9217d636 Update jsonschema tests to reflect change in jsonschema 2.6.0 (#39260)
Version 2.6.0 changed the wording of one of the exceptions tested,
causing tests to fail when jsonschema 2.6.0 is installed. This commit
updates the tests to change the assert for 2.6.0 and later.
2017-02-08 16:51:56 -07:00
rallytime
fc3c9182ae [PY3] Fix find module unit tests
These unit tests exposed a bunch of python 3 incompatibilities in the
filebuffer util as well as the find util. The filebuffer changes should
be reviewed carefully.
2017-01-27 14:59:24 -07:00
rallytime
e91fcbeaac Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/minion.py
  - salt/modules/dockerng.py
  - salt/thorium/key.py
2017-01-26 16:02:06 -07:00
Nicole Thomas
ca090fff1a Add new logging options to parsers_test mock for develop (#38974) 2017-01-26 12:47:23 -07:00
Bo Maryniuk
a112b790fe Fix typo 2017-01-25 21:15:05 +01:00
rallytime
49f57ba3f1 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/utils/win_functions.py
2017-01-25 09:59:29 -07:00
Bo Maryniuk
47a16916c3 Add unit test 2017-01-25 15:44:38 +01:00
Alexander Weidinger
30fe5641c7 fix parsing of sockstat -4 2017-01-22 02:06:25 +01:00
rallytime
3f74d697b9 Merge branch '2016.11' into 'develop'
Conflicts:
  - pkg/windows/build_pkg.bat
  - salt/modules/archive.py
2017-01-20 12:07:19 -07:00
rallytime
ce6d1b103d Make sure we're using the opts dict mocking in parsers_test
The additional call to parser.parse_args(args) negates the first
patch to running self.config_func. We want the opts that we set
up in the above test to patch the setup args when the parse_args
func is called. This updates the mock to work with better with
patch and removes the additional parser.parse_args call.
2017-01-20 10:20:51 -07:00
rallytime
315b2c8712 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/win_system.py
  - tests/unit/modules/win_system_test.py
2017-01-18 14:16:45 -07:00
Denys Havrysh
9bd203ffcc Fix #38388
If `log_level_logfile` is not set explicitly it should inherit the
level set by `log_level` configuration option.
2017-01-18 19:16:38 +02:00
rallytime
494a06bee2 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-12-20 10:03:44 -07:00
Alexey Aksenov
42d3d26f28 [38073] Fix test assertion 2016-12-16 13:37:50 +03:00
Alexey Aksenov
9b37ead913 Fix broken os.write without string.encode
Fixes #38048
2016-12-16 13:33:59 +03:00
rallytime
05ec9f4b5b Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/netapi/rest_cherrypy/app.py
2016-12-15 20:47:35 -07:00
Alexey Aksenov
70c8db5489 Fix decoding of broken string from remote sources
Fixes #38070
Suggest to replace incorrect UTF symbols with the special replacement character.
This would simplily interation with broken things in the real world.
https://docs.python.org/3/howto/unicode.html#the-unicode-type
2016-12-15 14:33:33 +03:00
Alexandru Bleotu
7b0f6df8d8 Fixed test with new get_cluster call 2016-12-09 11:55:20 -05:00
Alexandru Bleotu
38b3ebf434 Fix pylint errors in tests for utils.vmware.get_hosts 2016-12-09 11:53:27 -05:00
Alexandru Bleotu
0ea033d21d Added tests for utils.vmware.get_hosts 2016-12-09 10:04:24 -05:00
rallytime
4998b8d116 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/peer.rst
  - doc/topics/reactor/index.rst
2016-12-07 16:31:11 -07:00
rallytime
342884018b Fix SaltKeyOptionParserTestCase test failures 2016-12-06 15:03:44 -07:00
Alexandru Bleotu
2f428ef38f Added tests for utils.vmware.get_datacenter 2016-12-05 10:38:11 -05:00
Alexandru Bleotu
e8a854f9ac Added tests for utils.vmware.get_datacenters 2016-12-05 10:37:48 -05:00
rallytime
74a417e527 Update the mocked cloud configs to also include master configs
The master configs are injected into the cloud configs, and we need
them here in order to get the `user` default for the parsers test.
2016-12-02 15:38:53 -07:00
rallytime
8fd53a4808 Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/topics/cloud/vsphere.rst
  - salt/config/__init__.py
  - salt/daemons/masterapi.py
  - salt/templates/rh_ip/network.jinja
  - salt/utils/parsers.py
  - tests/unit/daemons_test.py
2016-12-02 12:18:18 -07:00
Mike Place
0af7bd527d Merge pull request #37989 from alexbleotu/schema_updates-gh
Schema updates gh
2016-11-30 09:06:49 -07:00
Mike Place
fa41fa06cb Remove whitespace for lint check 2016-11-30 07:30:12 -07:00
Alexandru Bleotu
80baf38ee6 Added tests for new serialization code 2016-11-29 08:01:41 -05:00
Alexandru Bleotu
07979897b6 Added tests for InvalidArgument fault handling in utils.vmware.wait_for_task 2016-11-29 05:23:07 -05:00
Alexandru Bleotu
39fe0b41b6 Added/updated tests for exception handling/get_root_folder change in utils.vmware.get_content 2016-11-24 05:53:51 -05:00
Alexandru Bleotu
ed64348502 Added tests for exception handling in utils.vmware.is_connection_to_a_vcenter 2016-11-22 09:08:06 -05:00
Alexandru Bleotu
3497d2344e Added tests for exception handling in utils.vmware.get_service_instance 2016-11-22 09:08:06 -05:00
Alexandru Bleotu
102b2b2e98 Vmware disconnect gh (#37809)
* Added utils.vmware.disconnect

- disconnects from a vCenter or ESXi host

* Added tests for salt.utils.vmware.disconnect
2016-11-21 13:25:16 -07:00
Denys Havrysh
518a3dd7ee Add unit tests for Salt parsers processing logging options 2016-11-21 16:53:29 +02:00
rallytime
b86e9270e7 Update "warn" to "warning" in verify_test 2016-11-11 09:05:44 -07:00
rallytime
7b2341bbfd Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/file.py
  - salt/states/file.py
  - salt/utils/network.py
2016-11-10 15:59:51 -07:00
Eric Radman
b19440418d Fixes to unit tests (#37586)
Add skipIf pyvmomi is not installed

    NameError: global name 'vmodl' is not defined
    NameError: global name 'vim' is not defined

Fix skipIf typo for OpenBSD

    >>> import sys
    >>> sys.platform
    'openbsd6'

Avoid warning from glusterfs.py:

    Use specific 'len(elem)' or 'elem is not None' test

Enable boto_secgroup_test tests that work now:

    test skipped due to error in moto return - fixed in
    cc01669643
2016-11-09 13:58:08 -07:00
Nicole Thomas
2e8e56ca69 [PY3] Change log.warn statements to log.warning (#37531)
* [PY3] Change log.warn statements to log.warning

log.warn is deprecated in Python 3. This change removes the
occurance of deprecation warnings for using log.warn. For example:

```
17:24:23 [WARNING ] /testing/salt/utils/verify.py:522: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
17:24:23   log.warn('Insecure logging configuration detected! Sensitive data may be logged.')
17:24:23
17:24:23 [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
```

* Tweak unit.utils.verify_test to using warning instead of warn
2016-11-08 13:06:54 -07:00
Mike Place
610a198322
Lint 2016-11-08 19:40:48 +13:00
Mike Place
3e848ad126
Cache tests 2016-11-08 18:49:10 +13:00
Mike Place
33d0789f6e Merge pull request #37348 from alexbleotu/create_cluster-gh
Create cluster gh
2016-11-06 15:02:41 +13:00
Alexandru Bleotu
b3404ae7a2 Renamed salt.utils.vmware.update_cluster tests 2016-11-04 09:57:23 -04:00
Alexandru Bleotu
e126619405 Added tests for utils.vmware.create_cluster 2016-11-04 09:52:25 -04:00
Alexandru Bleotu
c68281b9fa Get cluster gh (#37310)
* Added utils.vmware.get_cluster

- retrieves a cluster in datacenter based on its name

* Added tests for utils.vmware.get_cluster
2016-11-02 08:28:41 -06:00
rallytime
e57fb947c6 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/status.py
2016-11-01 12:56:04 -06:00
Alexandru Bleotu
b0aaebaab8 Update cluster gh (#37347)
* Added utils.vmware.update_cluster

- updates an existing cluster based on a configuration spec

* Added tests for utils.vmware.update_cluster
2016-11-01 09:01:20 -06:00
rallytime
e10058c831 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-10-31 10:15:25 -06:00
Mike Place
7d7941598e
Merge branch 'carbon' into carbon_develop 2016-10-31 23:57:16 +13:00
Mike Place
02d61e5928
Lint 2016-10-31 23:21:43 +13:00
Mike Place
3d36f47d53
Skip process test on < 2.7
There is an unfixed bug in 2.6 that makes this unstable.
2016-10-31 23:20:48 +13:00
Mike Place
a6b7417fe9
SIGILL -> SIGKILL in process test
Fairly sure this was a typo. cc: @s0undt3ch
2016-10-31 20:54:42 +13:00
rallytime
8d3957f250 Merge branch 'carbon' into 'develop'
Conflicts:
  - salt/cloud/clouds/vmware.py
  - salt/modules/boto_ec2.py
  - salt/modules/cmdmod.py
  - salt/modules/win_lgpo.py
2016-10-28 11:58:41 -06:00
Mike Place
36f47a4449
Reset dir for extend test 2016-10-28 15:02:13 +09:00
Alexandru Bleotu
a777d6eced Get managed object name gh (#37276)
* Added get_managed_object_name to optimally retrieve a managed object's name

* Added tests for get_managed_obect_name
2016-10-27 16:27:27 -06:00
Alexandru Bleotu
c0b45afa54 Added tests for salt.utils.vmware.get_properties_of_managed_object 2016-10-26 06:37:32 -04:00
Mike Place
fa20c4c128 Merge pull request #37223 from alexbleotu/get_service_instance_from_managed_object-gh
Get service instance from managed object gh
2016-10-26 10:35:02 +09:00
Alexandru Bleotu
ac451002dd Added tests for get_service_instance_from_managed_object 2016-10-25 11:21:32 -04:00
rallytime
70851807bd Merge branch 'carbon' into 'develop'
Conflicts:
  - salt/modules/status.py
2016-10-24 09:35:00 -06:00
rallytime
caa8fc9169 Merge branch '2016.3' into 'carbon'
Conflicts:
  - pkg/deb/salt-api.service
  - pkg/deb/salt-master.service
  - salt/client/__init__.py
  - salt/fileclient.py
  - salt/modules/cp.py
  - salt/modules/status.py
  - tests/integration/__init__.py
  - tests/integration/modules/cp.py
2016-10-21 15:50:03 -06:00
rallytime
db3150b3f1 Merge branch 'carbon' into 'develop'
Conflicts:
  - doc/topics/installation/windows.rst
2016-10-21 15:19:16 -06:00
Dmitry Kuzmenko
4695619599 Updated host_to_ip to return all the IPs instead of the first one.
This fixes the bug #36866 where minion gets __master_disconnected right
after connect because '::1' isn't in the list of connected masters that
is ['127.0.0.1'].
2016-10-20 18:15:27 +03:00
Mike Place
d7aebd1877
Remove unnecessary sleep from unit.utils.process_test.TestProcessManager.test_restarting 2016-10-20 14:29:10 +09:00
rallytime
c4dc0dd2ef Merge branch 'carbon' into 'develop'
No conflicts.
2016-10-13 11:14:36 -06:00
Nicole Thomas
a8eee6e90b Update the ip to test against in unit.utils.network_test.NetworkTestCase.test_host_to_ip (#36975) 2016-10-13 10:25:58 -06:00
Tim Fechner
7547761acc Fix #36461, AttributeError because of .lower() (#36462)
* Fix #36461, AttributeError because of .lower()

* Add tests
2016-10-11 10:29:22 -06:00
Alexandru Bleotu
6c441cb288 Create datacenter gh (#36826)
*  Added salt.utils.create_datacenter that creates a VMWare datacenter

* Added tests for salt.utils.vmware.create_datacenter
2016-10-11 08:49:53 -06:00
Alexandru Bleotu
03533e9b01 Added tests for salt.utils.vmware.get_datacenter 2016-09-27 13:39:47 +01:00
Mike Place
681ce7539c Merge pull request #36511 from alexbleotu/wait_for_task_update-gh
Wait for task update gh
2016-09-26 19:04:35 +09:00
Mike Place
6af9192a51 Merge pull request #36509 from alexbleotu/get_root_folder-gh
Get root folder gh
2016-09-26 18:52:50 +09:00
Alexandru Bleotu
16510be521 Updated tests to reflect changes in salt.utils.vmware.wait_for_pid 2016-09-23 10:48:24 +01:00
Alexandru Bleotu
fa2ecb9f56 Added tests for get_root_folder 2016-09-23 10:09:10 +01:00
rallytime
8e0b1a3718 Merge branch 'carbon' into 'develop'
No conflicts.
2016-09-22 10:09:06 -06:00
C. R. Oldham
755c069fb9 Align tests for new calls 2016-09-21 16:08:28 -06:00
C. R. Oldham
3c62ceb3b4 Fix salt-cloud breakage--local traversal was skipping what we needed. Fixes #36301
Align tests for new calls
More specific 'skip' selection for PropertyCollector depending on local_properties request.
2016-09-21 09:43:14 -06:00
rallytime
bdb15217d3 Merge branch 'carbon' into 'develop'
No conflicts.
2016-09-19 11:21:02 -06:00
Nicole Thomas
2f16e43d67 Update the extend.py and extend_test.py imports (#36382)
When using `fopen`, we need to import all of salt.utils. We should
also be explicit about calling salt.utils.fopen.

This also cleans up the ordering of the salttesting vs salt libs to
be consistent with other files and conform with `ensure_is_syspath`.

Also changes a print statement to a log.info
2016-09-16 16:26:13 -06:00
rallytime
26cf545d03 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/utils/gitfs.py
  - tests/unit/modules/disk_test.py
2016-09-16 10:35:49 -06:00
rallytime
37aea4188a Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-16 09:24:17 -06:00
Mike Place
70ffdafbf0 Schema test requires jsonschema 2.5.0 or above 2016-09-15 17:23:51 -06:00
Mike Place
340d7fdc53 Schema test requires jsonschema 2.5.0 or above 2016-09-15 12:20:49 -06:00
rallytime
47e5d94710 Merge branch 'carbon' into 'develop'
No conflicts.
2016-09-15 11:26:09 -06:00
Mike Place
93f2d108ae Fix extend test
The test suite can't guarantee what the pwd will be. Pass it into the function under test.
2016-09-15 20:39:39 +09:00
Mike Place
1357244ef9 Schema test requires jsonschema 2.5.0 or above 2016-09-14 19:03:13 +09:00
Pablo Suárez Hernández
52a7ed605e Fixed _interfaces_ifconfig output for SunOS test 2016-09-08 12:39:28 +01:00
Eric Radman
29814f9d43 Skip utils_test if timelib is not installed (#32699)
date_cast() throws a RuntimeError, not an ImportError
2016-09-08 12:39:28 +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
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
Justin Anderson
3f7e4d9f59 traversal_spec has skip=True, not false (#35877) 2016-08-29 16:12:16 -06:00
Nicole Thomas
27697e952a Pylint fixes for develop branch (#35863) 2016-08-29 12:20:50 -06:00
Mike Place
409f17aa58 Merge pull request #35673 from cro/proxy_getsi_fix
Proxies don't handle reusing the SmartConnect instances very well.  D…
2016-08-29 13:11:35 +09:00
Mike Place
5bb62345f6 Merge pull request #35728 from alexbleotu/vmware_enhancements-gh
Vmware enhancements gh
2016-08-29 12:54:14 +09:00
rallytime
2b1ad9e9b9 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/utils/gitfs.py
2016-08-26 14:54:54 -06:00
rallytime
e8e73b55ac Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/topics/jobs/schedule.rst
  - salt/states/user.py
2016-08-26 13:21:12 -06: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
Alexandru Bleotu
e993f99053 Improved salt.utils.vmware.get_content, get_mors_with_properties
- added optional traversal_spec parameter to both methods, allowing the
  user to specify a different TraversalSpec object to search for content
  (if not specified, the behaviour is that all a traverse all search is
  done)
- the traversal_spec is destroyed only if is created in the method
- added local_properties flag to both methods allowing the retrieval of
  properties of the container object
- added tests for the 2 functions
2016-08-25 10:42:48 +01:00
C. R. Oldham
ae9b2726b5 Fix some spelling, add better test for proxy 2016-08-23 16:42:14 -06:00
Alexandru Bleotu
e66841ef69 Improved salt.utils.vmware.wait_for_task
- improved logging/description
- on success the method returns the result and on error it raises the
  exception it got from vmware
- added unit tests
2016-08-23 17:07:54 +01:00
C. R. Oldham
424a9a8137 Merge pull request #34059 from alexbleotu/vmware_common-gh
Vmware common gh
2016-08-23 09:24:15 -06:00
Alexandru Bleotu
77e6e5afee Improved connection to a VMware vCenter Server or ESXi host
- added support for passthrough connections via SSPI
- added function to specify if a connection is made to a vCenter or ESXi host
- added function to disconnect from a vCenter or ESXi host
- added tests for changed/new functions
2016-08-23 13:46:28 +01:00
Mike Place
0dc7348f1d Mock sys.exit in salt.utils.extend
Best not to push an exit into the test suite :]
2016-08-22 21:37:40 +09:00
rallytime
7b3fc41868 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/cloud/clouds/lxc.py
  - salt/cloud/clouds/nova.py
  - salt/cloud/clouds/vmware.py
  - salt/cloud/clouds/vsphere.py
  - salt/cloud/libcloudfuncs.py
  - salt/minion.py
  - salt/modules/yumpkg.py
  - salt/utils/cloud.py
2016-08-18 14:37:42 -06:00
rallytime
e61b04a707 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cloud/clouds/digital_ocean.py
  - salt/cloud/clouds/ec2.py
  - salt/cloud/clouds/libcloud_aws.py
  - salt/cloud/clouds/opennebula.py
  - salt/cloud/clouds/rackspace.py
  - salt/cloud/clouds/softlayer.py
  - salt/cloud/clouds/softlayer_hw.py
  - salt/cloud/clouds/vmware.py
  - salt/loader.py
  - salt/modules/aptpkg.py
  - salt/modules/ebuild.py
  - salt/modules/pacman.py
  - salt/modules/systemd.py
  - salt/modules/yumpkg.py
  - salt/modules/zypper.py
  - salt/scripts.py
  - salt/utils/cloud.py
2016-08-18 12:09:51 -06:00
Erik Johnson
f83e0ef242 Add unit tests for salt.utils.systemd 2016-08-17 11:30:14 -05:00
rallytime
49179ac401 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/win_pkg.py
  - tests/integration/files/conf/master
2016-08-16 12:52:20 -06:00
rallytime
c6c82be1de Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cloud/deploy/bootstrap-salt.sh
2016-08-16 11:02:05 -06:00
Graham McCullough
ae5b233d51 fixes #34279 2016-08-15 14:34:20 -07:00
Mihai Dinca
b0f0b4effc Make sha256 the default hash_type 2016-08-15 10:02:19 +02:00
rallytime
1fe0b69a6c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/blockdev.py
  - salt/modules/ddns.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/linux_sysctl.py
  - salt/modules/status.py
  - salt/modules/x509.py
  - salt/utils/process.py
  - salt/utils/verify.py
  - tests/integration/__init__.py
  - tests/integration/modules/state.py
  - tests/integration/states/cmd.py
2016-08-12 16:21:58 -06:00
rallytime
cf038ee3fe Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/grains/core.py
  - salt/modules/file.py
  - salt/modules/hosts.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/portage_config.py
  - salt/modules/x509.py
  - salt/scripts.py
  - tests/integration/shell/enabled.py
2016-08-11 11:33:54 -06:00
Erik Johnson
a375dd7e1f Clean up open filehandles (#35359)
* salt/crypt.py: clean up open filehandles

* salt/fileclient.py: clean up open filehandles

* salt/grains/core.py: clean up open filehandles

* salt/modules/cp.py: clean up open filehandles

* salt/modules/data.py: clean up open filehandles

* salt/modules/dnsutil.py: clean up open filehandles

* salt/modules/dockerng.py: clean up open filehandles

* salt/modules/inspectlib/collector.py: clean up open filehandles

* salt/modules/file.py: clean up open filehandles

* salt/modules/hosts.py: clean up open filehandles

* salt/modules/incron.py: clean up open filehandles

* salt/modules/dpkg.py: clean up open filehandles

* salt/modules/linux_sysctl.py: clean up open filehandles

* salt/modules/netbsd_sysctl.py: clean up open filehandles

* salt/modules/network.py: clean up open filehandles

* salt/modules/nftables.py: clean up open filehandles

* salt/modules/openbsd_sysctl.py: clean up open filehandles

* salt/modules/rh_ip.py: clean up open filehandles

* salt/modules/portage_config.py: clean up open filehandles

* salt/modules/status.py: clean up open filehandles

* salt/modules/tls.py: clean up open filehandles

* salt/modules/xapi.py: clean up open filehandles

* salt/modules/x509.py: clean up open filehandles

* salt/modules/virt.py: clean up open filehandles

* salt/modules/zcbuildout.py: clean up open filehandles

* salt/returners/local_cache.py: clean up open filehandles

* salt/utils/cloud.py: clean up open filehandles

* salt/states/pkgrepo.py: clean up open filehandles

* salt/states/x509.py: clean up open filehandles

* salt/transport/mixins/auth.py: clean up open filehandles

* salt/utils/__init__.py: clean up open filehandles

* salt/states/pkg.py: clean up open filehandles

* salt/utils/minion.py: clean up open filehandles

* salt/utils/openstack/nova.py: clean up open filehandles

* salt/utils/openstack/swift.py: clean up open filehandles

* salt/utils/process.py: clean up open filehandles

* salt/utils/templates.py: clean up open filehandles

* salt/utils/virt.py: clean up open filehandles

* tests/integration/__init__.py: clean up open filehandles

* tests/integration/cli/grains.py: clean up open filehandles

* tests/integration/client/standard.py: clean up open filehandles

* tests/integration/modules/hosts.py: clean up open filehandles

* tests/unit/utils/vt_test.py: clean up open filehandles

* tests/integration/shell/enabled.py: clean up open filehandles

* tests/integration/states/cmd.py: clean up open filehandles

* tests/integration/states/file.py: clean up open filehandles

* tests/integration/states/match.py: clean up open filehandles

* tests/unit/config_test.py: clean up open filehandles

* tests/unit/templates/jinja_test.py: clean up open filehandles

* tests/unit/utils/find_test.py: clean up open filehandles

* tests/integration/modules/state.py: clean up open filehandles

* Update dnsutil_test to reflect changes in fopen usage
2016-08-11 10:45:24 -06:00
Justin Findlay
2fc3a55338 utils.verify.verify_log: warn at all levels less than info 2016-08-10 14:10:43 -06:00
Daniel Wallace
09c5088c3c [PY3] fix warnings_test
maxint is not available in py3.  It was removed, but maxsize can be used
instead.

https://docs.python.org/3.1/whatsnew/3.0.html#integers
2016-08-02 10:25:35 -05:00
Daniel Wallace
445c7a2c20 [PY3] python3ize schema test
thirsty is specified as a boolean

need to copy the top level of kwargs so that the dictionary does not
changes size during the loop.
2016-08-02 10:25:35 -05:00
Daniel Wallace
f5b1769e0b [PY3] bytes for events_test 2016-08-02 10:25:35 -05:00
Erik Johnson
bd4d1d31a0 Add nodegroup_comp unit tests 2016-07-29 19:28:52 -05:00
Anthony Shaw
87954a2baf
add newline to test 2016-07-28 12:44:01 +10:00
Anthony Shaw
bc528eb4d0
completed test to check files, names and contents 2016-07-28 11:52:16 +10:00
Anthony Shaw
b7257baade
add test class 2016-07-28 11:41:15 +10:00
Bo Maryniuk
87ffd6dc1e Regression fix: minion ID generator should use FQDN first, if available (#34876)
* Regression fix: use FQDN first, if available

* Adjust the tests to the new behaviour (FQDN first)
2016-07-22 09:21:42 -06:00
rallytime
86b7c71e09 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/glusterfs.py
  - salt/states/pkg.py
2016-07-07 13:37:58 -06:00
rallytime
27988dde48 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-07-07 12:31:12 -06:00
Nicole Thomas
3ebba020b6 Rename some unit test files by adding _test (#34503)
These two test files are currently not running automatically on Jenkins.
Renaming these files will add them to the full runtests.py run.
2016-07-07 12:05:08 -04:00
Jonathon Anderson
ed74415155 Addressed unit testing for salt.utils.find
In addition to addressing test failures introduced by this
bugfix branch, I've also added additional tests for the
proper behavior of min/maxdepth.
2016-06-24 14:06:17 -06:00
Hatem Nassrat
9f16d6019c Fixes #34181 no more newlines in long yaml encodes 2016-06-22 18:35:19 +00:00
Henrik Holmboe
523b2acae9 return_valute -> return_value (#34091) 2016-06-17 13:02:07 -04:00
Bo Maryniuk
921c399305 Add unit test: addrinfo from the raw socket should be picked up if all other socket checks had failed to localhost 2016-06-15 14:09:12 +02:00
Bo Maryniuk
4df1b542de Add unit test: check if FQDN is picked up 2016-06-15 14:08:41 +02:00
Bo Maryniuk
a31b7aedfc Add unit test: minion ID should be localhost, if everything is localhost. 2016-06-15 14:08:13 +02:00
Bo Maryniuk
97ef3bdb76 Test fix: only non-localhost IP should persist 2016-06-15 14:07:29 +02:00
Bo Maryniuk
263c039db9 Test fix: look for attribute name only when other socket checks had failed 2016-06-15 14:06:50 +02:00
Bo Maryniuk
2dc9e693f5 Fix lint 2016-06-14 16:37:11 +02:00
Bo Maryniuk
ef84253e7e Fix netmask test. 2016-06-14 16:34:44 +02:00
Bo Maryniuk
ffeaff003f Fix typo 2016-06-14 16:33:18 +02:00
Bo Maryniuk
22f3bab2ca Fix the documentation 2016-06-14 16:29:07 +02:00
Bo Maryniuk
085901470e Add unit test check for non-localhost IP is accepted as a minion ID 2016-06-14 16:29:07 +02:00
Bo Maryniuk
bce6798e86 Add unit test to check if any of localhost or local IP addresses are filtered 2016-06-14 16:29:07 +02:00
Bo Maryniuk
47755c69ea Add unit test to filter out localhost from the first occurrence 2016-06-14 16:29:07 +02:00
Bo Maryniuk
15ecb083e3 Add test for the first in line from platform.node is used (mostly) 2016-06-14 16:29:06 +02:00
Bo Maryniuk
eed433ec60 Add unit test to check on duplicate hostnames in the pool 2016-06-14 16:29:06 +02:00
Bo Maryniuk
71a3e91f57 Add unit test for check if the minion ID is distinct in the pool 2016-06-14 16:29:06 +02:00
Bo Maryniuk
a3266c6f2f Fix network test for Solaris 2016-06-14 16:29:06 +02:00
Bo Maryniuk
2d4a9939a9 Rename network unit test into a proper name 2016-06-14 16:29:06 +02:00
C. R. Oldham
35bc42410f Merge pull request #33705 from alexbleotu/json_schema_extension-gh
JSON Schema Extension
2016-06-03 08:42:18 -06:00
Alexandru Bleotu
d69ce3a84f JSON Schema Extension
- added support for JSON schemas that validate complex JSON objects
  (JSON objects that have as attributes other JSON objects)
2016-06-03 14:03:26 +01:00
Dmitry Kuzmenko
66bd75cd3b New schedule tests and fixes 2016-06-02 17:14:50 +03:00
Nicole Thomas
8d805e6595 Lint #32985 (#33278)
* Fix context clash.

boto_vpc uses both boto and boto3. Both utils for those use the same name for their connection context. If you used states that required both boto and boto3, the get_conn would return the object.

* Add a unit test to the boto context conflict problem

* Fix pylint errors and ensure new test to runs correctly

Merges #32985

* Fix typo
2016-05-16 15:02:05 -06:00
Eric Radman
84b740e26d Skip utils_test if timelib is not installed (#32699)
date_cast() throws a RuntimeError, not an ImportError
2016-04-20 14:01:21 -06:00
Nicole Thomas
216d9fdc9a [develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute

* remove reference to master_alive_check

* Fixes saltstack/salt#28262

* Resolve memory leak in authentication

* outputter virt_list does not exist anymore

* Update proxmox documentation

* Fix documentation on boto_asg and boto_elb modules and states

* modules.win_timezone: don't list all zones in debug log

* Correcty index glusterfs bricks

Fixes issue #32311

* Cleaner deprecation process with decorators

* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix

* Fixes saltstack/salt#28262 for 2015.5 branch

* Update master config docs

* Improve git_pillar documentation/logging

* Add note about different behavior of top file in git_pillar

* Make log entry for a missing pillar SLS file more accurate for git_pillar

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* Update glusterfs_test to be inline with #32312

* Fix salt-cloud paralell provisioning

Closes #31632

* Ignore Raspbian in service.py __virtual__ (#32421)

* Ignore Raspbian in service.py __virtual__

This prevents more than one execution module from trying to load as the
service virtual module.

Refs: #32413

* pack __salt__ before loading provider overrides

We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides

* Fix broken __salt__ dict in provider override

Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.

* Merge #32293 with test fixes (#32418)

* Fix issue #11497

* Remove check for working directory presence in tests

* Fix Domainname introspection

Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.

* Add pgjsonb_queue to queue doc index

* Pylint fixes

* Pass parser options into batch mode

Resolves #31738

* Changed the target file in file.symlink test (#32443)

* Argument name in docs should match actual arg name (#32445)

Fixes #31851

* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)

Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.

* Issue #28706: Fix state user.present behavior. (#32448)

- As mentionned in issue #28706, state user.present no longer remove
      user from groups if the keyword 'groups' with empty value '[]' is not
      explicitly set, salt will assume current groups are still wanted.

* tests.integration: fix 4230c8a

* Move the tables of virtual modules to individual documentation pages

* Add new doc pages to toctree

* Add external ref to windows package manager docs

* Improve docstrings

* Add documentation on virtual module provider overrides to the module docs

* Clarify the scope of the provider param in states.

* Add link to provider override docs to all package providers

* Add link to provider override docs to all service providers

* Add link to provider override docs to all user providers

* dd link to provider override docs to all shadow providers

* Add link to provider override docs to all group providers

* Backport 31164 and 31364 (#32474)

* Don't send REQ while another one is waiting for response.

The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.

* Fixed zeromq ReqMessageClient destroy

* Add link to provider override docs to opkg.py

This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.

* Add documentation for some master/minion configs (#32454)

Refs #32400

Adds docs for:

- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal

* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)

* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix

* Only unsub if we have a jid

Closes #32479
2016-04-11 17:07:15 -06:00
Nicole Thomas
49af98b7a7 Merge pull request #32431 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
2016-04-08 11:17:28 -06:00
rallytime
7f8eb751a0 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/cli/daemons.py
  - salt/modules/win_servermanager.py
  - tests/unit/modules/win_servermanager_test.py
2016-04-08 10:09:03 -06:00
Eric Radman
504cc02741 Do not assume temporary files have the user's gid
On BSD-like systems (including MacOS) files created in /tmp (or any dir
with mod 1777) do not have the user's group. Therefore the st_gid for
files created in /tmp will usually be wheel. Easiest thing to do is to
skip this test.
2016-04-07 22:32:33 -04:00
rallytime
59b804d230 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/pkgng.py
  - salt/modules/status.py
  - salt/states/boto_asg.py
  - salt/states/boto_elb.py
2016-04-07 16:28:59 -06:00
James O'Neill
c2442ad46f Discard duplicate YAML nodes when merging anchors to avoid duplicate … (#32042)
* Discard duplicate YAML nodes when merging anchors to avoid duplicate node errors. Add yamlloader unit tests.

Fixed #14550 Using YAML anchors/references in Pillars causes conflicting IDs

* Fix lint errors. Make external function a static method.

* Fix remaining lint errors in unit test file.
2016-04-07 10:27:20 -06:00
Bo Maryniuk
0d9a06b8c6 Cleaner deprecation process with decorators
* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix
2016-04-06 12:55:45 -06:00
rallytime
760f479424 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/daemons.py
  - salt/config/__init__.py
  - salt/scripts.py
  - salt/state.py
  - tests/unit/config/config_test.py
2016-04-05 15:09:27 -06:00
Benjamin Drung
8cada9573f Fix typos of retrieve 2016-04-04 14:27:41 +02:00
rallytime
eb6773823b Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/rh_service.py
2016-04-01 10:33:44 -06:00
twangboy
3c1c076d78 Fix unit tests 2016-03-30 08:46:02 -06:00
Mike Place
4ad92da5c4 Merge pull request #32214 from jtand/fix_test_kill
Undo previous fix for a more correct fix for process_test.test_kill
2016-03-29 13:15:20 -06:00
Justin Anderson
b25e995efd Lint fix 2016-03-29 10:57:46 -06:00
Justin Anderson
5a57f2e1c6 Undo previous fix for a more correct fix for process_test.test_kill 2016-03-29 09:58:28 -06:00
Nicole Thomas
f513e401d8 Merge pull request #32188 from jtand/fix_test_kill
Fix test kill
2016-03-28 16:38:48 -06:00
Mike Place
921cfe1fe4 Merge pull request #32181 from jtand/fix_test_kill
Fix test kill
2016-03-28 13:46:13 -06:00
Justin Anderson
0f4f303380 Lint fix 2016-03-28 12:37:52 -06:00
Justin Anderson
a74bb9b67f Fix the process_test.test_kill failure in 2016.3 2016-03-28 11:33:55 -06:00
rallytime
d684d49490 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2015.5.10.rst
  - doc/topics/releases/2015.8.8.rst
2016-03-28 11:16:22 -06:00
Justin Anderson
d172b1d270 Fix the process_test.test_kill failure in 2016.3 2016-03-24 14:31:43 -06:00
twangboy
158ebc76b8 Fix unit tests for mac_utils 2016-03-22 13:46:19 -06:00
rallytime
52111eb01a Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/cloud/clouds/joyent.py
  - salt/minion.py
2016-03-18 16:00:35 -06:00
rallytime
6360ecd3b3 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cloud/clouds/scaleway.py
  - salt/config/__init__.py
  - salt/log/mixins.py
  - salt/minion.py
  - salt/modules/ps.py
  - salt/utils/decorators/__init__.py
  - salt/utils/schema.py
  - tests/unit/modules/etcd_mod_test.py
  - tests/unit/modules/file_test.py
2016-03-18 11:26:12 -06:00
rallytime
308aa5fd61 Merge branch '2016.3' into 'develop'
Conflicts:
  - conf/master
  - conf/minion
  - doc/ref/proxy/all/index.rst
  - salt/cli/daemons.py
  - salt/modules/key.py
  - salt/modules/reg.py
  - salt/modules/win_pkg.py
  - salt/utils/__init__.py
  - salt/utils/cloud.py
  - tests/unit/daemons_test.py
2016-03-18 10:57:15 -06:00
Justin Anderson
ef2db9a301 Skipping some boto tests that are broken 2016-03-17 11:05:43 -06:00
Pedro Algarvio
2fcc916c6a
Make sure all started processed, at least and as a last resort, are killed. 2016-03-16 19:40:49 +00:00
Pedro Algarvio
e1281e34cc
Don't assume the tests suite is running as root 2016-03-16 19:40:49 +00:00
Pedro Algarvio
916b6b402d
Skip tests if urllib3 is not installed 2016-03-16 19:40:48 +00:00
Nicole Thomas
03e8b72655 Merge pull request #31904 from rallytime/merge-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2016-03-16 11:23:54 -06:00
rallytime
892591a39c More pylint fixes 2016-03-15 15:50:05 -06:00
Bo Maryniuk
1882e1c960 Adjust test 2016-03-08 20:08:18 +01:00
rallytime
7476076ea3 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/beacons/memusage.py
2016-03-07 14:13:14 -07:00
twangboy
75546eadaf Fix tests for mac_utils 2016-03-04 16:36:02 -07:00
twangboy
6cf7a4b364 Add missing import 2016-03-04 10:55:23 -07:00
twangboy
5d6de86a25 Fix some lint 2016-03-04 10:53:11 -07:00
twangboy
88d5db9cdd Add tests for remaining functions 2016-03-04 10:53:11 -07:00
twangboy
69aa8f8cbf Add test for execute_return_success 2016-03-04 10:53:11 -07:00
Mike Place
b40c611d0d Merge pull request #31067 from jfindlay/deprecate_env
Deprecate env
2016-02-18 14:42:10 -07:00
Mike Place
ce5bc23431 Merge pull request #31289 from jtand/utils_network_tests
Added some additional unit tests to unit.utils.network
2016-02-18 09:56:18 -07:00