Commit Graph

691 Commits

Author SHA1 Message Date
Nicole Thomas
d0182ac3ef Merge pull request #40375 from terminalmage/pr-39838
Cleanup and resubmit of PR #39838 against develop branch
2017-03-29 10:34:43 -06:00
rallytime
4fbe9f18b8 Use "self.archive_tar_source" instead of undefined ARCHIVE_TAR_SOURCE global 2017-03-29 09:11:46 -06:00
rallytime
52edbffc85 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/cache/all/index.rst
  - doc/topics/cache/index.rst
  - salt/cache/localfs.py
  - salt/modules/boto_rds.py
  - salt/roster/cloud.py
  - salt/states/virtualenv_mod.py
  - tests/integration/states/test_archive.py
  - tests/unit/modules/test_dockermod.py
  - tests/unit/states/dockerng_test.py
2017-03-28 17:09:30 -06:00
Narendra Ingale
4ac73bb55c Added test for issue 39191. 2017-03-28 14:55:05 -05:00
Ch3LL
8b21b4c8bb add use_cmd_unzip test 2017-03-27 10:32:27 -06:00
Erik Johnson
5ad476936d Overhaul Docker support
This does the following:

- Splits states for container/volume/image/network management into four
  separate state modules.

- Preserves backward compatibility by making ``docker.image_present``
  invoke ``docker_image.present``, etc.

- Changes how Salt detects that a container needs to be replaced.
  Instead of comparing each passed argument to the named container's
  configuration, it creates a temporary container, and compares that
  container to the named container. If the two differ, then the older
  container is removed, and the new one is renamed and started, becoming
  the named container.

- Removes the unit tests for container management and replaces them with
  integration tests.

- Adds unit tests for the new salt.utils.docker
2017-03-21 16:53:19 -05:00
rallytime
a6a7538fe4 Pylint fix 2017-03-21 13:39:34 -06:00
rallytime
2222e1cae9 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/napalm_network.py
  - tests/integration/states/test_archive.py
  - tests/integration/states/test_file.py
  - tests/unit/modules/test_docker.py
2017-03-21 10:19:52 -06:00
rallytime
dd193cc740 Make sure the tornado web server is stopped at the end of the test class
The tornado web aplication that was set up in the archive tests, and then
duplicated in the remote file integration tests, starts the web server,
but never stops it. This creates a stacktrace that hangs the other test
file that attempts to start the web server.

The Application class has a `listen()` function, but not a `stop()` function.
The change uses the `HTTPServer` class to set up the listening server, but
also has the necessary `stop()` function. (The `listen()` function from the
`Application` class just calls out to the `HTTPServer`'s `listen()` function,
so this works nicely here.)

We can then call the `stop()` function in the `tearDownClass` class method.

I also removed some duplicate STATE_DIR definitions.
2017-03-20 13:08:17 -06:00
Erik Johnson
5b71db29d5 Use user.present/absent states to manage user in virtualenv test 2017-03-15 17:18:25 -05:00
Erik Johnson
eb09901f36 Simplify the user state integration tests
Put the skipIf and the destructiveTest decorators on the class instead
of each function. Also added a user.absent to the tearDown to reduce
code duplication.
2017-03-15 17:16:34 -05:00
Erik Johnson
66596c6d75 Fail test if sudo is missing 2017-03-15 17:15:56 -05:00
Erik Johnson
9b3890b5f2 Fix network test for cases where no network settings are configured
This allows the test to pass inside a docker container where the
networking is managed by docker and not by the OS' network mangagment
daemon.
2017-03-15 17:14:29 -05:00
Erik Johnson
ef110baa99 Update git state integration tests for PY3 compatibility
Python 3 didn't like some of the stuff that we were doing with
``subprocess.check_call()`` in these tests, so to fix this I have redone
that stuff with calls to functions in the git execution module. In order
to avoid problems with running tests with no global gitconfig, I needed
to add an argument called ``git_opts`` to most of the funcs in the git
execution module (well I didn't *need* to do it to most of the funcs, it
just seemed like we shouldn't only be supporting this argument in a
single function).

