Commit Graph

8921 Commits

Author SHA1 Message Date
Erik Johnson
5d84b40bfd Attempt to fix failing grains tests in 2016.3
The tearDown appears to only be removing the grain if it matches a
specific value. This may be leading to the grain value not being blank
at the time the next test is run.

Instead of only deleting the grain if it matches a specific value,
instead delete all items from that grain to ensure that it is empty for
the next test.
2017-03-14 11:25:15 -05:00
Mike Place
899e037f0a Merge pull request #39932 from rallytime/cp-beacon-fixes
Cherry-pick the beacon fixes made in #39930 to 2016.11
2017-03-09 17:21:08 -07:00
Nicole Thomas
c2d4d17589 Merge pull request #39770 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-03-09 15:00:17 -07:00
rallytime
4a52cca926 Pylint fixes 2017-03-09 14:55:33 -07:00
Pedro Algarvio
4627c4ea6d Code cleanup and make sure the beacons config file is deleted after testing
Conflicts:
  - tests/integration/modules/beacons.py
2017-03-09 13:35:16 -07:00
Pedro Algarvio
be06df9b64 Remove *args, **kwargs. Not needed, not useful. 2017-03-09 13:11:07 -07:00
Pedro Algarvio
4a242829ee These tests aren't even using mock!
Conflicts:
  - tests/unit/beacons/inotify_beacon_test.py
2017-03-09 13:10:43 -07:00
Pedro Algarvio
6408b123e7 These tests are not destructive
Conflicts:
  - tests/unit/beacons/inotify_beacon_test.py
2017-03-09 13:09:32 -07:00
Pedro Algarvio
50e51b5b9d The beacons configuration is now a list. Handle it! 2017-03-09 13:00:41 -07:00
Nicole Thomas
8ecc719f90 Merge pull request #39852 from rallytime/bp-39651
Back-port #39651 to 2016.11
2017-03-06 14:18:33 -07:00
dharper
e2a232921d Checking instance exists in master._get_cached_minion_data when cache.fetch returns None 2017-03-06 09:09:03 -07:00
Mike Place
9f70ad7164 Merge pull request #39472 from whiteinge/_reformat_low-update
Update _reformat_low to not run kwarg dicts through parse_input
2017-03-02 10:46:19 -07:00
Mike Place
7dfc4b572a Merge pull request #39727 from terminalmage/issue39627
salt.modules.state: check gathered pillar for errors instead of in-memory pillar
2017-03-02 10:06:42 -07:00
Mike Place
555f1473f6 Merge pull request #39788 from cachedout/disable_api_test
Disable one API test that is flaky
2017-03-02 09:17:31 -07:00
Mike Place
523e377b33
Disable one API test that is flaky 2017-03-02 09:16:43 -07:00
rallytime
776a9431b9 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/minion.py
2017-03-01 16:07:14 -07:00
Erik Johnson
3bb0ebd872 Update tests for PR 39727
Also reduce the complexity of some of the mocking by adding the cachedir
to the global state.__opts__.
2017-03-01 12:10:28 -06:00
Erik Johnson
64db0b8563 Add integration tests for remote file sources 2017-03-01 10:57:06 -06:00
rallytime
756f1de2d2 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/states/file.py
2017-02-27 13:13:46 -07:00
Erik Johnson
5a3c099e4f Rewrite the tests_valid_docs test
This uses a function in the runtests_helpers custom module to perform
all the logic, and only returns what failed the test. This saves us from
having to return the entire contents of sys.doc (as well as log all of
the function calls), and also removes the need to run sys.doc in batches
to get around the "max message size" issue.
2017-02-26 12:21:00 -06:00
Erik Johnson
c7dfb494a6 Fix mocking for grains refresh 2017-02-25 21:04:48 -06:00
Seth House
d11f5381a4 Add RunnerClient test for old/new-style arg/kwarg parsing 2017-02-24 22:40:59 -07:00
Seth House
ec377ab379 Reenable skipped RunnerClient tests
I think these were skipped erroneously or perhaps whatever the problem
was has since been resolved.
2017-02-24 22:40:59 -07:00
Erik Johnson
ca54541abe Add missing unit test for disable func 2017-02-24 01:12:42 -06:00
Nicole Thomas
e6f5e8a474 Merge pull request #39565 from terminalmage/issue39512
states.file.patch/modules.file.check_hash: use hash length to determine type
2017-02-23 12:14:27 -07:00
Erik Johnson
cbdf905b9f Update test to reflect new state comment 2017-02-23 11:21:33 -06:00
rallytime
7b9b3f700d Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/dockerng.py
  - salt/states/dockerng.py
2017-02-22 16:27:08 -07:00
Mike Place
c10965833a Merge pull request #39289 from bobrik/autodetect-ipv6
Autodetect IPv6 connectivity from minion to master
2017-02-22 12:05:32 -07:00
rallytime
c613d19e76 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/dockerng.py
  - salt/states/dockerng.py
