Commit Graph

779 Commits

Author SHA1 Message Date
Nicole Thomas
83ed40c06a
Merge pull request #46619 from rallytime/merge-2017.7
[2017.7] Merge forward from 2017.7.5 to 2017.7
2018-03-20 15:03:29 -04:00
Daniel Wallace
78cbf7b5cd
Fix npm issue
Fixes saltstack/salt-jenkins#884
2018-03-16 09:04:09 -06:00
Daniel Wallace
8d5ab72983
virtualenv version too old for python3.6
This test is testing an old version of virtualenv with pip_env, and the version
of pip is 6.x.x, which is too old and doesn't work with the importlib in python
3.6. Skipping this test if python is newer then 3.5.
2018-03-15 12:18:23 -06:00
Erik Johnson
ce391c53f4
Add regression test for #44299 2018-03-13 21:30:14 -05:00
Erik Johnson
f9f187e915
Improve reliability/idempotence of file.blockreplace state
This makes the following changes:

- The `append_newline` argument to the `file.blockreplace`
  remote-execution function has been modified so that if its value is
  `None`, it only appends a newline when the content block does not end
  in one.
- A couple of fixes were made to newline handling. The existing code
  normalized the newlines in the content block, replacing them with
  os.linesep. However, when the file contains newlines that don't match
  the OS (i.e. POSIX newlines in a file on a Windows box, or Windows
  newlines on a Linux/Mac/BSD/etc. box), then we would still end up with
  mixed newlines. The line separator is now detected when we read in the
  original file, and the detected line separator is used when writing
  the content block. Additionally, the same newline mismatch was
  possible when appending/prepending the content block. This has been
  fixed by using a common function for appending, prepending, and
  replacing the content block.
- Support for the `append_newline` argument has been added to the
  `file.blockreplace` state. The default value for the state is `None`.
  A `versionchanged` has been added to the remote execution function to
  let users know that the Fluorine release will change the default value
  of that variable.
- 20 new integration tests have been written to test the
  `file.blockreplace` state.
2018-03-07 22:29:39 -06:00
Dheeraj Gupta
08d1ee8baf Fix Python3 test errors 2018-02-28 16:44:29 +05:30
Dheeraj Gupta
aa9d709015 Pass env_vars to pip.freeze
pip.installed state calls pip.freeze to check for existing installation
and to verify installation post-install. This patch propagates the
env_vars passed to pip.installed to the pip.freeze function. It also modifies
existing pip unit tests to test new functionality and adds an integration test
that verifies the expected correct behavior

Fixes #46127
2018-02-28 16:44:20 +05:30
Erik Johnson
9cd47b39dd
Fix incorrect translation of docker port_bindings -> ports
The logic which ensures that we expose ports which are being bound,
even when not explicitly configured, was done incorrectly. UDP ports
were being passed to the API as '1234/udp' instead of (1234, 'udp').
This results in the port not being exposed properly.

The logic has been corrected. Additionally both the "ports" input
translation function, as well as the post-processing code (where the
port numbers configured in port_bindings were being added) both
contained code to "fix" any ports which were configured using
'portnum/tcp', as these must be passed to the API simply as integers. To
reduce code duplication, this normalization is now only performed at the
very end of the post-processing function, after ports have been
translated, and any missing ports from the port_bindings have been
added.

The unit test for the port_bindings input translation code, which was
written based upon the same incorrect reading of the API docs that
resulted in the incorrect behavior, have been updated to confirm the
(now) correct behavior. The unit test for the ports input translation
code has been updated to reflect the new normalization behavior.

Finally, an integration test has been added to ensure that we properly
expose UDP ports which are added as part of the post-processing
function.
2018-02-08 23:23:43 -06:00
Erik Johnson
9d200efc26
Add regression test for issue 45893 2018-02-07 14:32:59 -06:00
Nicole Thomas
c290b6320b
Merge pull request #45634 from Ch3LL/mac-service
Add different service name for Mac 10.13 test
2018-01-23 16:51:56 -05:00
Ch3LL
31b712e27d
Add different service name for Mac 10.13 test 2018-01-23 10:07:10 -05:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-22 11:55:54 -05:00
Daniel Wallace
0ba39a7108
switch systemd-journald for sshd for arch service test
the running tests run second because of alphabetical order, and stopping sshd
does not kill off the running connection, so we know that sshd has to be on
arch for us to connect, so stop it with dead and start it back with running.

It is also not possible to stop the systemd-journald process without shutting
down the full machine.
2018-01-19 15:17:53 -07:00
rallytime
de6d85959a
Lint fix 2018-01-17 12:42:38 -05:00
rallytime
9f547a31f0
Merge branch '2016.11' into '2017.7' 2018-01-16 17:19:08 -05:00
rallytime
590a6db626
Lint: use support TMP path instead of integration TMP path 2018-01-16 09:13:27 -05:00
Erik Johnson
c081b2c62c
Fix git.latest failure when rev is not the default branch 2018-01-14 08:23:38 -05:00
Pablo Suárez Hernández
52f9c06908
Fix integration tests for 'user.present' state. 2018-01-12 12:47:29 +00:00
Erik Johnson
0cbc6767bf
Fix git.latest failure when rev is not the default branch 2018-01-11 15:26:35 -06:00
Ch3LL
4e569b5802
Allow macosx service state tests to check for pid return 2018-01-05 12:25:44 -05:00
rallytime
fe81e2d39a
Merge branch '2016.11' into '2017.7'
No conflicts.
2017-12-20 10:26:10 -05:00
Erik Johnson
80b6bd6813
Fix integration.states.test_pip.PipStateTest.test_pip_installed_weird_install
Carbon 1.1.1 for some reason added six to their setup.py, which breaks
this test since it's not installed into the virtualenv. This PR forces
this test to use a version of carbon which does not dep on six in its
setup.py.
2017-12-20 06:54:30 -05:00
rallytime
23c5a4ca3e
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/win_pkg.py
  - salt/states/file.py
  - tests/integration/states/test_file.py
  - tests/unit/states/test_file.py
