Commit Graph

530 Commits

Author SHA1 Message Date
rallytime
1fe0b69a6c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/blockdev.py
  - salt/modules/ddns.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/linux_sysctl.py
  - salt/modules/status.py
  - salt/modules/x509.py
  - salt/utils/process.py
  - salt/utils/verify.py
  - tests/integration/__init__.py
  - tests/integration/modules/state.py
  - tests/integration/states/cmd.py
2016-08-12 16:21:58 -06:00
rallytime
cf038ee3fe Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/grains/core.py
  - salt/modules/file.py
  - salt/modules/hosts.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/portage_config.py
  - salt/modules/x509.py
  - salt/scripts.py
  - tests/integration/shell/enabled.py
2016-08-11 11:33:54 -06:00
Erik Johnson
a375dd7e1f Clean up open filehandles (#35359)
* salt/crypt.py: clean up open filehandles

* salt/fileclient.py: clean up open filehandles

* salt/grains/core.py: clean up open filehandles

* salt/modules/cp.py: clean up open filehandles

* salt/modules/data.py: clean up open filehandles

* salt/modules/dnsutil.py: clean up open filehandles

* salt/modules/dockerng.py: clean up open filehandles

* salt/modules/inspectlib/collector.py: clean up open filehandles

* salt/modules/file.py: clean up open filehandles

* salt/modules/hosts.py: clean up open filehandles

* salt/modules/incron.py: clean up open filehandles

* salt/modules/dpkg.py: clean up open filehandles

* salt/modules/linux_sysctl.py: clean up open filehandles

* salt/modules/netbsd_sysctl.py: clean up open filehandles

* salt/modules/network.py: clean up open filehandles

* salt/modules/nftables.py: clean up open filehandles

* salt/modules/openbsd_sysctl.py: clean up open filehandles

* salt/modules/rh_ip.py: clean up open filehandles

* salt/modules/portage_config.py: clean up open filehandles

* salt/modules/status.py: clean up open filehandles

* salt/modules/tls.py: clean up open filehandles

* salt/modules/xapi.py: clean up open filehandles

* salt/modules/x509.py: clean up open filehandles

* salt/modules/virt.py: clean up open filehandles

* salt/modules/zcbuildout.py: clean up open filehandles

* salt/returners/local_cache.py: clean up open filehandles

* salt/utils/cloud.py: clean up open filehandles

* salt/states/pkgrepo.py: clean up open filehandles

* salt/states/x509.py: clean up open filehandles

* salt/transport/mixins/auth.py: clean up open filehandles

* salt/utils/__init__.py: clean up open filehandles

* salt/states/pkg.py: clean up open filehandles

* salt/utils/minion.py: clean up open filehandles

* salt/utils/openstack/nova.py: clean up open filehandles

* salt/utils/openstack/swift.py: clean up open filehandles

* salt/utils/process.py: clean up open filehandles

* salt/utils/templates.py: clean up open filehandles

* salt/utils/virt.py: clean up open filehandles

* tests/integration/__init__.py: clean up open filehandles

* tests/integration/cli/grains.py: clean up open filehandles

* tests/integration/client/standard.py: clean up open filehandles

* tests/integration/modules/hosts.py: clean up open filehandles

* tests/unit/utils/vt_test.py: clean up open filehandles

* tests/integration/shell/enabled.py: clean up open filehandles

* tests/integration/states/cmd.py: clean up open filehandles

* tests/integration/states/file.py: clean up open filehandles

* tests/integration/states/match.py: clean up open filehandles

* tests/unit/config_test.py: clean up open filehandles

* tests/unit/templates/jinja_test.py: clean up open filehandles

* tests/unit/utils/find_test.py: clean up open filehandles

* tests/integration/modules/state.py: clean up open filehandles

* Update dnsutil_test to reflect changes in fopen usage
2016-08-11 10:45:24 -06:00
rallytime
a651962e95 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-08-10 10:02:03 -06:00
Erik Johnson
243909f39d file.recurse: Do not convert octal mode string to int (#35309)
* Add integration test for #34945

* file.recurse: Do not convert octal mode string to int

When we run file.makedirs_perms to create the dest directory, we pass
through the mode to file.check_perms. However, file.check_perms expects
an octal string, not an int. This causes the initial directory to be
chmod'ed to the wrong mode. When there are files in the source
directory, file.recurse will invoke the file.directory state to manage
files/dirs in that directory, and this ends up correcting the mode as we
simply pass the dir_mode to it. However, when there are only directories
in the source directory, this never happens and the incorrect mode
remains on the destination directory.

Fixes #34945.
2016-08-09 13:02:26 -06:00
rallytime
de4b33f2e1 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/client/ssh/__init__.py
  - salt/client/ssh/shell.py
  - salt/config/__init__.py
  - salt/grains/core.py
  - salt/utils/gitfs.py
2016-08-08 12:34:23 -06:00
rallytime
2b4c156df1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/client/ssh/__init__.py
  - salt/grains/core.py
  - salt/output/highstate.py
2016-08-08 11:15:43 -06:00
Erik Johnson
e2e8bbbfde Add integration test for #35214 2016-08-05 20:47:24 -05:00
Nicole Thomas
812916b45f Fix rabbitmq_user state test to check for correct string (#35007)
This test was failing when I ran it locally - I'm not sure why the
error isn't showing up in Jenkins, but I double checked the string
in the state and there should be single-quotes around the user name.
2016-07-28 08:37:37 -06:00
rallytime
76e8dd974a Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/state.py
  - tests/integration/__init__.py
  - tests/integration/wheel/key.py
2016-07-26 11:05:24 -06:00
Mike Place
caf0361bc1 Merge pull request #34807 from terminalmage/issue2707
Feature addition: preserve mode in file states
2016-07-22 16:43:31 -06:00
Mike Place
ab84fd273e Merge pull request #34637 from cachedout/int_tests_interfaces
Int tests interfaces
2016-07-22 15:58:59 -06:00
rallytime
109b368d19 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-22 10:32:59 -06:00
Erik Johnson
1ca1367289 Fail git.latest states with uncommitted changes when force_reset=False (#34869)
* Add git.diff function

* Fail git.latest states with uncommitted changes when force_reset=False

Also, discard these changes when running the state if force_reset=True.

* Add integration test for case where there are uncommitted changes
2016-07-22 09:04:05 -06:00
Mike Place
d85aca1f7a Merge branch 'develop' into int_tests_interfaces 2016-07-21 12:26:21 -06:00
rallytime
1a9d6eee15 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/grains/core.py
  - salt/state.py
  - tests/unit/grains/core_test.py
2016-07-21 12:06:25 -06:00
Erik Johnson
f9cd83e8bb Add integration test for mode=keep when source is a local path 2016-07-20 22:26:10 -05:00
Erik Johnson
1cd542edb8 Add integration test for mode=keep in file states 2016-07-20 22:08:16 -05:00
rallytime
094731f4b6 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-20 12:32:08 -06:00
twangboy
5bcb27e477 Fix integration tests on windows 2016-07-20 10:00:29 -06:00
Justin Anderson
9abb6f91bb Skip mysql state test if mysqladmin is not available 2016-07-20 09:24:24 -06:00
Mike Place
aff29906fc Merge pull request #34671 from isbm/isbm-osmajorrelease-grain-suse-devel
Add "osmajorrelease" grain
2016-07-20 08:35:34 -06:00
Bo Maryniuk
3cb6940904 Bugfix: access 'osmajorrelease' as an integer value 2016-07-18 17:14:57 +02:00
rallytime
f20e78b534 Merge branch '2016.3' into 'develop'
No conflicts.
2016-07-14 15:35:21 -06:00
rallytime
0c566dce89 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-14 14:06:42 -06:00
Mike Place
3e612c3794 Merge pull request #34618 from jtand/network_integration_fix
Network state integration test test=True
2016-07-13 10:30:15 -06:00
rallytime
49f40e9d99 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/conf.py
  - doc/topics/reactor/index.rst
  - tests/integration/__init__.py
2016-07-12 16:13:56 -06:00
rallytime
f734afd0b0 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/aptpkg.py
  - tests/integration/__init__.py
2016-07-12 14:29:35 -06:00
rallytime
3026df346f Merge branch '2015.5' into '2015.8'
No conflicts.
2016-07-12 13:27:16 -06:00
Justin Anderson
57df38e685 Update github IP for ssh state integration tests (#34592) 2016-07-12 15:17:41 -04:00
Justin Anderson
34bcf9ccfc Changed network state test to use test=True 2016-07-12 12:40:40 -06:00
Justin Anderson
b2616833b0 Some small changes 2016-07-11 14:35:25 -06:00
rallytime
815c8b38d5 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-08 10:34:32 -06:00
rallytime
86b7c71e09 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/glusterfs.py
  - salt/states/pkg.py
2016-07-07 13:37:58 -06:00
Mike Place
685df80929 Merge pull request #34518 from terminalmage/fix-pkg.latest-test
Fix pkg.latest integration test for non-LTS ubuntu
2016-07-07 13:29:13 -06:00
rallytime
27988dde48 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-07-07 12:31:12 -06:00
Justin Anderson
ed59113e94 Change network state integration test to use test=True 2016-07-07 12:27:18 -06:00
Erik Johnson
4aef44ecdf Fix pkg.latest integration test for non-LTS ubuntu
This test uses ``pkg.list_upgrades`` to find a package which it assumes is
installed, to test ``pkg.installed`` with ``only_upgrade=True``. The
problem with that approach is that ``pkg.list_upgrades`` uses a dry-run
of an ``apt-get dist-upgrade`` to find the upgrades. On non-LTS Ubuntu
releases, a ``dist-upgrade`` results in upgrading to an entirely new
Ubuntu release, and new packages which would be installed by the
dist-upgrade (but are not currently installed) will be included in the
return data. This causes the test to fail when we attempt to run
``pkg.latest`` with ``only_upgrade=True`` on a package which is not
already installed.

This commit fixes the test by ensuring that our target package is
already installed, and continuing to iterate through the return data
from ``pkg.list_upgrades`` until a currently-installed package is found.
2016-07-07 12:51:01 -05:00
Mike Place
4c75d4f92b Integration test for grains data in templatized files (#34487)
Refs #34433
2016-07-07 12:16:35 -04:00
Justin Anderson
75299456be Use skipTest for network state integration test (#34489)
* Updated skipTest to check for debian or redhat

* Removed skipIf import
2016-07-06 13:43:09 -04:00
rallytime
e4a8c585d0 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/states/pkg.py
2016-07-05 13:11:32 -06:00
rallytime
8398de0baf Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-30 16:08:57 -06:00
Mike Place
45b8fb10d7 Merge pull request #34373 from jtand/network_state_integration_test
Network state integration test
2016-06-30 08:05:44 -07:00
Erik Johnson
d6af1de0b7 Optimize pkg integration tests and add a couple new tests (#34377)
* Remove redundant usage of destructiveTest decorator

* Remove unnecessary SLS file

This simple state can be run using run_state

* Explicitly order tests

* Use run_state instead of invoking state.sls

* Ensure only one refresh_db done during pkg integration tests

* Add pkg.latest test for package without an epoch

* Optimize pkg.latest_version usage in pkg integration tests

* Clarify outcome when only_upgrade is used

* Add pkg.latest test with only_upgrade=True
2016-06-30 10:48:22 -04:00
Erik Johnson
20ed2c6bcf Remove repr formatting flag in places where it is used solely for quoting (#34183)
* salt/cloud/__init__.py: remove repr formatting

* salt/cloud/clouds/azurearm.py: remove repr formatting

* salt/cloud/clouds/ec2.py: remove repr formatting

* salt/cloud/clouds/profitbricks.py: remove repr formatting

* salt/loader.py: remove repr formatting

* salt/modules/win_file.py: remove repr formatting

* salt/modules/zypper.py: remove repr formatting

* salt/pillar/consul_pillar.py: remove repr formatting

* salt/renderers/pyobjects.py: remove repr formatting

* salt/returners/sentry_return.py: remove repr formatting

* salt/states/bower.py: remove repr formatting

* salt/states/cabal.py: remove repr formatting

* salt/states/cmd.py: remove repr formatting

* salt/states/composer.py: remove repr formatting

* salt/states/win_network.py: remove repr formatting

* salt/states/eselect.py: remove repr formatting

* salt/states/file.py: remove repr formatting

* salt/states/htpasswd.py: remove repr formatting

* salt/states/memcached.py: remove repr formatting

* salt/states/npm.py: remove repr formatting

* salt/states/pip_state.py: remove repr formatting

* salt/states/pkg.py: remove repr formatting

* salt/states/pkgrepo.py: remove repr formatting

* salt/states/supervisord.py: remove repr formatting

* salt/states/timezone.py: remove repr formatting

* salt/states/virtualenv_mod.py: remove repr formatting

* salt/states/dockerio.py: remove repr formatting

* salt/states/win_system.py: remove repr formatting

* salt/utils/nb_popen.py: remove repr formatting

* salt/utils/cloud.py: remove repr formatting

* Add pylint disable due to legit usage of repr flag

See https://github.com/saltstack/salt-pylint/pull/6

* Fix composer tests

These tests needed to be updated because quoting was changed in the
state module in 9dc9146. There was an unnecessary !r used for the
exception class there, which means that instead of the exception class
being passed through the formatter and coming out with the equivalent
value of err.__str__(), we get a repr'ed instance of the exception class
(i.e.  SaltException('',)) in the state output.

The unit test was asserting that we have that repr'ed instance of
SaltException in the output, a case of writing the test to confirm the
badly-conceived output in the state. This has also been corrected.

* salt/cloud/clouds/azurearm.py: lint fixes

* salt/modules/boto_s3_bucket.py: lint fixes

* salt/modules/minion.py: lint fixes

* salt/modules/reg.py: lint fixes

* salt/modules/testinframod.py: lint fixes

* salt/modules/win_iis.py: lint fixes

* salt/pillar/csvpillar.py: lint fixes

* salt/utils/win_functions.py: lint fixes

* salt/states/nxos.py: lint fixes

* salt/returners/mongo_future_return.py: lint fixes

* tests/integration/__init__.py: lint fixes

* tests/unit/context_test.py: lint fixes

* tests/integration/states/file.py: lint fixes

* tests/integration/utils/test_reactor.py: lint fixes

* tests/integration/utils/testprogram.py: lint fixes

* tests/unit/__init__.py: lint fixes

* tests/integration/shell/minion.py: lint fixes

* tests/unit/modules/boto_apigateway_test.py: lint fixes

* tests/unit/modules/boto_cognitoidentity_test.py: lint fixes

* tests/unit/modules/boto_elasticsearch_domain_test.py: lint fixes

* tests/unit/modules/k8s_test.py: lint fixes

* tests/unit/modules/reg_win_test.py: lint fixes

* tests/unit/states/boto_apigateway_test.py: lint fixes

* tests/unit/states/boto_cognitoidentity_test.py: lint fixes

* tests/unit/states/boto_elasticsearch_domain_test.py: lint fixes
2016-06-29 16:30:18 -04:00
Justin Anderson
84a36369fa Added network state integration test 2016-06-29 14:28:36 -06:00
rallytime
cc83fa151a Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/status.py
  - salt/utils/__init__.py
  - tests/unit/modules/boto_vpc_test.py
  - tests/unit/modules/mount_test.py
  - tests/unit/states/boto_vpc_test.py
2016-06-28 17:34:27 -06:00
rallytime
f9ab8ba46d Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-28 14:26:24 -06:00
Erik Johnson
b793426c23 Remove unnecessarily-disabled sanity check (#34325)
This was commented out for reasons having nothing to do with anything
else going on in 0c069dd. Uncommenting this sanity check so that we are
notified if we need to update our targets in the future.
2016-06-28 11:12:55 -04:00
rallytime
f078d57b57 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/rabbitmq.py
  - salt/modules/win_servermanager.py
  - salt/state.py
  - salt/states/boto_s3_bucket.py
  - salt/states/pip_state.py
  - salt/states/win_servermanager.py
  - tests/unit/modules/win_servermanager_test.py
  - tests/unit/states/dockerng_test.py
2016-06-09 13:06:10 -06:00