2017-02-21 13:59:14 -07:00
Mihai Dinca
9fedb84607 Always return oscap's stderr 2017-02-20 10:36:01 +01:00
Mihai Dinca
0ecde2cd02 Include oscap returncode in response 2017-02-20 10:36:01 +01:00
Mike Place
9c4292fb4e Merge pull request #39423 from dincamihai/openscap
Openscap module
2017-02-17 11:31:04 -07:00
Mihai Dinca
9d13422ac1 OpenSCAP module 2017-02-17 13:50:29 +01:00
Mike Place
e652a45592
Fix mocks in win_disim tests 2017-02-16 12:26:49 -07:00
Megan Wilhite
1acf00da3b add 2016.11.3 changelog to release notes (#39451) 2017-02-16 10:49:53 -07:00
rallytime
2acb188ac9 Change `path` value from a tuple to a list
The type of the ``path`` value changed in #38188.

This updates the type in the unit test, as well as rearranges some
of the imports to be more standardized with ``ensure_in_syspath``.
2017-02-15 15:39:53 -07:00
rallytime
6d78adbf08 Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/topics/tutorials/gitfs.rst
  - salt/fileserver/roots.py
  - salt/loader.py
2017-02-15 10:35:02 -07:00
Erik Johnson
4ff13acf8b salt.fileserver.roots: Fix regression in symlink_list (#39409)
A recent PR of mine removed the logic in symlink_list and fell back to
the cached file list generated in _file_lists(). However, this code
dates back from before the fileserver backends' symlink_list() functions
were modified to return a dict mapping links to their destinations.

This fixes the code in _file_lists() so that it returns the correct
data. It also fixes the fact that '.' was showing up in the dir list
produced by _file_lists(), and updates the associated integration test
to include the cachedir in the mocked opts.
2017-02-15 10:06:17 -07:00
Ivan Babrou
e8a2cc0488
Do no try to connect to salt master in syndic config test 2017-02-14 11:16:32 -08:00
Mihai Dinca
91383c5a19 Add cp.push test 2017-02-14 17:16:28 +01:00
Mike Place
03ab8b1b5a Merge pull request #39303 from kstreee/fix-testcase-rm-batch-in-netapi
Removes a redundant test case after removed 'batch' in 'netapi'.
2017-02-13 12:55:46 -07:00
Ch3LL
b3cbc5a408 improve salt-run salt.cmd test 2017-02-10 09:00:12 -07:00
kstreee
51972d0724 Removes a redundant test case after removed 'batch' in 'netapi'. 2017-02-10 07:12:22 +00: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
Nicole Thomas
84ff63875c [2016.11] Merge forward from 2016.3 to 2016.11 (#39234)
* Fix for #38697

* Lint fixes

* Added missing source_hash_name argument in get_managed function
Additional fix to  #33187
Customer was still seeing errors, this should now work.
Tested with 2015.8.13 and 2016.11.2

* [2016.3] Pylint fix (#39202)

* Ignore empty dicts in highstate outputter

Closes #37174

* Sort the return list from the fileserver.envs runner

* Fix the win_ip_test failures (#39230)

The changes made in #38793 changes the "get_all_ointerfaces" call
to be a list of DNS servers. This change adjusts the tests structure
from a string to a list and fixes the test failure.
2017-02-07 16:06:56 -07:00
Nicole Thomas
ef4e437bbc Fix the win_ip_test failures (#39230)
The changes made in #38793 changes the "get_all_ointerfaces" call
to be a list of DNS servers. This change adjusts the tests structure
from a string to a list and fixes the test failure.
2017-02-07 14:53:59 -07:00
Mike Place
30455079fe Merge pull request #39153 from nicholasmhughes/fix-selinux.mode-config-predictability
Fix selinux.mode state config file handling
2017-02-06 11:37:34 -07:00
Mike Place
b240468525 Merge pull request #39162 from meaksh/snapper-module-improvements
Adding more function to Snapper module
2017-02-06 11:33:52 -07:00
nicholasmhughes
8d8ba9c7d2 added the new getconfig function to the test 2017-02-06 09:55:09 -05:00
rallytime
6504bb6b02 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/pillar.py
  - salt/states/archive.py
  - tests/integration/states/archive.py
2017-02-03 09:48:58 -07:00
Erik Johnson
9de08af950 Apply fix from #38705 to 2016.3 branch (#39077)
* Apply fix from #38705 to 2016.3 branch

This is a better fix and covers more use cases than the sudo_user one.

* Remove saltenv param from internal state func call

This was probably redundant in the first place, but since state.sls,
state.highstate, etc. accept a saltenv param and the actual state
functions do not, this results in multiple values passed for the saltenv
param.

Remove this argument and let file.get_managed reference __env__
internally.

* Update archive tests to match 2016.11 branch
2017-02-03 09:35:49 -07:00
Pablo Suárez Hernández
9d6a33f257 Adds 'snapper.create_config' unit tests 2017-02-03 15:41:58 +00:00
Pablo Suárez Hernández
d38ed505f8 Adds 'snapper.modify_snapshots' unit tests 2017-02-03 15:41:29 +00:00
Pablo Suárez Hernández
d5496ccc99 Adds 'snapper.delete_snapshots' unit tests 2017-02-03 15:41:29 +00:00
Erik Johnson
646b9ea4e5 Don't abort pillar.get with merge=True if default is None (#39116)
* Don't abort pillar.get with merge=True if default is None

This prevents a SaltInvocationError from being raised if the default is
loaded from a import_yaml jinja macro and the file being loaded is empty
(which is an entirely valid use case). In these cases, the loaded
default would be None, which we don't want to cause an exception.

* Add test case for issue 39062
2017-02-01 15:07:31 -07:00
rallytime
a782b00ee1 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/cloud/clouds/openstack.py
2017-02-01 13:35:10 -07:00
Mike Place
cc9b69b6bc Merge pull request #39091 from terminalmage/update-test-valid-docs
Run test_valid_docs in batches
2017-02-01 12:09:04 -07:00
Erik Johnson
d76f0380d0 add debug logging for batch vars 2017-02-01 00:05:21 -06:00
Erik Johnson
b4afea2a25 Don't fail test if data is empty
This keeps trimmed output from failing the test. We are still testing
with a specific module lower down in the test, so this doesn't reduce
our test coverage.
2017-02-01 00:05:21 -06:00
Erik Johnson
909916c78e Run test_valid_docs in batches
This test fails often due to being trimmed, thanks to
salt.utils.dicttrim trimming values > max_event_size.

This commit changes this test so that it runs sys.doc twice, ensuring
that the return from sys.doc (for now) is not trimmed.
2017-02-01 00:05:05 -06:00
Erik Johnson
bcee3d1ef6 Move fileclient tests to tests/integration/fileserver/fileclient_test.py (#39081)
Being in the root of tests/integration/, these were not being run in
jenkins and would only run if executed manually using the -n flag in
runtests.py.
2017-01-31 13:44:50 -07:00
Mike Place
86b4b77bfe Merge pull request #39058 from sergeizv/fix-lvm-fullversion
Fix salt.modules.linux_lvm.fullversion
2017-01-31 12:01:12 -07:00
Sergei Zviagintsev
0f84ca2487 Add test for modules.linux_lvm.pvcreate on existing LVM PVs
If all the devices submitted to pvcreate() are already initialized as
LVM physical volumes, pvcreate() should return True and no futher
actions should be made.
2017-01-31 17:57:21 +01:00
Sergei Zviagintsev
3967992bfd Fix test for modules.linux_lvm.pvcreate
pvdisplay() would be called by pvcreate() twice: firstly to check
whether a device is already initialized for use by LVM and then to
ensure that the pvcreate executable did its job correctly. The test
replaces pvdisplay() with a mock that always returns True and thus
pvcreate() would think that a specified device is already initialized
and exit. In the other words, instead of testing physical volume
initialization the test simulates a case with all the submitted
devices already initialized.

Fix it by replacing pvdisplay with a mock that returns False on the
first call (thus pvcreate thinks that a device is not a PV yet) and True
on the second call (after the pvcreate executable is called).
2017-01-31 17:49:28 +01:00
Sergei Zviagintsev
fb7ef99838 Fix mock emulating lvm version
'lvm version' produces multiline output whereas test_version and
test_fullversion use mocks with single-line output. Use real-life
'lvm version' output in those mocks instead.
2017-01-31 16:22:38 +01:00
rallytime
76e95087fd Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-27 11:52:03 -07:00
rallytime
4b3ff0fe0f Skip the test_badload test until Jenkins move is complete
Once this happens, we need to re-enable the test. The move over
should also allow us to upgrade the version of salt-testing that
is applied to the test VMs. Once this is complete, we can apply
the `@flaky` decorator to this test. (salt-testing must be a
version newer than the September release.)
2017-01-27 09:51:30 -07:00
rallytime
fdaa5ac1b0 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/master.py
  - salt/pillar/__init__.py
  - salt/utils/__init__.py
2017-01-26 14:09:37 -07:00
Nicole Thomas
a6c6e47842 Handle changing "is_default" value in moto package for boto test mock (#38973) 2017-01-26 12:05:30 -07:00
Mike Place
3ec806c003 Merge pull request #38940 from isbm/isbm-sanitizers-fix-and-unit-test
Isbm sanitizers fix and unit test
2017-01-25 13:15:55 -07:00
Bo Maryniuk
a112b790fe Fix typo 2017-01-25 21:15:05 +01:00
rallytime
ee33a53a64 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/dockerng.py
  - tests/unit/doc_test.py
2017-01-25 09:43:12 -07:00
Bo Maryniuk
47a16916c3 Add unit test 2017-01-25 15:44:38 +01:00
Pablo Suárez Hernández
4311b0b6de Increasing timeouts for running integrations tests 2017-01-23 16:55:48 +00:00
Mike Place
ec59ae67c8 Merge pull request #38859 from alxwr/2016.11
fix parsing of sockstat -4
2017-01-23 09:47:22 -07:00
Mike Place
5fe6db6201 Merge pull request #38850 from techhat/stripcache
Strip .p from cache file names
2017-01-23 09:28:45 -07:00
Alexander Weidinger
30fe5641c7 fix parsing of sockstat -4 2017-01-22 02:06:25 +01:00
Joseph Hall
109cb62e76 Remove .p from test 2017-01-20 20:22:57 -07:00
Megan Wilhite
2786e209c6 add 2016.11.2 changelog to release notes (#38848) 2017-01-20 15:32:45 -07:00
Nicole Thomas
a275b9714e Merge pull request #38815 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-01-20 11:53:00 -07:00
Mike Place
efe1bf10e8 Merge pull request #38832 from terminalmage/issue38711
archive.extracted: Identify symlinks when checking for incorrect types
2017-01-20 11:36:14 -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
Erik Johnson
d10c068e25 Update archive state unit tests to reflect symlinks in archive.list 2017-01-20 08:49:40 -06:00
Ch3LL
374dc1ab88 skip 2016.3.5 due to :doc: references 2017-01-19 16:14:22 -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
Mike Place
d14f0c64eb Merge pull request #38812 from rallytime/pyobjects-test
Update pyobjects test to be a list
2017-01-18 14:06:00 -07:00
Mike Place
23b8b47258 Merge pull request #38809 from twangboy/fix_hostname_2016.3
Fix get_hostname to handle longer computer names
2017-01-18 12:31:59 -07:00
rallytime
f3e84c1ab7 Update pyobjects test to be a list
Refs the discussion in https://github.com/saltstack/salt/issues/21796#issuecomment-84454088
2017-01-18 12:16:30 -07:00
twangboy
d57a51f9f9 Fix tests for get_hostname 2017-01-18 11:27:50 -07:00
Mike Place
1033bbdde8 Merge pull request #38808 from vutny/fix-38388
Fix #38388
2017-01-18 11:19:35 -07:00
Megan Wilhite
a8a6215663 refine the os detection in archive test (#38807) 2017-01-18 11:03:55 -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
Mike Place
e0bf700020 Merge pull request #38790 from cachedout/fix_pyobjects_test_typo
Fix typo in pyobjects test
2017-01-18 08:38:56 -07:00
Mike Place
a66afb5f0f
Fix typo in pyobjects test 2017-01-17 13:57:20 -07:00
rallytime
64d866f7ab Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-17 11:44:26 -07:00
Mike Place
bab3479a3c Merge pull request #38585 from rallytime/follow-up-38527
Follow up to PR #38527
2017-01-17 11:40:01 -07:00
Mike Place
4e6146f65f Merge pull request #38660 from techhat/cachedir
Don't force salt.cache to use cachedir from opts
2017-01-17 11:38:34 -07:00
rallytime
05587201b6 Pylint fix: add line at end of file 2017-01-17 10:26:43 -07:00
Joseph Hall
be55b57abf One last fix 2017-01-17 10:07:25 -07:00
Joseph Hall
fc24b24998 Add correct function name 2017-01-17 08:55:58 -07:00
rallytime
30e8a66fb0 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/netapi/rest_tornado/saltnado.py
  - tests/integration/netapi/rest_tornado/test_app.py
2017-01-16 18:54:14 -07:00
rallytime
d24776f5e9 Merge branch '2015.8' into '2016.3'
Conflicts:
  - conf/master
  - doc/topics/netapi/index.rst
  - salt/netapi/__init__.py
2017-01-15 16:07:55 -07:00
Joseph Hall
380abd3744 Add cachedir args to tests 2017-01-15 14:46:35 -07:00
rallytime
4e1e45d640 Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-13 14:45:36 -07:00
rallytime
b910499dbe Various follow up fixes
Merge branch '2015.8.12_follow_up' into '2015.8'
2017-01-13 14:40:17 -07:00
rallytime
fa01367599 Keep a copy of the DEFAULT_API_OPTS and restore them after the test run
Without this copy, the settings in DEFAULT_API_OPTS was getting overridden
by the new settings in the unit test. Let's copy those default settings,
and then restore them at the end of the test. These tests have also been
marked as destructive.
2017-01-11 10:35:55 -07:00
rallytime
2ad07634d9 Test clean up 2017-01-10 11:35:48 -07:00
rallytime
fd2ee7db30 Add some simple unit tests for salt.config.api_config function
This will help prevent regressions in this area as discussed in
PR #38527.
2017-01-09 16:44:48 -07:00
Ch3LL
47f8b68e0b fix unit.modules.file_test 2017-01-09 15:01:52 -07:00
rallytime
7a668e9749 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/pillar.py
2017-01-09 11:59:43 -07:00
rallytime
34282322c0 Clean up tests and docs for batch execution
Batch execution was removed from NetapiClient and Saltnado in
previous commits. This change is a follow up that removes related
test cases and doc references.
2017-01-09 11:29:34 -07:00
Jonathan Ballet
2c8845aaa0 add test for pillar.get() + default value 2017-01-06 10:20:13 -05:00
Jonathan Ballet
c2f98d2f04 ticket 38558: add unit test, deepcopy() only if necessary 2017-01-06 10:19:57 -05:00
Erik Johnson
3424a108ac Fix failing unit.states.boto_vpc_test.BotoVpcRouteTableTestCase.test_present_with_routes 2017-01-05 15:41:23 -06:00
rallytime
30f14d15df Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/config/__init__.py
  - salt/engines/slack.py
2017-01-04 16:54:58 -05:00
Mike Place
1895eb7533 Merge pull request #38529 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-01-04 10:06:56 -07:00
Mike Place
325dc56e59 Merge pull request #38554 from multani/fix/30454
Fix YAML deserialization of unicode
2017-01-04 08:31:16 -07:00
Megan Wilhite
1c951d152b fix gce image bug (#38542) 2017-01-04 09:08:04 -05:00
Jonathan Ballet
2e7f743371 yaml: support unicode serialization/deserialization
Fix: #30454
2017-01-04 13:29:28 +01:00
Jonathan Ballet
df76113c5c jinja: test the "yaml" filter with ordered dicts 2017-01-04 13:29:28 +01:00
Pablo Suárez Hernández
68d5475c1f Fixing Snapper unit tests for SUBVOLUME support 2017-01-04 08:59:51 +00:00
rallytime
85f470207c Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-03 10:13:06 -05:00
Daniel Wallace
048b9f6b9d add test 2016-12-29 17:08:24 -06:00
Mike Place
aa0c843553 Merge pull request #38461 from alprs/fix-kapacitor_changes
Improvements/fixes to kapacitor task change detection
2016-12-29 10:08:46 -07:00
Andreas Lutro
52721e97d6 clean up and fix tests 2016-12-29 11:14:24 +01:00
twangboy
e96bfe8fa2 Change OSX/OS X to macOS where possible 2016-12-28 14:49:46 -07:00
Daniel Wallace
7b7c6b3878 file.line fail with mode=delete
If the file is empty, it also fails, fix that.
2016-12-28 11:51:45 -06:00
Mike Place
bbc149c67f Merge pull request #38342 from scthi/bugfix-ext-pillar-nodegroups
Bugfix ext pillar nodegroups
2016-12-22 09:47:42 -07:00
Thilo Schmalfuss
dba315c4b6
ext-pillar nodegroups works for all minions now. 2016-12-22 11:57:17 +01:00
Mike Place
12436efb54 Merge pull request #38354 from gmacon/pip-freeze-all
Use --all when calling pip.py
2016-12-20 13:40:20 -07:00
George Macon
dca24b270e Use --all when calling pip.py
Fixes #38253.
2016-12-20 11:48:00 -05:00
Mike Place
530f495955 Merge pull request #38073 from doublescoring/2016.11
2016.11
2016-12-20 07:51:10 -07:00
rallytime
513058945c Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/ref/states/requisites.rst
  - doc/topics/cloud/profitbricks.rst
  - doc/topics/cloud/vsphere.rst
  - doc/topics/releases/0.9.8.rst
  - doc/topics/releases/releasecandidate.rst
  - salt/cloud/clouds/vsphere.py
  - salt/minion.py
  - salt/states/archive.py
  - tests/unit/states/archive_test.py
2016-12-19 14:58:39 -07:00
Erik Johnson
79231a5d8a archive.extracted: don't try to cache local sources (#38285)
* archive.extracted: don't try to cache local sources

This will keep us from trying to cache file when we already have it
locally, which will help significantly with larger archives.

* Update tests to reflect change in cache behavior

* Add mock return for /bin/tar

This fixes failing tests for Ubuntu 14
2016-12-19 14:37:58 -07:00
Mike Place
a01fade604 Merge pull request #38333 from amendlik/states-alternatives
Suppress errors when checking if an alternative exists
2016-12-19 06:40:48 -07:00
Elias Wulcan
266e0a465c Fixed nested orchestrate not respecting failures
Client was only setting success to false if the function called raised
an exception. This commit changes it to verify the content of return
value with check_state_result
2016-12-19 10:29:05 +01:00
Adam Mendlik
8bfcd5bcd5 Adjust alternatives test for updated error message 2016-12-18 10:04:24 -07:00
Mike Place
09d9cff992 Merge pull request #38288 from terminalmage/archive-extracted-local-source-2016.3
archive.extracted: don't try to cache local sources (2016.3 branch)
2016-12-18 06:07:10 -07:00
rallytime
62978cb7a0 Don't check the doc/conf.py file for doc markup refs 2016-12-16 13:56:12 -07:00
Erik Johnson
845e3d0e75 Update tests to reflect change in cache behavior 2016-12-16 14:09:48 -06:00
rallytime
770e732d76 Add a unit test to search for new doc markup refs 2016-12-16 11:44:39 -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
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
Mike Place
6c1ca9dae7 Merge pull request #38236 from gtmanfred/2016.11
SELINUXTYPE should not be changed
2016-12-15 03:37:06 -07:00
Erik Johnson
6442f8a7b5 Add tests for --strip/--strip-components
Also add a test for an unspecified archive_format, as this did not have
a test case.
2016-12-14 21:57:14 -06:00
Daniel Wallace
d1b070c894 clean up selinux unit test 2016-12-14 11:33:00 -06:00
rallytime
6a327d1367 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-12-13 10:19:47 -07:00
rallytime
bdb807fc7c Skip test_cert_info tls unit test on pyOpenSSL upstream errors
The 16.0.0 version of pyOpenSSL has an upstream error in it that
causes a stacktrace in our test suite. The upstream issue has
been fixed in pyOpenSSL in 16.1.0 and upwards, but 16.0.0 is still
available.

This fix skips the test when the specific error generated by the
upstream bug is encountered during the test.
2016-12-12 14:21:41 -07:00
Nicole Thomas
23c039347e Merge pull request #38182 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2016-12-09 14:25:47 -07:00
Mike Place
8355adc535 Merge pull request #38158 from cachedout/issue_38094
Fix type problem in grains.filter_by
2016-12-09 14:24:40 -07:00
rallytime
609f814454 Reset socket default timeout to None (fixes daemons_tests failures)
Also removed skipIf logic when on Python 2.6. This fix resolves the
same test failures on 2.6 as well as Ubuntu 12 (which is apparently
running Pyhton 2.7 on our test images from Linode these days).
2016-12-09 13:50:48 -07:00
Nicole Thomas
fc95045ba1 Reset socket default timeout to None (fixes daemons_tests failures) (#38181)
Also removed skipIf logic when on Python 2.6. This fix resolves the
same test failures on 2.6 as well as Ubuntu 12 (which is apparently
running Pyhton 2.7 on our test images from Linode these days).
2016-12-09 13:49:44 -07:00
rallytime
627242ab5d Merge branch '2016.3' into '2016.11'
Conflicts:
  - tests/unit/config/config_test.py
2016-12-09 11:45:14 -07:00
Mike Place
e8196e23c2
Lint, remove set literal 2016-12-09 11:37:44 -07:00
Mike Place
65b2ad7b14 Merge pull request #38163 from Ch3LL/enabled_ec2_cloud
enabled ec2 cloud tests
2016-12-09 11:01:57 -07:00
Denys Havrysh
a449980672 Correct cp.get_file_str docstring and add integration tests 2016-12-09 13:05:57 +02:00
Ch3LL
be74c45463 enabled ec2 cloud tests 2016-12-08 12:39:42 -07:00
Denys Havrysh
cd0154ee93 Master config includes may contain errors and be safely skipped 2016-12-08 15:58:44 +02:00
rallytime
28b56ea3b4 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-12-07 13:14:28 -07:00
Nicole Thomas
86091db647 Skip daemon unit tests when running on Python 2.6 (#38134)
When switching the daemon unit tests to using multiprocessing pipes,
this exposed a deep bug in Python 2.6. Let's skip these on 2.6.
2016-12-07 13:09:19 -07:00
Mike Place
9f4ebb3c18
Fix type problem in grains.filter_by
Closes #38094
2016-12-07 11:25:19 -07:00
Mike Place
fd06bab673 Merge pull request #38043 from MTecknology/2016.11
Debian networking fix
2016-12-07 10:32:17 -07:00
rallytime
fec9dec23a Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/win_pkg.py
  - tests/unit/daemons_test.py
  - tests/unit/states/file_test.py
2016-12-06 16:23:51 -07:00
Nicole Thomas
5d9d6b9280 Merge pull request #38057 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2016-12-06 16:11:41 -07:00
Nicole Thomas
9969544653 Account for case where vim install already exists and is at an older version (#38112) 2016-12-06 16:07:56 -07:00
rallytime
342884018b Fix SaltKeyOptionParserTestCase test failures 2016-12-06 15:03:44 -07:00
rallytime
186e2d0d03 Don't allow libcloud mock module injection in unit/states/libcloud_dns_test.py either 2016-12-06 09:24:07 -07:00
rallytime
d513a60189 Do not allow libcloud to be injected as a mock value in the libcloud_dns_test
Other tests rely on importing libcloud, which should
not be a mock value.
2016-12-05 16:55:18 -07:00
Mike Place
9dcfdeef6b Merge pull request #38059 from rallytime/daemons-test-fix
Call exec_test for the Syndic daemon in tests.unit.daemons_test.py
2016-12-03 21:18:41 -07:00
Michael Lustfield
82d2b89e0c Rolling back unit test.
Sorry, I just don't have the time to learn all of this right now.
2016-12-02 20:26:00 -06:00
Michael Lustfield
b3edbcfd05 Adding larger and more complete debian_ip unit test. 2016-12-02 18:59:27 -06:00
rallytime
eb372b27d8 Add missing "not" statement: The last syndic test should assertFalse() 2016-12-02 16:53:39 -07: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
Michael Lustfield
b6b1adc091 Typo: missing closing parenthesis 2016-12-02 14:57:12 -06:00
rallytime
4e10f8e018 Call exec_test for the Syndic daemon in tests.unit.daemons_test.py 2016-12-02 13:08:41 -07:00
Mike Place
9cd42b9b3f Merge pull request #38039 from rallytime/fix-37939
Check to see if a line is already commented before moving on
2016-12-02 13:08:35 -07:00
Michael Lustfield
32a1374748 Corrects expected return value
Tests were failing because _parse_interfaces is returning the correct data per mocked data. The assertion was expecting the iface line to have been stripped.
2016-12-02 13:34:31 -06: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
1ac53e5196 Merge pull request #38004 from terminalmage/issue37969
Fix regression in user/group mgmt for archive.extracted
2016-12-02 11:28:48 -07:00
rallytime
1da7aacfbe Update unit tests to account for additional file.search call
Also removed some mocks that were not needed anymore for the
calls to ``file.contains_regex_multiline`` because that function
is no longer called in the state file.
2016-12-02 11:22:10 -07:00
rallytime
f2c045520d Write an integration test demonstrating the issue 2016-12-01 16:52:03 -07:00
Mike Place
6724fe4871 Modify daemons test to use multiprocessing (#38034)
* Modify daemons test to use multiprocessing

Without this approach, instantiating a master/minion from this test
would affect the parser tests down the line.

* Fix typo

* Fix copy/paste error

* Add missing attr
2016-12-01 15:33:36 -07:00
Erik Johnson
23bb90a7ce Add integration test for archive.extracted with user/group set to root 2016-11-30 13:11:41 -06:00
Mike Place
0a041277ea Merge pull request #37954 from gtmanfred/2016.11
use sleep from path for docker.sls_build
2016-11-30 11:08:44 -07:00
Mike Place
1d221aa91c
Update gem test for 2016.11 2016-11-30 09:44:56 -07:00
Daniel Wallace
9caf0b406d use sleep from path for docker.sls_build
sleep sometimes is found in /bin/sleep, like in ubuntu.  We should just
depend on the PATH variable being correct, and finding sleep, instead of
explicitly saying /usr/bin/sleep
2016-11-30 10:17:30 -06:00
Mike Place
ea46639ce7 Merge pull request #37272 from vutny/fix-getting-default-logging-opts
Get default logging level and log file from default opts dict
2016-11-28 16:04:20 -07:00
Mike Place
894cca3427
Update test for new gem ver 2016-11-28 11:17:07 -07:00
rallytime
dfedd1185a Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/grains/core.py
  - salt/modules/ddns.py
  - salt/templates/rh_ip/network.jinja
2016-11-28 11:08:19 -07:00
Daniel Boughton
ddc238df36 Fixed augeas_test.py to match True v.s. None for test_change_in_test_mode 2016-11-27 08:40:05 -05:00
rallytime
3dfed6b841 Adjust linux_acl unit test argument ordering 2016-11-23 17:02:23 +00:00
Denys Havrysh
518a3dd7ee Add unit tests for Salt parsers processing logging options 2016-11-21 16:53:29 +02:00
rallytime
d5a7ef6ca8 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-11-17 10:37:42 -07:00
Ch3LL
9ef41dcdfc change size and image of joyent profile 2016-11-16 11:54:21 -07:00
Mike Place
3be9ab4cd0 Warn on AES test for systems with > 1 core (#37724)
* Warn on AES test for systems with > 1 core

* Whitespace fix
2016-11-16 09:44:33 -07:00
rallytime
1aa463b4c1 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-11-16 09:27:06 -07:00
Mike Place
f3496297a6 Don't check archive if the archive can't be found (#37723)
Fixes possible false postive failure in archive test
2016-11-16 09:23:39 -07:00
Ch3LL
363122c675 add timeout increase on azure tests 2016-11-15 10:27:44 -07:00
twangboy
a0429cf839 Use nfsd instead of apsd for test_disabled 2016-11-15 09:44:42 -07:00
twangboy
053198aa45 Fix tab 2016-11-15 09:33:01 -07:00
Jenkins
384cf67de5 Use nfsd instead of apsd to test disabled 2016-11-15 09:25:28 -07:00
Mike Place
9738b6359f Merge pull request #37671 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2016-11-15 20:01:09 +13:00
Ch3LL
acd4c3061e fix import for virtualbox test 2016-11-14 14:48:37 -07:00
kevin
1865b13645 Fix 'present' option when used without 'key_type' 2016-11-14 12:16:51 -07:00
rallytime
0e332ab591 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/cli/batch.py
  - salt/cli/salt.py
  - salt/transport/client.py
  - salt/utils/vmware.py
  - tests/integration/modules/sysmod.py
2016-11-14 09:14:00 -07:00
Mike Place
305e51d1c0 Merge pull request #37625 from cachedout/issue_37492
Return with proper retcodes in batch mode
2016-11-12 20:29:09 +00:00
Mike Place
737436a463 Merge pull request #37146 from cachedout/master_pub_error_reporting
Master publish error reporting
2016-11-11 22:52:31 +13:00
Mike Place
b14faf1c68 Merge pull request #37611 from jeanpralo/fix-cmd-batch-raw
Fix cmd batch raw
2016-11-11 15:53:58 +13:00
Mike Place
4fab707bdd Merge pull request #37627 from cachedout/pr-36706
Exempt pip.iteritems from test_valid_docs test
2016-11-11 15:48:37 +13:00
Mike Place
94df2f8e6f
Exempt pip.iteritems from test_valid_docs test 2016-11-11 15:47:43 +13:00
Mike Place
2c2dc93640
Fix test and check for jid not in pub_data 2016-11-11 15:37:47 +13:00
Jean Praloran
4f16840ef1 add integration test for salt.client.LocalClient.cmd_batch 2016-11-11 14:20:51 +13:00
Mike Place
b6031524e5
Return with proper retcodes in batch mode
Check for the highest retcode received in batch mode and exit with it.

Also, an integration test for the same.

Closes #37492
2016-11-11 14:03:29 +13:00
rallytime
4c245a3fa5 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/x509.py
2016-11-10 16:51:52 -07:00
rallytime
f44e14b63c Merge branch 'carbon' into '2016.11'
Conflicts:
  - salt/modules/file.py
2016-11-09 12:56:58 -07:00
Erik Johnson
2810b85cac Add a test to ensure we don't check for fast-forward before fetching (#37571) 2016-11-09 12:43:25 -07:00
Erik Johnson
2fc0b222bc Fix regression in service.dead state (#37562)
* Fix regression in service.dead state when service is not available

This was originally broken in c4f899b.

* Add unit test for issue 37511
2016-11-08 14:58:33 -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
rallytime
5ead1425d7 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/win_servermanager.py
2016-11-08 13:04:33 -07:00
Nicole Thomas
453319b50a Don't pass the vpc id to boto.vpc.create_internet_gateway func (#37556)
That function's namespace looks like this:
```
def create_internet_gateway(self, dry_run=False):
```
So when we pass in the vpc_id opbject in the test, the check later
in the function sets `dry_run=True` since the vpc_id opbject exists.

This later throws JSONResponseErrors because the `DryRun` flag is
set. This error raising functionality was added in the most recent
version of moto, which exposed this bug.

This fixes the three boto_vpc_test unit state tests. We'll see if
other tests need to be addressed in other files on a full test run.
2016-11-08 12:48:26 -07:00
rallytime
eae3b9e30f Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-07 08:15:42 -07:00
rallytime
3b56f8bce1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/event/master_events.rst
2016-11-07 08:13:57 -07:00
Mike Place
be93710fee Merge pull request #37452 from rallytime/fix-31135
file.line with mode=replace on an empty file should return False, not stacktrace
2016-11-06 14:55:11 +13:00
rallytime
9b3e4414c8 Merge branch '2016.3' into 'carbon'
Conflicts:
  - pkg/windows/modules/get-settings.psm1
  - salt/modules/mac_power.py
  - salt/modules/win_dsc.py
  - salt/modules/win_servermanager.py
  - salt/states/file.py
  - salt/utils/event.py
  - salt/utils/gitfs.py
2016-11-04 15:23:49 -06:00
rallytime
4132929832 Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-04 13:38:34 -06:00
Erik Johnson
a3f38e5a9f Update file.extract_hash unit tests
These tests now not only test the new functionality added for matching
on source URI and source_hash_name, but also test non-specific hash_type
lookups, specific hash_type lookups, and failed specific hash_type
lookups (i.e. requesting a hash type not present in the file).
2016-11-04 11:25:54 -05:00
Pablo Suárez Hernández
4ae036055d Fix unit test for Zypper dist-upgrade in Carbon 2016-11-04 09:36:41 -06:00
Mike Place
580eca709b Merge pull request #37121 from nevins-b/2016.3
allow the file.recurse state to support saltenv
2016-11-04 18:59:28 +13:00
rallytime
94a00c66eb Write a unit test demonstrating stack trace in #31135
Here is the stack trace that happens when running file.line with
mode=replace on a file that exists, but is empty, as described in
the bug report:

unit.modules.file_test.FileModuleTestCase.test_replace_line_in_empty_file  .................................................
   Traceback (most recent call last):
     File "/root/SaltStack/salt/tests/unit/modules/file_test.py", line 593, in test_replace_line_in_empty_file
       mode='replace'))
     File "/root/SaltStack/salt/salt/modules/file.py", line 1523, in line
       for line in body.split(os.linesep)])
   TypeError: expected a character buffer object
2016-11-03 14:57:10 -06:00
rallytime
4080cb4f12 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-11-03 08:54:32 -06:00
Pablo Suárez Hernández
ffc596f215 Including resolver params for Zypper debug-solver
Now '--no-allow-vendor-change' and '--from' parameters are included
into the zypper --debug-solver call before performing a dry-run dist-upgrade.
2016-11-03 08:34:26 +00:00
rallytime
c31f879f8b Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cloud/clouds/vmware.py
2016-11-02 11:33:21 -06:00
Aditya Kulkarni
e9b4620fac Add unit tests for cloning from snapshot (#37414) 2016-11-02 11:22:37 -06:00
Nicole Thomas
8679ce4510 Back-port #37321 to 2016.11 (#37409)
* status.uptime - avoid nawks srand, causes problems on smartos

* status.uptime - remove docs comment that no longer applies

* status.uptime - optimize a tiny it and get rid of the need for a shell

* status.uptime - actually remove the now redudent line too

* status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now

* status.uptime - support python pre 2.7 as per damon-atkins

* status.uptime - want OpenBSD support

* status.uptime - want freebsd support, removed fallback once again so we are consistant

* status.uptime - want NetBSD support

* status.uptime - fold @jfindlay  work for OSX into mine, tweak mine based on his work

* status.uptime - push tests from @jfindlay with updates SunOS test

* status.uptime - remove cmd.run_all as it was replaced by sysctl.get

* status.uptime - attempt to fix sunos test

* Figured out why there was a cmd.run mock  was there.

* add note for SunOS, so we do not forget

* Update version added tag
2016-11-02 09:50:30 -06:00
Erik Johnson
3014afd517 Overhaul archive.extracted state
This fixes a number of annoyances with the archive.extracted state.
Rather than re-state the changes again here, they can be observed in the
carbon release notes, where they have been documented.
2016-11-01 19:35:57 -05:00
rallytime
e082ff538b Fix failing test now that we're raising a CommandExecutionError
Also adds a test to check that the CommandExecutionError is raised
when the filename is not present.
2016-11-01 15:51:09 -06:00
rallytime
fd380c79b9 Add test case to reproduce dnsmasq.set_config failure in #34263 2016-11-01 14:31:14 -06:00
rallytime
da79271aed Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-01 10:43:07 -06:00
rallytime
b1d64448c8 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/utils/context.py
2016-11-01 09:33:29 -06:00
Thomas S Hatch
1a4833b3a1 Merge pull request #37279 from gtmanfred/2016.3
initialize super class of NamespacedDictWrapper
2016-11-01 09:12:49 -06:00
rallytime
ba5583938b Update mac_package unit tests: remove --no-compress flag 2016-10-31 16:13:48 -06:00
rallytime
e10058c831 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-10-31 10:15:25 -06: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
Mike Place
534a21e8d6
Remove test
I don't know why this would exist in a client test. This is tested extensively
already in the loader tests, which is the appropriate place.
2016-10-31 20:39:34 +13:00
Mike Place
63ba6b03ad Merge pull request #37301 from cachedout/fix_pkg_test
Fix typo in pkg upgrade test
2016-10-28 20:24:30 +09:00