Commit Graph

9187 Commits

Author SHA1 Message Date
Pedro Algarvio
ab83cced63
Child processes termination cleanup 2017-03-01 01:33:07 +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
Pedro Algarvio
08804932c3
Using pytest start_daemon 2017-02-28 22:52:48 +00:00
Pedro Algarvio
53eff91efa
Re-enable the test since we now have the flaky decorator 2017-02-28 22:52:48 +00:00
Pedro Algarvio
2a9d2beb02
The order is shady under Py3
/cc @cachedout @rallytime
2017-02-28 22:52:48 +00:00
Pedro Algarvio
1daa2e24cd
Moved some test supporting modules to tests/support
Previously they were in tests/utils which also had test case modules.
2017-02-28 22:52:48 +00:00
Pedro Algarvio
7278a6c868
You need to pass a list. How did this ever pass?! 2017-02-28 22:52:48 +00:00
Mike Place
ec79d238fb Merge pull request #39732 from gtmanfred/develop
Add queueing of runner tasks using the scheduler and queue runner
2017-02-28 15:09:43 -07:00
Mike Place
a73a5f9c1f Merge pull request #39646 from terminalmage/zh921
Handle deprecation of passing string args to load_args_and_kwargs
2017-02-28 14:59:33 -07:00
Daniel Wallace
39bb623bdc fix pylint 2017-02-28 14:53:02 -06:00
Daniel Wallace
878b21662e add test for queue 2017-02-28 14:10:41 -06:00
Calle Pettersson
4154910dd3 Vault: Handle patterns with non-existing keys 2017-02-28 21:07:49 +01:00
Nicole Thomas
8809d33674 Merge pull request #39701 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-02-28 12:50:10 -07:00
rallytime
ddf8f87249 Add some additional mocks for win_iis unit test 2017-02-28 10:36:11 -07:00
Erik Johnson
7b958fb389 Add options to skip fileserver/git_pillar preflight checks
This commit also modifies the master config for the test suite to use
this new option, so that a missing GitPython/Pygit2 will not crash the
test suite's master. This should make the test suite run smoother by
only negatively impacting those tests which require the pillar data
provided by git_pillar, when a valid provider is not available.
2017-02-27 20:21:53 -06:00
Mike Place
09ac8822c5 Merge pull request #39672 from carlpett/feature/vault-list-expansion
Vault: Add support for expanding lists in policies
2017-02-27 17:33:02 -07: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
twangboy
dc42987137 Add integration.sdb.test_env tests 2017-02-27 15:09:25 -07:00
Mike Place
3037e7de46 Merge pull request #39651 from DennisHarper/fixNoneCache
Checking Instance when calling a function that can return None
2017-02-27 13:21:00 -07:00
Calle Pettersson
6dac1c710e Vault: Add support for expanding lists in policies 2017-02-27 19:55:26 +01:00
Mike Place
b6dea5efb9
Correct small bug with docs test. 2017-02-27 09:59:25 -07:00
Mike Place
3336dbc02a Merge pull request #39660 from terminalmage/warn_ip_addrs
Add warnings to test suite when requisites are not installed
2017-02-27 09:55:38 -07:00
dharper
c71753197a Checking instance exists in master._get_cached_minion_data when cache.fetch returns None 2017-02-27 09:37:37 -06:00
Erik Johnson
5a3c099e4f Rewrite the tests_valid_docs test
This uses a function in the runtests_helpers custom module to perform
all the logic, and only returns what failed the test. This saves us from
having to return the entire contents of sys.doc (as well as log all of
the function calls), and also removes the need to run sys.doc in batches
to get around the "max message size" issue.
2017-02-26 12:21:00 -06:00
Erik Johnson
9f6d08d606 Update tests which used string kwargs 2017-02-25 20:11:06 -06:00
Erik Johnson
503216e5c5 Add warnings to test suite when requisites are not installed
Since we have recently changed the test suite to use new-style
git_pillar, GitPython or Pygit2 is a hard dep for the test suite.

