Daniel Wallace
c1f673eca4
use older name if _create_unverified_context is unvailable
2017-08-10 14:43:33 -06:00
Erik Johnson
665de2d1f9
Fix domainname parameter input translation
...
Resolves #42538
2017-08-07 09:51:14 -05:00
garethgreenaway
25094ad9b1
Merge pull request #42602 from garethgreenaway/42514_2017_7_superseded_deprecated_from_pillar
...
Use superseded and deprecated configuration from pillar
2017-07-31 11:53:06 -07:00
Gareth J. Greenaway
74bae13939
Small update to something I missed in the first commit. Updating tests to also test for pillar values.
2017-07-27 13:19:48 -07:00
rallytime
8b35b367b3
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/win_pkg.py
- salt/states/dockerng.py
2017-07-05 09:14:30 -06: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
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
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
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
Dmitry Kuzmenko
c25ebe3a6e
Py3: fix test for Py34. Fixed the etcd util error case handling.
2017-06-20 21:47:51 +03:00
Ed Pelc
a536111b83
add tests for single docker log_config option fix
2017-06-16 14:57:17 -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
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
rallytime
616ac7289b
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- salt/config/__init__.py
- salt/modules/elasticsearch.py
- tests/integration/__init__.py
2017-05-23 10:36:41 -06:00
Mike Place
1ba95684a9
Merge pull request #41113 from cro/proxy_auto_test2
...
Rescue proxy_auto_tests PR from git rebase hell
2017-05-22 12:05:07 -05:00
rallytime
c6c1d30c48
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- salt/modules/yumpkg.py
- salt/spm/__init__.py
- tests/unit/modules/test_zypper.py
- tests/unit/utils/test_network.py
2017-05-20 17:07:34 -06:00
Bo Maryniuk
5168ef8959
Add unit test for hostname can be started from 127
2017-05-16 16:18:14 +02:00
Bo Maryniuk
d9c8324a6b
Unit test for accepting hosts names as 127
2017-05-16 12:07:32 +02:00
C. R. Oldham
19db038b99
Fix test--use proxy_config instead of minion_config
2017-05-12 14:01:54 -06:00
Pedro Algarvio
d65742c066
Delete attributes
2017-04-28 13:36:44 +01:00
Pedro Algarvio
abe608d739
Drop @patch
usage
2017-04-28 13:36:42 +01:00
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
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