Commit Graph

6788 Commits

Author SHA1 Message Date
Gareth J. Greenaway
df937bf2fa
Merge branch 'develop' into 43647_fix_InitiatorName_in_comments 2017-11-08 10:58:22 -07:00
Nicole Thomas
8ffe91fe44
Merge pull request #44405 from SEJeff/kubernetes-updates-v2
Kubernetes updates v2
2017-11-07 12:17:43 -07:00
Jorge Schrauwen
3af235250d Remove _zpool_data from the bsd_memdata test for grains 2017-11-07 08:17:50 +01:00
Nicole Thomas
c03e997144
Merge pull request #44246 from nicholasmhughes/add-location-to-file.line-ensure
Add location support to file.line ensure
2017-11-06 22:35:18 -07:00
Jeff Schroeder
eaaa4dcf8e
Up the total test coverage of the kubernetes state to 54%!
* Add 100% test coverage for the kubernetes.node_label_absent state
* Add 100% test coverage for the kubernetes.namespace_present state
* Add 100% test coverage for the kubernetes.namespace_absent state
2017-11-05 20:11:25 -06:00
Jeff Schroeder
2b44f7ca85
Small formatting fixup 2017-11-05 20:11:17 -06:00
Jeff Schroeder
7039d74e90
More kubernetes state tests
* Add 100% test coverage for the kubernetes.secret_absent state
* Add 100% coverage for kubernetes.node_label_present
* Also add 'comment' to kubernetes.node_add_label
* Make the faux test objects more believable in test_kubernetes.py
2017-11-05 17:57:29 -06:00
Jeff Schroeder
2b02a46544
Add the beginning of tests for states.kubernetes and update things
* Add 100% test coverage for the kubernetes.secret_present state
* Add 100% test coverage for the kubernetes.configmap_absent state
* Add 100% test coverage for the kubernetes.configmap_present state
* Make some fields optional to kubernetes.create_secret and add examples
* Make some fields optional to kubernetes.replace_secret and add examples
* Make some fields optional to kubernetes.create_configmap and add examples
* Make some fields optional to kubernetes.replace_configmap and add examples
* Add 'comment' when a kubernetes configmap or secret is going to be replaced
* Update 'source', 'template', and 'saltenv' kwargs to defaults from the rest of the codebase
* Allow passing empty 'data' to the kubernetes.configmap_present state to remove the existing contents
2017-11-05 13:34:37 -06:00
Mike Place
1412a42f0e
Merge pull request #44070 from gtmanfred/kitchen
begin adding kitchen-salt into the test suite
2017-11-02 15:55:33 -06:00
Mike Place
c46490c183
Merge pull request #44190 from prymitive/postgres_extension
Fix test=true checks so that state runs in test mode don't report cha…
2017-10-31 11:53:06 -06:00
Mike Place
57705b9e6a
Merge pull request #44231 from SEJeff/kubernetes-stuff
Kubernetes module updates round one
2017-10-31 11:21:28 -06:00
Gareth J. Greenaway
06080612bc
Merge branch 'develop' into 43647_fix_InitiatorName_in_comments 2017-10-30 17:54:57 -04:00
Nicole Thomas
835e6714ae
Merge branch 'develop' into publish_refactor_use_check_authentication 2017-10-30 11:06:59 -04:00
Nicole Thomas
9fc7fde8d2
Merge pull request #43885 from garethgreenaway/43825_swap_total_grain
[develop] Adding swap_total to core grains
2017-10-27 13:01:11 -04:00
Erik Johnson
17d8e46abf Merge pull request #44277 from rallytime/merge-develop
[develop] Merge forward from 2017.7 to develop
2017-10-27 10:16:00 -05:00
Nicole Thomas
cf77a6bf0f Merge pull request #43754 from spenceation/panos-2017-9-26
Update to PANOS modules.
2017-10-27 10:36:02 -04:00
Jeff Schroeder
1576c9980c
Fix test_kubernetes.py after fixing bug in 25f7c4996730a578b7875e924508a5c1774e8b7c 2017-10-26 18:20:49 -05:00
Jeff Schroeder
9304a428e3
Add the change-cause annotation to kubernetes created objects
This allows commands such as `kubectl rollout history deploy/$FOO` to
automatically show the deployment changed as a result of the salt run
and follows exactly how kubectl works when passed the `--record` flag.
2017-10-26 18:20:41 -05:00
Jeff Schroeder
9ceabf29f4
Fix kubernetes.node_labels()
This prevented showing, adding, or removing any labels from nodes
2017-10-26 18:20:34 -05:00
Jeff Schroeder
ac20ddfa25
Fix a bug in the kubernetes module for ssl cert paths
When the `client_key_file` attribute was defined and the `client_key`
attribute was not, the conditional for `client_key` would wrongly zero
`kubernetes.client.configuration.key_file`.

This was a bit annoying to figure out, but the kubernetes module now can
authenticate with minikube with a configuration such as this (where jeff
is $USER):

	kubernetes.api_url: 'https://192.168.99.100:8443'
	kubernetes.certificate-authority-file: '/home/jeff/.minikube/ca.crt'
	kubernetes.client-certificate-file: '/home/jeff/.minikube/client.crt'
	kubernetes.client-key-file: '/home/jeff/.minikube/client.key'

