Erik Johnson
c6b655b6e9
Move 14 more functions from salt.utils
...
These functions are:
salt.utils.test_mode -> salt.utils.args.test_mode
salt.utils.split_input -> salt.utils.args.split_input
alt.utils.pem_finger -> salt.utils.crypt.pem_finger
salt.utils.is_bin_file -> salt.utils.files.is_binary
salt.utils.list_files -> salt.utils.files.list_files
salt.utils.safe_walk -> salt.utils.files.safe_walk
salt.utils.st_mode_to_octal -> salt.utils.files.st_mode_to_octal
salt.utils.normalize_mode -> salt.utils.files.normalize_mode
salt.utils.human_size_to_bytes -> salt.utils.files.human_size_to_bytes
salt.utils.get_hash -> salt.utils.hashutils.get_hash
salt.utils.is_list -> salt.utils.data.is_list
salt.utils.is_iter -> salt.utils.data.is_iter
salt.utils.isorted -> salt.utils.data.sorted_ignorecase
salt.utils.is_true -> salt.utils.data.is_true
2017-10-13 09:29:03 -05:00
Erik Johnson
1e2e2b6ac5
Move 5 functions from salt.utils
...
These functions are:
- salt.utils.ip_bracket -> salt.utils.zeromq.ip_bracket
- salt.utils.gen_mac -> salt.utils.network.gen_mac
- salt.utils.mac_str_to_bytes -> salt.utils.network.mac_str_to_bytes
- salt.utils.refresh_dns -> salt.utils.network.refresh_dns
- salt.utils.dns_check -> salt.utils.network.dns_check
2017-10-12 09:07:00 -05:00
Erik Johnson
554c685ce5
Move 4 functions from salt.utils
...
- salt.utils.reinit_crypto -> salt.utils.crypt.reinit_crypto
- salt.utils.appendproctitle -> salt.utils.process.appendproctitle
- salt.utils.daemonize -> salt.utils.process.daemonize
- salt.utils.daemonize_if -> salt.utils.process.daemonize_if
2017-10-11 14:49:50 -05:00
Nicole Thomas
3a078304d8
Merge pull request #43982 from terminalmage/salt.utils.data
...
Move 13 functions from salt.utils to salt.utils.data
2017-10-11 11:42:08 -04:00
Erik Johnson
d947ddf176
Move 13 functions from salt.utils to salt.utils.data
...
These functions are:
- salt.utils.compare_dicts
- salt.utils.compare_lists
- salt.utils.decode_dict
- salt.utils.decode_list
- salt.utils.exactly_n
- salt.utils.exactly_one
- salt.utils.traverse_dict
- salt.utils.filter_by
- salt.utils.traverse_dict_and_list
- salt.utils.subdict_match
- salt.utils.substr_in_list
- salt.utils.is_dictlist
- salt.utils.repack_dictlist
2017-10-10 17:42:42 -05:00
twangboy
00dbba5712
Fix unit.test_pillar
for Windows
...
Use delete=True in NamedTemporaryFile command otherwise the handle to
the file isn't released and the file can't be opened by the actual test.
2017-10-10 13:44:58 -06:00
Erik Johnson
92e05cf1c0
Don't allow path separators in minion ID
2017-10-10 11:03:29 -04:00
Erik Johnson
19481423dd
Don't allow path separators in minion ID
2017-10-10 10:58:42 -04:00
garethgreenaway
76ff44bc84
Merge branch 'develop' into vagrant-module
2017-10-09 09:06:42 -07:00
Daniel Wallace
1f8ec5d335
Merge branch 'develop' into vagrant-module
2017-10-06 11:32:31 -06:00
garethgreenaway
11c7d3ab39
Merge branch 'develop' into unit-test-sdb
2017-10-06 07:28:42 -07:00
Nicole Thomas
d136650b31
Merge pull request #43938 from terminalmage/salt.utils.user
...
Move several functions from salt.utils to salt.utils.user
2017-10-06 09:42:42 -04:00
Erik Johnson
aa3309ef59
Move several functions from salt.utils to salt.utils.user
...
These functions are as follows:
- salt.utils.get_user
- salt.utils.get_uid
- salt.utils.get_specific_user
- salt.utils.chugid
- salt.utils.chugid_and_umask
- salt.utils.get_default_group
- salt.utils.get_group_list
- salt.utils.get_group_dict
- salt.utils.get_gid_list
- salt.utils.get_gid
2017-10-05 19:50:14 -05:00
twangboy
254dac7723
Fix unit.utils.test_utils
for Windows
...
Use os agnostic path seps
Mock sys.platform to not return win
2017-10-05 16:47:32 -06:00
garethgreenaway
53509e8d46
Merge branch 'develop' into unit-test-sdb
2017-10-05 15:35:13 -07:00
Nicole Thomas
31a641ce74
Merge branch 'develop' into panos-2017-9-26
2017-10-05 16:19:37 -04:00
Nicole Thomas
7785919437
Merge pull request #43829 from rallytime/merge-develop
...
[develop] Merge forward from 2017.7 to develop
2017-10-05 16:09:23 -04:00
garethgreenaway
4c5af8cc96
Merge branch 'develop' into unit-test-sdb
2017-10-05 13:01:01 -07:00
garethgreenaway
37d7f13926
Merge branch 'develop' into vagrant-module
2017-10-05 10:25:24 -07:00
rallytime
eaca3291e2
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- tests/unit/modules/test_state.py
2017-10-05 12:09:40 -04:00
Nicole Thomas
a9dc04fb7f
Lint: disable the unused-import check
2017-10-05 08:51:16 -04:00
Eric Radman
0dc3c4ef1c
Skip some vsphere tests if pyvmomi library is not installed
...
Also fix up 'E127: continuation line over-indented' lint errors
2017-10-04 13:09:29 -04:00
Vernon Cole
73947e3103
lint (again!) blank lines can have no spaces
2017-10-04 09:10:47 -06:00
Vernon Cole
67a701de7c
lint PEP-8
2017-10-03 23:23:17 -06:00
Vernon Cole
83a3678cef
provide mocked unit tests
2017-10-03 17:24:05 -06:00
Vernon Cole
7d5a121265
Skip unit tests under Python3 until loader is fixed
2017-10-03 10:22:18 -06:00
rallytime
b7dae5addd
Bump with statements in one level
...
This is needed because the previous commit changed the context
management style from nested with statements to stacked with
statements.
2017-10-03 12:18:27 -04:00
garethgreenaway
6034b36bf6
Merge branch 'develop' into unit-test-sdb
2017-10-03 09:07:35 -07:00
Vernon Cole
c6b2e1e35b
update tests to match improved module
...
(cherry picked from commit 7fcdc51)
2017-10-02 22:10:37 -06:00
Vernon Cole
f96740d278
use recommended source for TMP directory
2017-10-02 21:07:27 -06:00
Vernon Cole
2bccf228ba
fix code-lint complaint
2017-10-02 12:18:11 -06:00
garethgreenaway
6c20e146c3
Lint Fixes
...
Lint Fixes
2017-10-02 10:10:53 -07:00
Erik Johnson
5d56a03a67
Improve failures for module.run states
...
Bare asserts are zero help in troubleshooting. This commit changes the
tests that uses bare asserts such that they fail with a useful error
mesage as well as the return data from the module.run call.
2017-10-02 10:48:45 -05:00
Vernon Cole
22792e56cc
lint, style, and Windows fixes
2017-10-02 09:48:27 -06:00
Alexandru Bleotu
3c6418b98f
pylint
2017-09-29 19:45:56 -04:00
Vernon Cole
18357ac59d
provide a unit test for the sdb utility
2017-09-29 13:58:13 -06:00
spenceation
0f3503ee22
Added unit test for utils/xmlutil.
2017-09-29 15:30:15 -04:00
twangboy
fd1d6c31de
Fix unit.states.test_augeas
for Windows
...
Mock `os.path.isfile` so the test will continue
2017-09-29 12:52:32 -06:00
rallytime
c976df7c09
Fix mocking in test_status since the "which" util has moved
2017-09-29 13:56:01 -04:00
Alexandru Bleotu
0c6a49ba38
Added tests for salt.utils.vsan.remove_diskgroup
2017-09-29 13:39:59 -04:00
Alexandru Bleotu
9de868fdfb
Added tests for salt.utils.vsan.remove_capacity_from_diskgroup
2017-09-29 13:39:57 -04:00
Alexandru Bleotu
32d44142f2
Added tests for salt.utils.vsan.add_capacity_to_diskgroup
2017-09-29 13:39:54 -04:00
Alexandru Bleotu
d813164d18
Added tests for salt.utils.vsan.create_diskgroup
2017-09-29 13:39:52 -04:00
Alexandru Bleotu
523a2ac21d
Added tests for salt.utils.vsan.get_host_vsan_system
2017-09-29 13:39:49 -04:00
Alexandru Bleotu
dac9522814
Added tests for salt.utils.vsan.get_vsan_disk_management_system
2017-09-29 13:39:47 -04:00
Alexandru Bleotu
b4a05dc7c0
Added tests for salt.modules.vsphere.remove_capacity_from_diskgroup
2017-09-29 13:39:44 -04:00
Alexandru Bleotu
ec2637db44
Added tests for salt.modules.vsphere.remove_diskgroup
2017-09-29 13:39:41 -04:00
Alexandru Bleotu
4e0755de20
Added tests for salt.modules.vsphere.remove_datastore
2017-09-29 13:39:39 -04:00
Alexandru Bleotu
51703a8a34
Added tests for salt.modules.vsphere.erase_disk_partitions
2017-09-29 13:39:36 -04:00
rallytime
a38ceab7cf
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/cli/batch.py
- salt/master.py
- salt/utils/path.py
- tests/unit/modules/test_state.py
2017-09-29 11:48:33 -04:00
Mike Place
952b5d8e87
Merge branch 'develop' into vagrant-module
2017-09-29 12:34:41 +02:00
Mike Place
2f3f4705bd
Merge pull request #43791 from alexbleotu/extra_minion_data_in_pillar-gh
...
External pillar that includes extra minion data in the minion pillar
2017-09-29 12:02:06 +02:00
Vernon Cole
e9661aea07
lint: must not use bare except: even in teardown
2017-09-28 18:27:54 -06:00
vernoncole
8d27e20b63
replace salt.utils.sdb calls with __utils__
2017-09-28 16:43:47 -06:00
Alexandru Bleotu
503cb9c93a
pylint
2017-09-28 11:32:03 -04:00
Alexandru Bleotu
8c5b021519
Added * as an include all wildcard in extra_minion_data_in_pillar external pillar (+ test)
2017-09-28 11:32:01 -04:00
Mike Place
77ef439ee0
Merge pull request #41956 from yagnik/encrypted-salt
...
Add support for encrypted tag in yaml serializer
2017-09-28 16:41:01 +02:00
Mike Place
6f687fdcff
Merge pull request #43779 from twangboy/win_fix_test_state
...
Fix `unit.modules.test_state` for Windows
2017-09-28 16:27:02 +02:00
Mike Place
db0f569f7a
Merge pull request #43782 from twangboy/win_fix_test_virt
...
Fix `unit.modules.test_virt` for Windows
2017-09-28 16:25:15 +02:00
Mike Place
8ddf2e9442
Merge pull request #43751 from alexbleotu/esxi_vsan_states-gh
...
ESXi diskgroup and host cache creation/configuration + dependencies
2017-09-28 15:21:36 +02:00
Alexandru Bleotu
998c4a95fa
Added tests for salt.pillar.extra_minion_data_in_pillar
2017-09-28 09:14:30 -04:00
Mike Place
6a25bf4475
Merge pull request #42349 from coredumb/saltclass
...
New pillar/master_tops saltclass module
2017-09-28 14:26:45 +02:00
Mike Place
5e29507c21
Merge pull request #43781 from twangboy/win_fix_test_status
...
Fix `unit.modules.test_status` for Windows
2017-09-28 11:06:18 +02:00
Mike Place
05c78ae649
Merge pull request #43785 from twangboy/win_fix_test_znc
...
Fix `unit.modules.test_znc` for Windows
2017-09-28 10:56:10 +02:00
Alexandru Bleotu
90a174c915
more pylint
2017-09-28 04:42:44 -04:00
Alexandru Bleotu
adfa462c05
Fixed tests for salt.utils.vmware.get_hosts
2017-09-28 04:42:42 -04:00
vernoncole
d59cc13ca4
try to pass unit tests on jenkins
2017-09-28 00:59:20 -06:00
garethgreenaway
1c05e37a66
Merge branch '2017.7' into win_fix_test_zypper
2017-09-27 20:15:18 -07:00
garethgreenaway
7d90721f6b
Merge branch '2017.7' into win_fix_test_znc
2017-09-27 20:14:53 -07:00
vernoncole
cfda0d54e2
test inside sandbox, fix two lines of docs
2017-09-27 17:07:29 -06:00
twangboy
aafec7ab0e
Fix unit.modules.test_zypper
for Windows
...
Use `os.linesep` for newline in expected return
2017-09-27 16:59:36 -06:00
twangboy
228e74c8e3
Fix unit.modules.test_znc
for Windows
...
Mock the signal object as it's missing SIGUSR1 and SIGHUP on Windows
2017-09-27 16:54:06 -06:00
twangboy
058e50e530
Fix unit.modules.test_win_service
...
Mock `cmd.run`
2017-09-27 16:37:12 -06:00
twangboy
7192332758
Fix unit.modules.test_virt
for Windows
...
Use os agnostic paths
Get system root from salt config
2017-09-27 16:12:05 -06:00
vernoncole
1f4451faaf
lint and documentation cleanup for vagrant module
2017-09-27 14:59:47 -06:00
vernoncole
88d9e7ed83
replace cache storage with sdb
2017-09-27 14:59:47 -06:00
vernoncole
eb5cd38f85
remove unused keyword argument 'deploy' in tests too
2017-09-27 14:59:47 -06:00
vernoncole
879ae3b291
lint fix round 2
2017-09-27 14:59:47 -06:00
vernoncole
2e162280a9
replace subprocess calls with salt cmd.x calls
2017-09-27 14:59:47 -06:00
vernoncole
7fd1e29ce9
lint fixes
2017-09-27 14:59:47 -06:00
vernoncole
c8a78c7ceb
provide unit tests
2017-09-27 14:59:47 -06:00
vernoncole
2524dd9bba
skeleton unit test
2017-09-27 14:59:47 -06:00
twangboy
16ae8253c1
Mock which, use os.linesep for cmd.run return
2017-09-27 14:41:25 -06:00
vernoncole
52acfd980d
merge upstream develop
2017-09-27 14:26:32 -06:00
twangboy
a64fe75816
Use os agnostic paths
2017-09-27 14:16:39 -06:00
Nicole Thomas
e4be436ca1
Merge pull request #43674 from alexbleotu/storage_policies-gh
...
VMware vCenter proxy + storage policies states & dependencies
2017-09-27 14:56:39 -04:00
Nicole Thomas
3f888753d4
Merge pull request #43732 from twangboy/win_skip_mac_pkg_tests
...
Skip `unit.stats.test_mac_packages` on Windows
2017-09-27 10:48:07 -04:00
Nicole Thomas
92c10689e4
Merge pull request #43757 from eradman/is_windows
...
Fix DeprecationWarning for use of 'salt.utils.is_windows'
2017-09-27 10:47:20 -04:00
Nicole Thomas
a48afa7175
Merge pull request #43763 from twangboy/win_fix_test_disk
...
Fix `unit.modules.test_disk` for Windows
2017-09-27 10:32:41 -04:00
twangboy
b41b9c8378
Skip snapper tests on Windows
2017-09-26 17:12:37 -06:00
twangboy
35505ac966
Honor 80 char limit
2017-09-26 15:52:04 -06:00
twangboy
26b23b37bc
Skip test if missing binaries
2017-09-26 15:51:22 -06:00
twangboy
1c01e06097
Only skip test on Windows
2017-09-26 14:36:12 -06:00
twangboy
ec99a3ce3c
Fix lint error
2017-09-26 14:36:11 -06:00
twangboy
61f8a2f7ff
Skip mac specific tests
2017-09-26 14:36:11 -06:00
Eric Radman
617c5b72ac
Fix DeprecationWarning for use of 'salt.utils.is_windows'
2017-09-26 15:13:18 -04:00
rallytime
74d315fd28
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/modules/file.py
- tests/unit/modules/test_file.py
2017-09-26 13:45:10 -04:00
Nicole Thomas
c51891c939
Merge branch 'develop' into storage_policies-gh
2017-09-26 13:21:56 -04:00
Nicole Thomas
2581098595
Merge pull request #43731 from twangboy/win_unit_beacons_test_status
...
Fix `unit.beacons.test_status` for Windows
2017-09-26 12:25:11 -04:00
Nicole Thomas
10f3d47498
Merge pull request #43724 from brejoc/2017.7.kubernetes_delete_test
...
Improved delete_deployment test for kubernetes module
2017-09-26 12:19:30 -04:00
Erik Johnson
74379bac9c
Merge pull request #43720 from rallytime/merge-develop
...
[develop] Merge forward from 2017.7 to develop
2017-09-26 09:53:04 -05:00
Nicole Thomas
13cc27bdab
Merge pull request #43734 from twangboy/win_unit_test_poudriere
...
Fix `unit.modules.test_poudriere` for Windows
2017-09-26 10:13:46 -04:00
Erik Johnson
d78b9a3294
Merge pull request #41998 from twangboy/win_unit_test_environ
...
Fix `unit.modules.test_environ` for Windows
2017-09-26 07:25:48 -05:00
Thomas S Hatch
d8f371b8b1
Merge pull request #43669 from moio/develop-limit-minion-processes
...
Introduce process_count_max minion configuration parameter (develop)
2017-09-26 05:56:11 -06:00
Alexandru Bleotu
ac79f89ffa
Fixed utils.pbm unit tests
2017-09-26 04:59:00 -04:00
Alexandru Bleotu
f484bd52fd
more pylint
2017-09-25 18:25:07 -04:00
Alexandru Bleotu
b6577e4328
pylint
2017-09-25 18:25:04 -04:00
Alexandru Bleotu
58445e927b
Updated all vsphere tests to support the vcenter proxy
2017-09-25 18:24:51 -04:00
Alexandru Bleotu
a3047ad307
Added tests for salt.utils.pbm.assign_default_storage_policy_to_datastore
2017-09-25 18:19:17 -04:00
Alexandru Bleotu
5dbbac182d
Added tests for salt.utils.pbm.get_default_storage_policy_of_datastore
2017-09-25 18:19:12 -04:00
Alexandru Bleotu
79419702d9
Added tests for salt.utils.pbm.update_storage_policy
2017-09-25 18:19:07 -04:00
Alexandru Bleotu
d43e342135
Added tests for salt.utils.pbm.create_storage_policy
2017-09-25 18:19:02 -04:00
Alexandru Bleotu
c80df65776
Fixed tests for salt.utils.pbm.get_policies_by_id
2017-09-25 18:19:00 -04:00
Alexandru Bleotu
75764567c4
Added tests for salt.utils.pbm.get_storage_policies
2017-09-25 18:18:55 -04:00
Alexandru Bleotu
d8e0cbde9a
Added tests for salt.utils.pbm.get_policies_by_id
2017-09-25 18:18:50 -04:00
Alexandru Bleotu
e980407c54
Added tests for salt.utils.pbm.get_capability_definitions
2017-09-25 18:18:45 -04:00
Alexandru Bleotu
68f48d123a
Added tests for salt.utils.pbm.get_placement_solver
2017-09-25 18:18:39 -04:00
Alexandru Bleotu
6b2ddffb4c
Added tests for salt.utils.pbm.get_profile_manager
2017-09-25 18:18:34 -04:00
Alexandru Bleotu
dd54f8ab15
Added tests for salt.utils.vmware.get_new_service_instance_stub
2017-09-25 18:18:27 -04:00
twangboy
922e60fa67
Add os agnostic paths
2017-09-25 15:25:31 -06:00
twangboy
dc1b36b7e2
Change expected return for Windows
2017-09-25 15:06:44 -06:00
Erik Johnson
5b3be6e8af
Fix failing unit test
2017-09-25 16:06:33 -05:00
rallytime
f98a555f98
Missed updating one of the master unit test mocks
2017-09-25 15:37:38 -04:00
Alexandru Bleotu
3c26d4e3be
Updated all list_differ tests to compare dicts so the key order is not assumed
2017-09-25 13:11:08 -04:00
Alexandru Bleotu
cdb028b794
Added key sorting to have deterministing string repr of RecursiveDictDiffer objects
2017-09-25 13:09:47 -04:00
rallytime
846af152b2
Update mocked values in some master/masterapi unit tests
...
The addition of checking for the `auth_list` in PR #43467 requires
that the mocked return of `get_auth_list` actually contains something
in the list. These mock calls need to be updated so we can check
for the SaltInvocationErrors.
2017-09-25 12:54:32 -04:00
twangboy
d73ef44cf6
Mock with uppercase KEY
2017-09-25 09:37:15 -06:00
twangboy
048e16883f
Use uppercase KEY
2017-09-25 09:37:15 -06:00
twangboy
056f3bb4c0
Use with to open temp file
2017-09-25 09:35:25 -06:00
twangboy
716e99c453
Fix py3 bytestring problems
2017-09-25 09:35:24 -06:00
twangboy
543610570c
Fix bytestring issues, fix errored tests
2017-09-25 09:35:24 -06:00
twangboy
9fe83a34a5
Remove old variable declaration
2017-09-25 09:35:23 -06:00
twangboy
c5cf5e92c1
Fix many tests
2017-09-25 09:35:23 -06:00
Jochen Breuer
85b0a8c401
Improved delete_deployment test for kubernetes module
...
This is a follow up of this PR: https://github.com/saltstack/salt/pull/43235
With the fix in PR 43235, we are polling the status of the deletion via
show_deployment. This is now also reflected in the tests with this change.
2017-09-25 17:29:27 +02:00
rallytime
281cbbe048
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/cloud/clouds/libvirt.py
- salt/daemons/masterapi.py
- salt/modules/file.py
- salt/modules/yumpkg.py
- salt/states/archive.py
- salt/states/file.py
- salt/utils/files.py
- salt/utils/minions.py
2017-09-25 09:40:18 -04:00
Alexandru Bleotu
2d2f094810
Merge branch 'develop' into dvs_states-gh
2017-09-25 11:22:45 +01:00
Mike Place
68fa74e88f
Merge pull request #43571 from nadvornik/raid_add
...
Add missing devices to RAID array
2017-09-24 19:54:10 -06:00
Mike Place
cae79d2020
Merge pull request #43699 from rallytime/merge-develop
...
[develop] Merge forward from 2017.7 to develop
2017-09-24 19:27:17 -06:00
Alexandru Bleotu
847debab7a
Fix failing storage and listdiffer tests
2017-09-22 17:50:09 -04:00
Gareth J. Greenaway
ca3f77f81e
Adding test_btmp_beacon.
2017-09-22 14:24:31 -07:00
Gareth J. Greenaway
6fe02e3c6c
Updating btmp & wtmp beacons to work with python3. Adding ability to fire alerts for specific users & specific times. Adding some unit tests for both.
2017-09-22 14:24:31 -07:00
Silvio Moioli
d53550de35
process_count_max: add unit test
2017-09-22 21:57:04 +02:00
Silvio Moioli
04ab9a6102
process_count_max: adapt existing unit tests
2017-09-22 21:57:04 +02:00
Mike Place
3ad43a5a67
Merge pull request #43470 from alexbleotu/esxdatacenter-gh
...
Fix to esxdatacenter proxy
2017-09-22 13:18:54 -06:00
Mike Place
71fa000b15
Merge branch 'develop' into ssh_known_hosts_improvements
2017-09-22 13:17:23 -06:00
rallytime
03ce4d81b7
Reactor Test: Fix incorrect merge conflict resolution
2017-09-22 15:01:11 -04:00
Alexandru Bleotu
3c7c202216
Fixed assert_has_calls in vmware.utils.dvs tests
2017-09-22 14:35:21 -04:00
Alexandru Bleotu
f811523e80
pylint
2017-09-22 14:35:14 -04:00
Alexandru Bleotu
d4d6ad99c2
Added tests for salt.utils.vmware.remove_dvportgroup
2017-09-22 14:31:48 -04:00
Alexandru Bleotu
d7474f8d30
Added tests for salt.utils.vmware.update_dvportgroup
2017-09-22 14:31:46 -04:00