Commit Graph

2491 Commits

Author SHA1 Message Date
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
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
rallytime
3dfed6b841 Adjust linux_acl unit test argument ordering 2016-11-23 17:02:23 +00:00
rallytime
f44e14b63c Merge branch 'carbon' into '2016.11'
Conflicts:
  - salt/modules/file.py
2016-11-09 12:56:58 -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
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
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
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
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
ba5583938b Update mac_package unit tests: remove --no-compress flag 2016-10-31 16:13:48 -06:00
rallytime
e4dc059959 Update Carbon versionadded tags to 2016.11.0 in tests/* 2016-10-27 10:04:13 -06:00
Pablo Suárez Hernández
32f44b43ee Fix Zypper module and tests for Carbon 2016-10-25 11:08:00 +01:00
rallytime
027e2212c9 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/modules/status.py
  - salt/modules/win_status.py
  - salt/modules/zypper.py
  - salt/utils/network.py
  - tests/unit/transport/zeromq_test.py
2016-10-24 09:29:53 -06:00
Mike Place
c5d81a8ade Merge pull request #37158 from jfindlay/mac_skip_uptime
add mock for `status.uptime` unit test
2016-10-24 12:13:53 +09:00
rallytime
8fff95b3b4 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/gpg.py
  - salt/modules/zypper.py
2016-10-21 16:09:17 -06:00
Justin Findlay
094eac06eb modules.status.uptime unit test: mock on linux 2016-10-21 15:50:42 -06:00
Pablo Suárez Hernández
01b0a6917c Minor pylint fixes 2016-10-20 11:33:11 +01:00
Pablo Suárez Hernández
7dbb0bd252 Unit tests fixes 2016-10-20 10:59:48 +01:00
Pablo Suárez Hernández
a092a974da Refactor: Cleanup and pylint fixes 2016-10-19 14:57:03 +01:00
Pablo Suárez Hernández
1331ae5c72 Unit tests for zypper upgrade and dist-upgrade 2016-10-19 13:21:55 +01:00
twangboy
b3b688e298 Fix tests 2016-10-17 13:31:55 -06:00
rallytime
112dc5d9c1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cli/salt.py
  - salt/client/__init__.py
  - salt/modules/archive.py
  - tests/integration/modules/pkg.py
2016-10-14 12:03:08 -06:00
Thomas S Hatch
6b782c15e1 Merge pull request #36755 from terminalmage/issue36671
systemd.py: check retcode for service availability in systemd >= 231
2016-10-13 13:41:50 -06:00
rallytime
b196c9336a Merge branch '2016.3' into 'carbon'
No conflicts.
2016-10-11 13:54:09 -06:00
rallytime
c09b9d6e6a Merge branch '2015.8' into '2016.3'
No conflicts.
2016-10-10 10:21:04 -06:00
Erik Johnson
7c78d6f419 Add unit tests for systemd scope usage 2016-10-07 17:35:09 -05:00
rallytime
2e34277b65 Add '--no-psqlrc' option to new-to-carbon postgres unit test 2016-10-07 16:10:57 -06:00
rallytime
f73bdf55c2 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cloud/clouds/vultrpy.py
  - salt/modules/ini_manage.py
  - salt/states/glance.py
2016-10-07 09:51:21 -06:00
Mike Place
1284de27fc Merge pull request #36789 from maximeguillet/fix-psqlrc-pg9.6
Fix behavior of psql -c option with postgresql 9.6
2016-10-06 20:24:51 +09:00
Maxime Guillet
b59c23bef1 Fix one remaining postgresql tests linked to #36787. 2016-10-05 17:05:10 +02:00
Maxime Guillet
8b92ae2061 Fix postgresql tests using position in the argument list of psql.
Some tests use position number in the argument list of psql command
to check their results. As #36787 add one element, next position
in the list must be used.
2016-10-05 16:08:42 +02:00
Maxime Guillet
21f2a17a07 Fix postgresql tests by adding --no-psqlrc option introduced by #36787. 2016-10-05 14:43:02 +02:00
Erik Johnson
d916c2b49c Handle cases where retcode/output feature is backported
This will handle the case of RHEL 7.3, which maintains an older version
of systemd with the retcode/output changes from "systemctl status" in
systemd 231 backported.
2016-10-04 09:55:56 -05:00
Erik Johnson
b3364646ad Update systemd module unit tests
The _systemctl_status() function has changed its return data, this
commit updates the affected tests to reflect this.
2016-10-03 22:51:43 -05:00
rallytime
24b8bba145 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-30 16:13:08 -06:00
rallytime
112903ad7e Merge branch '2016.3' into 'carbon'
Conflicts:
  - conf/master
  - doc/ref/configuration/master.rst
  - salt/cli/daemons.py
  - salt/client/ssh/__init__.py
  - salt/config/__init__.py
  - salt/modules/archive.py
  - salt/modules/cmdmod.py
  - tests/unit/states/service_test.py
2016-09-29 09:56:43 -06:00
Denys Havrysh
bba9d0d105 alternatives.install state: detect alternatives command failed 2016-09-29 18:09:16 +03:00
Mike Place
ccd92d22d2 Merge pull request #36621 from terminalmage/fix-shadowed-builtins
Fix shadowed builtins
2016-09-29 11:25:54 +09:00
Erik Johnson
62729eff8d Update tests to include fix for renamed function 2016-09-28 11:00:33 -05:00