The various options can be gotten from ~/.kube/config after running `minikube start`.
2017-10-26 18:20:28 -05:00
rallytime
28343f0120
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/modules/git.py
2017-10-25 09:54:37 -04:00
twangboy
609361bf48
Fix some lint errors 2017-10-24 09:27:39 -06:00
twangboy
7a3ff9387d
Mock the rest of the tests 2017-10-24 09:27:38 -06:00
Erik Johnson
5ce14df82c
Change how members are retrieved in win_groupadd
This is a solution that works for the other functions that interact with
group objects, making it a better overall solution to be used widely
in win_groupadd.

This also updates the mocking in the tests such that we use a more
comprehensive fake class, and more intelligent mocking of get_sam_name
using a lambda.
2017-10-24 09:27:38 -06:00
twangboy
6ab82394be
Set up mocking
Move the code that sets up the group object, computer object and gets
existing members out of the individual functions so they can be mocked

Mock the GroupObj
Mock the ComputerObj
Mock existing members
Still need to fix info, getent, and members
2017-10-24 09:27:37 -06:00
Łukasz Mierzwa
58b84c7f71
Fix test case when postgres extension is already present and test=true is passed
Currently test expects that if the extension is already present salt will indicate that it will create it (which won't really happen without test=true since the extension is present), state was fixed so now salt will return correct information with test=true so fix the test to follow correct behaviour.
2017-10-23 17:48:27 -07:00
Nicole Thomas
4278a08e40 Merge pull request #44194 from vernondcole/saltify-create-with-wake-on-lan
add wake-on-LAN feature to saltify create
2017-10-23 10:46:21 -04:00
nicholasmhughes
fa1c442943
added support for location in file.line when using ensure 2017-10-23 10:40:35 -04:00
Nicole Thomas
2ccfaca66c Merge pull request #44067 from eradman/check_file_meta
Check file attributes if lsattr(1) is installed
2017-10-23 10:30:58 -04:00
Erik Johnson
96891a062a Merge pull request #44203 from rallytime/merge-develop
[develop] Merge forward from 2017.7 to develop
2017-10-23 09:11:54 -05:00
Nicole Thomas
7374403eca Merge pull request #44225 from eradman/test_btmp_wtmp
Mock open on /var/log/btmp and /var/log/wtmp
2017-10-23 09:51:46 -04:00
Eric Radman
10d13062ec
Mock open to /var/log/btmp and /var/log/wtmp
- btmp may not exist
- wtmp may not exist, or it may not contain ASCII data

Unbreaks tests on OpenBSD 6.2
2017-10-21 09:50:08 -04:00
Nicole Thomas
012477071f Merge pull request #44071 from garethgreenaway/various_beacon_fixes
[develop] Various fixes to beacons
2017-10-20 11:06:27 -04:00
rallytime
3b9d02977d
Update deprecated salt.utils paths to new salt.utils.x paths 2017-10-20 10:48:37 -04:00
rallytime
2617cf851f
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/modules/aptpkg.py
  - salt/utils/win_functions.py
  - tests/unit/states/test_mount.py
2017-10-20 10:44:29 -04:00
Nicole Thomas
c6d27ada51 Merge pull request #43843 from twangboy/win_unit_test_mount
Fix `unit.states.test_mount` for Windows
2017-10-20 10:27:25 -04:00
Nicole Thomas
33ad43eec0 Merge pull request #44085 from kstreee/fix-inconsistent-exception-handling
Fixes inconsistent exception handling in rest_tornado.
2017-10-20 09:18:28 -04:00
Nicole Thomas
c700cd9c1e Merge pull request #44162 from rallytime/jinja-test-imports
Reorder and group imports in jina template unit tests
2017-10-20 09:09:40 -04:00
Nicole Thomas
12980a6961 Merge pull request #43476 from Shados/ssh_known_hosts_improvements
Improvements to SSH known_hosts handling
2017-10-20 09:07:20 -04:00
Vernon Cole
d3769b3568
add saltify wake-on-lan and document it 2017-10-19 20:14:07 -06:00
Mike Place
2551454f6a Add absolute_import 2017-10-19 18:26:08 -05:00
Eric Radman
6da4fd979b
Check file attributes in check_file_meta() if lsattr(1) is installed
lsattr/chattr is not installed on many Unix-like platforms by default,
including *BSD, Solaris, and minimal Linux distributions such as Alpine.
2017-10-19 18:38:12 -04:00
Mike Place
1e3abfea59 Merge branch 'develop' into various_beacon_fixes 2017-10-19 15:58:01 -05:00
Mike Place
cc2c99c94c Merge branch 'develop' into fix-inconsistent-exception-handling 2017-10-19 15:53:24 -05:00
Mike Place
68ed8c21b2 Merge branch 'develop' into jinja-test-imports 2017-10-19 15:42:20 -05:00
Mike Place
866a78a673 Merge pull request #44176 from vernondcole/simplify-saltify
Simplify saltify cloud driver
2017-10-19 14:37:17 -05:00
twangboy
a862e0bf2d
Remove unneeded import 2017-10-19 13:30:16 -06:00
twangboy
d78f27466d
Fix unit.states.test_mount for Windows
Use `os.path.realpath` to convert paths
Mock `os.path.exists`
2017-10-19 13:30:16 -06:00
twangboy
64d2e4f732
Fix pickling errors on Windows
Moves the 4 sub functions to the global scope
2017-10-19 11:50:23 -06:00
Nicole Thomas
f0175623ed Merge branch 'develop' into ssh_known_hosts_improvements 2017-10-19 13:44:29 -04:00