Commit Graph

9187 Commits

Author SHA1 Message Date
Pedro Algarvio
20a4d7bb39
Under Py3, stat.S_ISLNK() expects an integer. Mock it. 2017-02-17 20:47:55 +00:00
Mike Place
9c4292fb4e Merge pull request #39423 from dincamihai/openscap
Openscap module
2017-02-17 11:31:04 -07:00
Mike Place
e85eff4865 Merge pull request #39468 from twangboy/win_git_test_init
Fix test_init for Windows
2017-02-17 09:57:12 -07:00
Mihai Dinca
9d13422ac1 OpenSCAP module 2017-02-17 13:50:29 +01:00
twangboy
812c857770 Fix test_init for Windows 2017-02-16 16:00:45 -07:00
Nicole Thomas
1577bb68af Merge pull request #39459 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-02-16 14:30:31 -07:00
Mike Place
e652a45592
Fix mocks in win_disim tests 2017-02-16 12:26:49 -07:00
rallytime
dda39d4e63 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/minion.py
  - salt/modules/file.py
  - salt/modules/grains.py
  - salt/utils/gitfs.py
2017-02-16 12:18:46 -07:00
Megan Wilhite
1acf00da3b add 2016.11.3 changelog to release notes (#39451) 2017-02-16 10:49:53 -07:00
rallytime
3a8bd786e0 Remove global dunder definistions from tests
These dunders are already being mocked appropriately below in the test, so we
don't need to define them in the test module's namespace.

The global definitions here were conflicting with the globals defined in
`saltmod_test.py`, and causing the following stacktrace in the test suite:

```
Traceback (most recent call last):
  File "/root/SaltStack/salt/tests/unit/saltmod_test.py", line 71, in test_state
    self.assertDictEqual(saltmod.state(name, tgt, highstate=True), test_ret)
  File "/root/SaltStack/salt/salt/states/saltmod.py", line 252, in state
    masterless = __opts__['__role'] == 'minion' and \
KeyError: '__role'
```
2017-02-16 10:33:32 -07:00
Mike Place
16332ae957 Merge pull request #39433 from twangboy/win_new_tests
Add additional tests to the Windows whitelist
2017-02-15 17:03:17 -07:00
twangboy
2e9122e134 Fix fileserver.fileclient reference 2017-02-15 22:44:09 +00: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
twangboy
98d5cc3e1b Add additional tests to the Windows whitelist 2017-02-15 21:21:55 +00:00
Joseph Hall
b34d42f98c Add version control to SPM repo creation 2017-02-15 14:21:03 -07:00
Daniel Wallace
d332b33c8a add extmod_blacklist to make it easier to remove modules 2017-02-15 12:47:32 -06: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
Pedro Algarvio
fc59d5e832 Python 3 Fixes (Pt. 2) (#39397)
* Typo in comment

* First convert to string if not already a string. Then to bytes under Py3.

The reason being that jids from the CLI, at least the one fed in
integration.runners.jobs.ManageTest.test_loopup_jid is loaded as an
integer, and, while the Py2 code converts JIDs to strings, under Py3, we
assume JID's are already strings.

* Mark tests which require root permissions to run

* Allow declaring that the function IS a class method.

```
Python 3.5.3 (default, Jan 21 2017, 00:29:12)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
...     def bar(self):
...         print('bar')
...
>>> import inspect
>>> inspect.ismethod(Foo.bar)
False
>>> inspect.ismethod(Foo().bar)
True
```

On Python 2, `inspect.ismethod` returns `True` for bound and unbound
methods while on Python 3 it only returns `True` for bound methods.
The explicit `is_class_method` is to avoid instantiating the class just
to get the function signature.

* Always decode responses to the Python version native string implementation

* Just compare the objects as matching list.

Asserting same item count doesn't make that much sense.

* Py3 compatibility

* Fix saltnado tests under Py3

* Python 3 compatibility

* Show me the full traceback

* Revert "Convert fileserver data from bytes to strings"

This reverts commit e53972f8c6.

* Revert "Under Py3, we get `bytes` when using the roots backend directly"

This reverts commit 9f73b240c1.

* Convert from bytes to str if not a binary file

* Py3 compatibility fixes.

Convert file contents from bytes to string if not a binary file
2017-02-14 16:20:56 -07:00
Nicole Thomas
3a39e15dff Rewrite blockdev unit test to target more specific state returns (#39402)
The previous way this test was written was over-mocking some of the
state returns as well as tested and asserted against incorrect
behavior as shown in issue #39255. (The test asserted that a return
of '' from the call to _checkblk() was correct, which was hiding a
bug as noted in #39255 and fixed in #39272.)
2017-02-14 13:49:14 -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
Mike Place
868e170b92 Merge pull request #39376 from jmickle/develop
adding librato metrics returner
2017-02-14 11:39:34 -07:00
Mike Place
1ecc9d1315 Add newline for lint 2017-02-14 11:26:23 -07:00
Mike Place
2b67008770 Merge pull request #39374 from techhat/spmcache
Switch SPM to salt.cache
2017-02-14 10:58:10 -07:00
Mike Place
471baea629 Merge pull request #39381 from cachedout/docs_fix
Docs test fix
2017-02-14 10:53:27 -07:00
Mihai Dinca
91383c5a19 Add cp.push test 2017-02-14 17:16:28 +01:00
Isa
72d2188cbb return true when symlinks already in desired state 2017-02-13 18:10:28 -08:00
Joseph Hall
4f072c9ad8 Add cache default for spm 2017-02-13 16:59:07 -07:00
Mike Place
89ed6a38f7
Typo 2017-02-13 16:46:53 -07:00
Mike Place
8fbbb781bc
Fix docs test 2017-02-13 16:45:47 -07:00
Jonathan Mickle
ec938e5f73 linter fixes 2017-02-13 15:27:07 -08:00
mephi42
6570392abd Support globbing in sources parameter of salt.modules.archive (#32356)
Add globbing support to tar, zip and rar.
Update tests to show bad return value on error.
2017-02-14 00:02:19 +01:00
Jonathan Mickle
d61865c2bc adding librato metrics returner 2017-02-13 14:18:54 -08:00
Mike Place
dcd9ff471f Merge pull request #39302 from terminalmage/loader-virtual-aliases
Add __virtual_aliases__ feature to the loader
2017-02-13 13:22:02 -07: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
Mike Place
1951216b22 Merge pull request #39320 from s0undt3ch/features/py3
Py3 Fixes
2017-02-13 12:28:32 -07:00
Pedro Algarvio
9f73b240c1
Under Py3, we get bytes when using the roots backend directly 2017-02-13 16:44:30 +00:00
Pedro Algarvio
ff1667c6d6
We really don't need to decode the string prior to writing it to file.
Plus, this also avoids handling Py2 and Py3 differently.
2017-02-13 16:25:09 +00:00
Daniel Hobley
3a3ef25b51 Fix add beacon when there are no devices
- Changed the assumption that having 0 lines means there are no devices, to actually checking there are no devices
2017-02-13 13:33:52 +01:00
Pedro Algarvio
005f21d3b5
Compare against the normalized mode string 2017-02-13 10:18:58 +00:00
Pedro Algarvio
c1b5606199
Handle bytes vs strings on the file state module tests 2017-02-13 10:18:57 +00:00
Pedro Algarvio
26b17fb044
Make sure the minion sync's modules/states/grains/etc when starting 2017-02-13 10:18:57 +00:00
Pedro Algarvio
7b7133ea25
This test case requires root permissions 2017-02-13 10:18:56 +00:00
Erik Johnson
6ee6874e11 Set time back 1 week instead of up to 36 years in system module tests
This prevents git_pillar certificate errors. Additionally, sometimes
/dev/rtc becomes unresponsive which leads the ``hwclock --compare``
command to spin indefinitely, ultimately causing the entire test run to
fail. This changeset uses a SIGALRM handler to abort the hwclock command
if no output is seen within 3 seconds and try a second time. If it times
out the second time as well, then an error will be logged but it will
not be fatal to the test (or hang it indefinitely).
2017-02-12 23:57:28 -06:00
Erik Johnson
4e577e697d Switch to non-legacy git_pillar syntax in test suite 2017-02-12 15:12:49 -06:00
Michael Calmer
17521fb23c added unit test for dockerng.sls_build dryrun option (#39305) 2017-02-10 16:11:26 -07:00
Nicole Thomas
050b4cc824 Protect hardware clock test comparison better (#39298)
In #39060, some tests were added to check for the hardware clock
getting reset when possible. The test attempted to gate the test
when access to the hardware clock was impossible, but the check
wasn't quite right and caused problems with the resulting tests.

This change makes the `has_settable_hwclock()` function public
in order to make the test gate work correctly. This function
could also be useful at the CLI level.

When running `self.run_function('status._has_settable_hwclock()')`
from the test suite, the return is a string noting that the
function is unavailable. This change allows for the `if not` check
to evaluate the return of the function.
2017-02-10 10:15:25 -07:00
Ch3LL
b3cbc5a408 improve salt-run salt.cmd test 2017-02-10 09:00:12 -07:00
Erik Johnson
954752b5fd Add test for __virtual_aliases__ 2017-02-10 08:48:57 -06:00
kstreee
51972d0724 Removes a redundant test case after removed 'batch' in 'netapi'. 2017-02-10 07:12:22 +00:00
Mike Place
1d813bd902 Merge pull request #39283 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-02-09 15:10:03 -07:00
Pedro Algarvio
b82bf6bebf
Inform on which python version we are running on 2017-02-09 18:06:30 +00:00
Pedro Algarvio
b264114901
Restore full user permissions when failing to delete 2017-02-09 18:06:27 +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
Mike Place
bac99d9e72 Merge pull request #39252 from gtmanfred/extmod_whitelist
Allow specifying which modules should be used when running saltutil.sync_*
2017-02-09 10:09:43 -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
Nicole Thomas
63c7c79455 Fix the new jinja_test failures (#39262)
Refs #37808

The max fuction returns an int, not a float, as does the min function.
This updates the assertions to compare against ints.
2017-02-09 08:53:00 -07:00
Nicole Thomas
05d4df4a0e Add __utils__ to sdb unit test (#39261)
Refs #39174
2017-02-09 08:52:16 -07:00
rallytime
a9c2c106c1 Pylint fix 2017-02-09 08:50:56 -07:00
Daniel Wallace
e38c5d296b fix pylint 2017-02-08 18:07:13 -06: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
Daniel Wallace
57ab8dd27b add integration test 2017-02-08 16:08:50 -06: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
d5d39321c8 Merge pull request #37808 from cloudflare/JINJA-FILTERS
Jinja filters
2017-02-07 14:52:23 -07:00
Mike Place
7dd7fe3269 Merge pull request #39229 from rallytime/doc-test-fix
Fixup docs that don't have a CLI Example
2017-02-07 14:45:08 -07:00
Mike Place
0f838b2b12 Merge pull request #38621 from terminalmage/pr34442
Add support for wildcard versions in pkg.installed states
2017-02-07 14:41:14 -07:00
rallytime
50b9ac6a6d Fixup docs that don't have a CLI Example
- log functions shouldn't be used at the CLI level: added to allow_failure in test
- Added example for status.proxy_reconnect
2017-02-07 13:40:01 -07:00
Erik Johnson
da7d3ecec0 Add integration test for wildcard versions 2017-02-07 08:54:26 -06:00
Mike Place
c48192beff Merge pull request #38781 from raazvvann/dev/rheghedu/nilrt_ip
Add network module for NILinuxRT: nilrt_ip.py
2017-02-06 12:30:43 -07:00
Mike Place
f8d79076f2 Merge pull request #39013 from terminalmage/zh878
Decryption of values in Pillar SLS files
2017-02-06 12:08:57 -07:00
Mike Place
0b480a6244 Merge pull request #39140 from eradman/pillarenv
Allow pillar environment to be specified for salt-run
2017-02-06 11:38:35 -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
88cc195a2a Merge branch '2016.11' into 'develop'
No conflicts.
2017-02-03 10:58:55 -07:00
Mike Place
fa525567cf Merge pull request #39150 from rallytime/python3-compat-fixes
Python 3 Test Fixes
2017-02-03 10:13:58 -07: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
Heghedus Razvan
8408789511 Add network module for NILinuxRT: nilrt_ip.py
Connman is the network manager used as backend.
Functionalities:
  - ip.get_interface_details()
  - ip.up(interface)
  - ip.down(interface)
  - ip.set_dhcp_linklocal_all(interface)
  - ip.set_static_all(interface, address, netmask, gateway, domains)
  - ip.build_interface(interface, interface_type, enable, **settings)
  - ip.build_network_settings(**settings)
  - ip.get_network_settings()
  - ip.apply_network_settings(**settings)

Integration test for:
  - ip.enable
  - ip.disable
  - ip.set_dhcp_linklocal_all
  - ip.set_static_all

Signed-off-by: Heghedus Razvan <razvan.heghedus@ni.com>
2017-02-03 14:25:03 +02:00
Erik Johnson
cdf045662f add debug logging for batch vars 2017-02-02 18:06:50 -06:00
Erik Johnson
316e62889a 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-02 18:06:50 -06:00
Erik Johnson
56e86a6e04 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-02 18:06:50 -06:00
Erik Johnson
6221fd0573 Add tests for pillar decryption 2017-02-02 18:06:50 -06:00
rallytime
4595f81685 [PY3] Sort return data and mock data for testing stability 2017-02-02 22:56:00 +00:00
rallytime
ee2edda14e [PY3] Test comment contents more carefully for list stability
Stabilizes these tests by avoiding errors when cheese, crackers
order changes in the comment and gives errors like:

-  'comment': 'Kernel modules crackers, cheese are already present',
?                                     --------

+  'comment': 'Kernel modules cheese, crackers are already present',
?                            ++++++++
2017-02-02 22:34:20 +00:00
Eric Radman
c22f3f6dc7 Allow pillar environment to be specified for salt-run
Example:
  salt-run state.sls deploy saltenv=base pillarenv=dev
2017-02-02 13:19:20 -05:00
rallytime
eb61788f87 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/runners/all/index.rst
  - salt/modules/win_lgpo.py
  - salt/states/dockerio.py
2017-02-01 16:36:45 -07: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
4ed8085d27 Merge pull request #39060 from harisokanovic/dev/hokanovi/hwclock-sync
system: Update hardware clock on date/time change
2017-02-01 12:22:20 -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
Haris Okanovic
c5f832b9e3 system: Update hardware clock on date/time change
Update hardware clock so that date/time changes persist
through reboot.

Add hwclock check to system integration test. Bump tolerance
of _same_times() helper to account for longer run-time of set
operations. Updating hardware rtc's can take more than 2 seconds.

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
Reviewed-by: Sergey Kizunov <sergey.kizunov@ni.com>
Reviewed-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Reviewed-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
2017-01-31 17:40:40 -06:00
Mike Place
1ccb365945 Merge pull request #39002 from rallytime/fix-38111
Pass win_* options as kwargs when calling file.manage_file
2017-01-31 13:51:39 -07: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
2f532ff9f8 Merge pull request #39080 from kraney/boto_lambda_envvar
Added Lambda environment variables support to boto_lambda modules/states
2017-01-31 13:20:40 -07:00
Mike Place
bdaa52ac4e Merge pull request #39043 from twangboy/develop
SaltTesting fixes for Windows
2017-01-31 12:27:39 -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
Winston Liu
c2d35d181f update botocore dependencies, skip if not met. 2017-01-31 10:49:34 -08:00
Sergei Zviagintsev
f4bf77a996 Fix test name (#39061)
Remove an unnecessary underscore character from the name of the
linux_lvm.lvdisplay test:

  test__lvdisplay -> test_lvdisplay
2017-01-31 10:20:13 -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
Winston Liu
dc8344f0c2 updated boto_lambda execution module with 'lambda environment variables' 2017-01-30 16:00:16 -08:00
twangboy
c704eaa175 Fix geteuid stacktrace on Windows 2017-01-30 15:36:08 -07:00
rallytime
43dba1bf78 Skip new managed file state test on Windows 2017-01-30 13:40:25 -07:00
Nicole Thomas
7fa89303a1 Merge pull request #39026 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-01-30 10:39:18 -07:00
Julien BONACHERA
1e06f388bb make openvswitch state work with python3 (#38873)
* openvswitch: add a basic unit test for openvswitch

* openvswitch: enclose comments_* variables into a map

* openvswitch: only prepare error messages if type parameter is present

* openvswitch: add test case: create a GRE port

* openvswitch: remove trailing whitespace

* openvswitch: add missing "comments" variable

* openvswitch: pep8 compliance

* openvswitch: mock dig.check_ip

* openvswitch: rename "type" argument into "tunnel_type"

* openvswitch: reference bridge_exists before assignment

* openvswitch: reference port_list before assignment

* openvswitch: add upgrade note about "type" option renaming
2017-01-30 09:56:10 -07:00
Mike Place
191a1e55ae Merge pull request #39006 from rallytime/python3-fixes
Various Python 3 compatibility fixes
2017-01-30 09:54:28 -07:00
Mike Place
984e6de244 Merge pull request #39024 from moio/minionswarm-set-machine-id
minionswarm.py: allow random machine id
2017-01-30 09:31:15 -07:00
Mike Place
80e4aa2ea2 Merge pull request #39022 from moio/minionswarm-reuse-existing-data
minionswarm.py: allow temporary data reuse
2017-01-30 09:29:30 -07:00
rallytime
8928436bdd Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/pillar/__init__.py
2017-01-30 09:06:27 -07:00
Silvio Moioli
f454dbd84c minionswarm.py: use predictable random numbers 2017-01-30 16:34:01 +01:00
Silvio Moioli
f27e0e8f4e minionswarm.py: allow random machine id 2017-01-30 14:21:52 +01:00
Silvio Moioli
382cf21b5f minionswarm.py: allow re-use of temporary files 2017-01-30 13:23:45 +01:00
Silvio Moioli
b2f7d3e3cf minionswarm.py: add option to specify temp dir 2017-01-30 13:23:45 +01: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
b0631ce005 [PY3] Fix timezone module unit tests
When writing to a file, the string needs to be converted to bytes first.
2017-01-27 12:15:39 -07:00
rallytime
76e95087fd Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-27 11:52:03 -07:00
rallytime
8e17c96e02 Write failing test for Issue #38111
Test calls "file.managed" using the "check_cmd" kwarg with the
state provided as a reproducible test case for the issue.
2017-01-27 11:28:54 -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
Nicole Thomas
7c93bcbb2a Add one more option to "allow_failure" for doc test (#38998) 2017-01-27 09:43:04 -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
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
Mike Place
efa83bc6f0 Merge pull request #38976 from rallytime/develop-docstring-fixes
More docstring fixes for the new sysmod doc test failures
2017-01-26 12:58:34 -07:00
Nicole Thomas
ca090fff1a Add new logging options to parsers_test mock for develop (#38974) 2017-01-26 12:47:23 -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
rallytime
089ad59b90 Update the vsphere execution module docs to satisfy failing doc test
- Added the "CLI Example:" syntax to function that were missing it
- Added docs to functions missing any docs and CLI examples
- Added to functions to allow_failure in sysmod test as needed
- Also adjusted the ordering of the allow_failure structure to make it
  easier to see which modules/funcitons were included (alphabetize)
2017-01-26 11:56:06 -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
Mike Place
bbadc37301 Merge pull request #38945 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-01-25 12:36:18 -07:00
Eric Radman
3e03f8a400 Fix ssh key deployment when using minimal salt-ssh roster
Allows this code path to succeed for a minimal roster file that does not
specify `ssh_options`

$ sudo salt-ssh 'login1*' test.ping
Permission denied for host login1, do you want to deploy the salt-ssh
key? (password required):
[Y/n] Y
Password for root@login1:
login1:
    True
2017-01-25 12:43:11 -05:00
rallytime
49f57ba3f1 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/utils/win_functions.py
2017-01-25 09:59:29 -07: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
Mircea Ulinic
1b397e1b21 Lindt 2017-01-25 16:32:09 +00:00
Bo Maryniuk
47a16916c3 Add unit test 2017-01-25 15:44:38 +01:00
Stefano Pogliani
23468cbcd1 Apply glob pattern to file_roots and pillar_roots (master & minion).
Implements #38736
2017-01-23 23:30:34 +00: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