Commit Graph

792 Commits

Author SHA1 Message Date
Daniel A. Wozniak
37caecb7f4
Ignore pylint WindowsError 2018-05-14 15:49:15 -04:00
Daniel A. Wozniak
c1135d90c7
Better doc string 2018-05-14 15:49:08 -04:00
Daniel A. Wozniak
e53d6b9ed9
Skip tests when we can not use runas 2018-05-14 15:49:02 -04:00
twangboy
14ee5537b9
Add @with_tempdir helper
Fix two state tests
Remove redundent tests
2018-05-02 12:17:36 -06:00
twangboy
6c3b5fa6fa
Fix typo 2018-05-01 16:28:48 -06:00
twangboy
7c46d9d0d4
Fix integration.modules.test_pip
Pass password as kwarg for runas on Windows
Fix issues with pip 10 in unit.states.test_pip
2018-05-01 15:33:29 -06:00
twangboy
3e6e524eca
Fix some tests`` 2018-04-26 22:37:15 -06:00
Benedikt Werner
34bf66c09f
Fix pip.installed with pip>=10.0.0 2018-04-21 13:08:08 +02:00
Gareth J. Greenaway
9373dff52b
Update test_pkgrepo.py 2018-04-11 10:55:36 -04:00
Gareth J. Greenaway
13cf9eb5b1
Removing debugging. 2018-04-11 10:55:36 -04:00
Gareth J. Greenaway
a61a8593e5
Removing suse from pkgrepo comments tests. the pkgrepo functions in SUSE pkg module do not support comments. 2018-04-11 10:55:36 -04:00
Daniel Wallace
bff61dd291
use http registry for npm
Older versions of npm can't validate the newer certificate.

We don't really need to worry about this, and it would be better to just make
sure the tests run correctly that to use https for the tests.
2018-04-03 09:44:48 -05:00
Daniel Wallace
fd0e649d1e
only use npm test work around on newer versions
The workaround only needs to be applied to versions of npm newer than 5.1, but
they work with versions newer than 5.0, so just do all newer versions using the
work around
2018-03-27 13:51:21 -05:00
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