Additionally, when starting up the daemons, if no IPv4 addresses can be
detected (which can happen on docker containers which tend to have
minimal installs) then the suite will time out trying to detect whether
or not the minion/sub-minion has connected, which while it does not
prove fatal for the test suite, it does make the suite take several
minutes to start up and begin running tests. This is because the test
suite invokes the manage.joined runner, which in turn invokes
salt.utils.network.ip_addrs() to get the system's IP addresses to match
against those which are connected. If it can't get the IP addresses,
then the manage.joined runner returns an empty list, and the test suite
believes that no minions have connected, and the function that
periodically runs manage.joined will eventually time out.

This commit adds messages to the console when no suitable gitfs provider
is installed, and when salt.utils.network.ip_addrs() returns an empty
list, to hopefully prompt the user to install the missing requisites.
2017-02-25 19:49:44 -06:00
Erik Johnson
28564da966 Implement no_block for service.running/service.dead (systemd only) 2017-02-24 15:14:09 -06:00
Mike Place
9eb23993d3 Merge pull request #39467 from gtmanfred/sls_build
Use sls_build for building docker images
2017-02-24 14:04:38 -07:00
Daniel Wallace
89101fa342 allow sls_build to be used with states 2017-02-24 11:47:13 -06:00
twangboy
34659761e8 Add issue number to skipIf 2017-02-24 09:31:47 -07:00
twangboy
e50ae8dd37 Fix wheel tests 2017-02-24 09:31:47 -07:00
Pedro Algarvio
0e1e133169
Fix a weird import issue
```
ImportError: Failed to import test module: unit.modules.docker_test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/loader.py", line 252, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib64/python2.7/unittest/loader.py", line 230, in _get_module_from_name
    __import__(name)
  File "/testing/tests/unit/modules/docker_test.py", line 39, in <module>
    class DockerTestCase(TestCase):
  File "/testing/tests/unit/modules/docker_test.py", line 103, in DockerTestCase
    @skipIf(_docker_py_version() < (1, 4, 0),
  File "/testing/tests/unit/modules/docker_test.py", line 34, in _docker_py_version
    return docker_mod.docker.version_info
AttributeError: 'module' object has no attribute 'version_info'
```
2017-02-24 09:11:23 +00:00
Pedro Algarvio
1b84bee06f
Enforce and preserve module loading order.
This is the only way we can have predictable results when overriding,
for example, grains.
2017-02-24 09:11:22 +00:00
Pedro Algarvio
f9015ff1e4
Don't even try to concatenate non string types 2017-02-24 09:11:21 +00:00
Pedro Algarvio
62f55073c9
Fix test cases(no longer logging errors). 2017-02-24 00:49:33 +00:00
Pedro Algarvio
15376697f9
Code cleanup 2017-02-24 00:49:33 +00:00
Pedro Algarvio
5d0110d98b
Code cleanup 2017-02-24 00:49:33 +00:00
Pedro Algarvio
ae46b0da3a
Code cleanup 2017-02-24 00:49:32 +00:00
Pedro Algarvio
3a85996d2a
Code cleanup 2017-02-24 00:49:32 +00:00
Pedro Algarvio
f7974b186b
Code cleanup 2017-02-24 00:49:32 +00:00
Pedro Algarvio
7fff27627a
Code cleanup 2017-02-24 00:49:32 +00:00
Pedro Algarvio
5fb0aa5dcf
Code cleanup 2017-02-24 00:49:31 +00:00
Pedro Algarvio
019225ec47
Code cleanup. We aren't even using mock! 2017-02-24 00:49:31 +00:00
Pedro Algarvio
62cf3c454e
Add LoaderModuleMockMixin 2017-02-24 00:49:31 +00:00
Pedro Algarvio
f2b8afef63
Only start the test_daemon fixture on integration tests 2017-02-23 23:19:46 +00:00
Pedro Algarvio
ad3dbee189
Add test case to make sure we always proper test module names from now on 2017-02-23 23:19:46 +00:00
Pedro Algarvio
bdb3cc3d89
Test websockets against the actual tornado application created in salt 2017-02-23 23:19:45 +00:00
Pedro Algarvio
b0794617c5
Fix unit.utils.test_warnings after the rename changes 2017-02-23 23:19:45 +00:00
Pedro Algarvio
4ff190cac6
Fix, simplify, syntax the test_doc unit test 2017-02-23 23:19:45 +00:00