This new ``git_opts`` argument is specifically for passing arguments to
the git command itself (not the subcommand). For example, ``git -c
user.name="Foo Bar" commit .....`` is different than running ``git
commit -c user.name="Foo Bar" .....``, because the ``commit`` subcommand
for git also accepts ``-c``.
2017-03-14 18:07:06 -05:00
Pedro Algarvio
410b583a63
The port attribute definition must come first 2017-03-12 18:05:30 +00:00
Pedro Algarvio
992a8c7294
Don't hardcode the webserver port number 2017-03-11 16:00:28 +00:00
Nicole Thomas
2f0f7cd224 Merge pull request #39897 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-03-09 09:03:46 -07:00
Pedro Algarvio
51c5558b32
This should no longer hang 2017-03-08 20:43:36 +00:00
Pedro Algarvio
0b41b92d7d
Use salt.utils.versions instead of distutils.version 2017-03-08 19:22:33 +00:00
Pedro Algarvio
7fffd93b50
Don't pollute the repo tests state tree 2017-03-08 18:34:33 +00:00
Pedro Algarvio
b391a4eb5b
Supervisord does not work under Python 3 2017-03-08 18:34:33 +00:00
Pedro Algarvio
e2e303e724
Minor changes to paths 2017-03-08 18:34:32 +00:00
Pedro Algarvio
712b81e0c1
supervisor does not run against py3. Use pep8 for the tests. 2017-03-08 18:34:32 +00:00
Pedro Algarvio
07d0a5ed20
Cleanup after ourselves 2017-03-08 18:34:32 +00:00
rallytime
4fc9b5484b Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/client/ssh/__init__.py
  - salt/pillar/makostack.py
  - tests/integration/client/test_runner.py
  - tests/integration/states/test_file.py
2017-03-08 09:04:26 -07:00
Pedro Algarvio
adacf4cc28
Don't expect any ordering from sets!!!!! 2017-03-03 18:31:11 +00:00
Pedro Algarvio
e180f1e913
Normalize the mode 2017-03-03 15:15:13 +00:00
Pedro Algarvio
5b5a6ebbe8
Minor code cleanup 2017-03-02 19:58:10 +00:00
Pedro Algarvio
5e3309d5f8
Let's use the skip_if_not_root decorator instead 2017-03-02 19:58:10 +00:00
Pedro Algarvio
2f3d0b0b81
These are not destructive tests 2017-03-02 19:58:10 +00:00
Pedro Algarvio
80002276c2
These tests are not destructive 2017-03-02 19:58:10 +00:00
Erik Johnson
64db0b8563 Add integration tests for remote file sources 2017-03-01 10:57:06 -06:00
Pedro Algarvio
a78c037a5f
PyLint, no its not a repeated keyword! 2017-03-01 01:33:08 +00:00
Pedro Algarvio
4f425e596b
Don't assert, just fail 2017-03-01 01:33:08 +00:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
rallytime
b4366103a6 Merge branch '2016.11' into 'develop'
Conflicts:
  - .pylintrc
  - .testing.pylintrc
  - salt/fileclient.py
  - salt/minion.py
  - salt/modules/docker.py
  - salt/modules/win_iis.py
  - salt/states/docker.py
  - salt/states/file.py
  - salt/utils/__init__.py
  - tests/integration/modules/test_sysmod.py
2017-02-27 15:11:37 -07:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00
Erik Johnson
cbdf905b9f Update test to reflect new state comment 2017-02-23 11:21:33 -06:00
Pedro Algarvio
0b3071ee3a
.iter<items|keys|values>() Py3 compatibility 2017-02-22 10:20:26 +00:00
Pedro Algarvio
005f21d3b5
Compare against the normalized mode string 2017-02-13 10:18:58 +00:00
Pedro Algarvio
c1b5606199
Handle bytes vs strings on the file state module tests 2017-02-13 10:18:57 +00:00
Pedro Algarvio
7b7133ea25
This test case requires root permissions 2017-02-13 10:18:56 +00:00
Erik Johnson
da7d3ecec0 Add integration test for wildcard versions 2017-02-07 08:54:26 -06:00
rallytime
43dba1bf78 Skip new managed file state test on Windows 2017-01-30 13:40:25 -07:00
rallytime
8e17c96e02 Write failing test for Issue #38111
Test calls "file.managed" using the "check_cmd" kwarg with the
state provided as a reproducible test case for the issue.
2017-01-27 11:28:54 -07:00
rallytime
3f74d697b9 Merge branch '2016.11' into 'develop'
Conflicts:
  - pkg/windows/build_pkg.bat
  - salt/modules/archive.py
2017-01-20 12:07:19 -07:00
Megan Wilhite
a8a6215663 refine the os detection in archive test (#38807) 2017-01-18 11:03:55 -07:00
Eric Radman
fa3648c576 Respect follow_symlinks when run with test=True
Previously file.directory correctly sets the permissions of the target
of a symlink, but it did not return the correct result during a dry run.
This change plumbs the follow_symlinks parameter to test-only functions.
2017-01-16 03:04:50 -05:00
rallytime
05ec9f4b5b Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/netapi/rest_cherrypy/app.py
2016-12-15 20:47:35 -07:00