2017-12-07 17:33:03 -05:00
twangboy
a27bb6993a
Fix py3 error 2017-12-04 14:05:54 -07:00
twangboy
187bc1e61e
Add back the try/finally blocks 2017-12-04 14:05:54 -07:00
twangboy
d7241d004f
Fix 2 more tests 2017-12-04 14:05:54 -07:00
twangboy
d5dd42aebe
Fix integration tests for Windows 2017-12-04 14:05:53 -07:00
twangboy
af5565859e
Use file functions for symlink and remove 2017-12-04 14:05:53 -07:00
Erik Johnson
153bf45b03
Fix regression in file.managed when source_hash used with local file
This ensures that we enforce the passed source_hash when the source is a
file local to the minion.
2017-12-03 00:01:44 -06:00
Ch3LL
7536150567
Add service.running integration state test 2017-11-16 14:12:59 -05:00
rallytime
d40eba6b37 Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/states/git.py
2017-08-25 16:07:27 -04:00
Daniel Wallace
ccd2241777 Pin request install to version
This fails on centos 6 because its node is too old to support the version of
hawk bumped here https://github.com/request/request/pull/2751, we can still
test the functionality.  This will pull from github, and install a specific tag
version, and we still do the uninstall using the github path.

This should be more stable.
2017-08-25 10:23:35 -06:00
rallytime
fb7117f2ac Use salt.utils.versions.LooseVersion instead of distutils 2017-08-11 16:31:24 -04:00
rallytime
29ff19c587 Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/config/__init__.py
  - salt/states/dockerng.py
  - salt/utils/cloud.py
2017-08-11 15:17:19 -04:00
Daniel Wallace
da3402a53d make sure cmd is not run when npm isn't installed
apparently the skipIf on the functions still get run, even if the function is
going to be skipped based on a skipIf on the class.
2017-08-11 10:58:00 -06:00
Daniel Wallace
b458b89fb8 skip cache_clean test if npm version is >= 5.0.0 2017-08-10 14:17:47 -06:00
Erik Johnson
c69f17dd18 Add integration test for #42774 2017-08-08 14:20:42 -05:00
rallytime
c673b64583 Merge branch '2016.11' into '2017.7'
Conflicts:
  - doc/conf.py
  - doc/ref/configuration/master.rst
  - doc/ref/configuration/minion.rst
  - salt/engines/hipchat.py
  - salt/engines/slack.py
  - salt/grains/core.py
  - salt/version.py
  - tests/integration/states/test_renderers.py
2017-07-20 09:54:08 -06:00
Pablo Suárez Hernández
915d94219e Allow to check whether a function is available on the AliasesLoader wrapper 2017-07-18 12:57:36 +01:00
Gareth J. Greenaway
a34970b45b Back porting the fix for 2017.7 that ensures the order of the names parameter. 2017-07-06 12:12:50 -07:00
rallytime
7d7be2d375 Merge branch '2016.11' into '2017.7'
Conflicts:
  - doc/ref/configuration/master.rst
  - tests/integration/states/test_archive.py
  - tests/unit/transport/test_tcp.py
  - tests/unit/transport/test_zeromq.py
2017-06-28 10:48:37 -06:00
Denys Havrysh
54910fe55f archive.extracted: fix hash sum verification for local archives 2017-06-26 19:08:47 +03:00
rallytime
bdf33d7f5f Merge branch '2016.11' into 'nitrogen'
No conflicts.
2017-06-13 09:26:05 -06:00
Daniel Wallace
0fa380f75c npm 5 and greater requires --force for cache clean
This is the error

```
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and
data extracted from the cache is guaranteed to be valid. If you want to make
sure everything is consistent, use 'npm cache verify' instead.

npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command
with --force.
```
2017-06-12 14:48:43 -06:00
Mike Place
45326ccdec Merge pull request #41621 from gtmanfred/mac
Fix some mac tests
2017-06-07 10:19:25 -05:00
Daniel Wallace
b25b487ceb create home directory for issue-1959
Fixes https://github.com/saltstack/salt-jenkins/issues/388
2017-06-06 13:32:57 -06:00
Ch3LL
8d27bb31b2
Disable home dir check for mac in more test_user tests 2017-06-06 11:20:18 -04:00
Ch3LL
85e77c9cc8
Disable home dir check for mac in test_user 2017-06-06 11:02:19 -04:00
Ch3LL
ddcb1ca9a7
change group to wheel for macosx in tests 2017-06-05 17:16:54 -04:00
Mike Place
713a671f09 Merge pull request #41471 from terminalmage/blockreplace-test
Fix a file.blockreplace test for Python 3
2017-05-30 13:48:22 -05:00