Commit Graph

333 Commits

Author SHA1 Message Date
rallytime
9ff2694155 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - pkg/salt-minion.service
  - salt/modules/junos.py
  - salt/modules/localemod.py
  - salt/modules/win_system.py
  - salt/states/junos.py
  - tests/unit/modules/test_localemod.py
  - tests/unit/modules/test_win_powercfg.py
  - tests/unit/states/dockerng_test.py
2017-05-24 16:32:59 -06:00
Benjamin Drung
33a7f8b2ec Fix typos
lintian found several spelling errors.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-24 12:50:29 +02:00
Dmitry Kuzmenko
3cd0f5ebcf Check master shut down correctly. 2017-05-23 11:53:56 +03:00
rallytime
bb1917243e Merge branch '2016.11' into 'nitrogen'
No conflicts.
2017-05-05 10:11:11 -06:00
rallytime
da811fe505 Skip the correct test for the matcher tests in Arch
I mixed up the test that was actually failing for Arch. I originally
submitted #41074 to skip the test_salt_documentation test in the
shell matcher tests. This is the wrong test to skip.

I reverted the previous commit, and applied the skipTest to the
correct test that is failing on Arch, which is the
test_salt_documentation_arguments_not_assumed test.
2017-05-04 14:45:58 -06:00
rallytime
b9d1ce9aed Revert "Skip integration.shell.matcher.MatchTest.test_salt_documentation test for Arch"
This reverts commit 9eb482d5c7.
2017-05-04 14:45:38 -06:00
rallytime
9eb482d5c7 Skip integration.shell.matcher.MatchTest.test_salt_documentation test for Arch
This test is failing in Arch due to a bug in salt-testing. Skipping until
salt-testing can be upgraded. For more information, see
https://github.com/saltstack/salt-jenkins/issues/324.
2017-05-04 11:26:01 -06:00
Pedro Algarvio
7b713d9256
Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
Pedro Algarvio
61003bca0a
Take care of resource leakage on tests 2017-04-04 18:58:20 +01:00
Pedro Algarvio
2ee6d5d589
Import from the original modules not tests.integration 2017-04-04 18:58:19 +01: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
Erik Johnson
9f6d08d606 Update tests which used string kwargs 2017-02-25 20:11:06 -06:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00
Pedro Algarvio
fc59d5e832 Python 3 Fixes (Pt. 2) (#39397)
* Typo in comment

* First convert to string if not already a string. Then to bytes under Py3.

The reason being that jids from the CLI, at least the one fed in
integration.runners.jobs.ManageTest.test_loopup_jid is loaded as an
integer, and, while the Py2 code converts JIDs to strings, under Py3, we
assume JID's are already strings.

* Mark tests which require root permissions to run

* Allow declaring that the function IS a class method.

```
Python 3.5.3 (default, Jan 21 2017, 00:29:12)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
...     def bar(self):
...         print('bar')
...
>>> import inspect
>>> inspect.ismethod(Foo.bar)
False
>>> inspect.ismethod(Foo().bar)
True
```

On Python 2, `inspect.ismethod` returns `True` for bound and unbound
methods while on Python 3 it only returns `True` for bound methods.
The explicit `is_class_method` is to avoid instantiating the class just
to get the function signature.

* Always decode responses to the Python version native string implementation

* Just compare the objects as matching list.

Asserting same item count doesn't make that much sense.

* Py3 compatibility

* Fix saltnado tests under Py3

* Python 3 compatibility

* Show me the full traceback

* Revert "Convert fileserver data from bytes to strings"

This reverts commit e53972f8c6.

* Revert "Under Py3, we get `bytes` when using the roots backend directly"

This reverts commit 9f73b240c1.

* Convert from bytes to str if not a binary file

* Py3 compatibility fixes.

Convert file contents from bytes to string if not a binary file
2017-02-14 16:20:56 -07:00
rallytime
eb61788f87 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/runners/all/index.rst
  - salt/modules/win_lgpo.py
  - salt/states/dockerio.py
2017-02-01 16:36:45 -07:00
rallytime
a782b00ee1 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/cloud/clouds/openstack.py
2017-02-01 13:35:10 -07:00
Erik Johnson
b4afea2a25 Don't fail test if data is empty
This keeps trimmed output from failing the test. We are still testing
with a specific module lower down in the test, so this doesn't reduce
our test coverage.
2017-02-01 00:05:21 -06:00
rallytime
49f57ba3f1 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/utils/win_functions.py
2017-01-25 09:59:29 -07:00
Pablo Suárez Hernández
4311b0b6de Increasing timeouts for running integrations tests 2017-01-23 16:55:48 +00:00
Mike Place
956602244d Merge pull request #36759 from msiebeneicher/improvement/fix_log_output_for_json_and_yaml
Fix log output for `--output=yaml`
2017-01-06 14:44:53 -07:00
rallytime
65032d885e Update shell enabled integration tests with cmd.run aliasing removed
With support for cmd.run --> cmd.shell aliasing removed in this PR,
some of the tests looking for the old behavior need to be adjusted.

1. `test_template_default_enabled` was renamed to `test_template_shell`
and the cmd.run call was changed to a cmd.shell call. Since the
aliasing for cmd.run to cmd.shell has been removed for templates, this
test is no longer necessary. Instead of removing the test, we can use
it to check that cmd.shell works correctly in a state + template
context.
2. The `python_shell=False` kwarg was removed from the template in the
`test_template_default_disabled` test since python_shell=False should be
the default now. (Note the test was renamed for clarity.)
2017-01-06 14:17:28 -05:00
msiebeneicher
9a1a23fca5 reverted json log changes 2016-11-04 11:09:45 +01:00
msiebeneicher
04d5b1852f updated test_list_json_out test 2016-10-18 10:58:38 +02:00
msiebeneicher
d05ef0b209 Merge remote-tracking branch 'remotes/upstream/develop' into improvement/fix_log_output_for_json_and_yaml
* remotes/upstream/develop: (257 commits)
  Removed extra whitespace
  add the ability to verify github webhook hmac signatures
  Improve the sparse docs on python renderer
  Remove trailing whitespace
  Letsencrypt has been renamed to certbot
  Add support for standalone mode
  Pass --quiet to suppress the certbot/letsencrypt dialog
  Fix failing network unit test (#37033)
  Use a default prefix for the mkstemp utils function (#37022)
  CkMinions.connected_ids fix: continue if cache.fetch raises exception
  fire on local (#37015)
  document master_type disable (#37014)
  opkg module: Add 'version', 'reinstall', and 'only_upgrade' to install (#37008)
  Keep minion schedule when recreate loaders. (#37004)
  Fix lint
  opkg: Support ignore_epoch argument in version comparisons (#37007)
  Revert "[2016.11.0rc1] (re)introduce minimal weighing to get_fqhostname"
  add webhook engine
  Versionadded for process_dependency_links kwarg in virtualenv_mod state (#37006)
  Versionadded tag for new update_head option in hg state (#37005)
  ...
2016-10-18 10:43:02 +02:00
msiebeneicher
db19e31038 fixed integration tests after json output change 2016-10-12 16:05:29 +02:00
msiebeneicher
9e264812cb unify json output tests for different plattform / lib versions 2016-10-12 12:39:48 +02:00
rallytime
616aafa398 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-09-29 11:47:48 -06:00
rallytime
3e4ac617d3 Merge branch '2015.8' into '2016.3'
Conflicts:
  - tests/integration/cli/grains.py
  - tests/integration/files/file/base/issue-2068-template-str-no-dot.sls
  - tests/integration/files/file/base/issue-2068-template-str.sls
  - tests/integration/modules/pip.py
2016-09-29 09:15:26 -06:00
Mike Place
3d098c64ef
Remove possible race between grains dumps in test
It's not always reasonable assume that grains will be the same byte-for-byte
between invocations. Remove that assumption since it isn't related to the what's under test here anyhow.
2016-09-29 15:34:50 +09:00
Mike Place
7b43d4322c
Merge branch '2016.3' into 2016_3_carbon 2016-09-27 16:44:42 +09:00
Mike Place
3a83b0bd16
Remove tests which no longer apply
The point of these tests originally was to verify the proper location
of a log file. Checking return codes is just spurious and ties the test
too closely with the shutdown behavior of the daemons which are tracked and tested
in other places more closely and with more accuracy.
2016-09-27 16:36:24 +09:00
Mike Place
52e9ba4076 Revert "Skip some tests on MacOS" (#36341) 2016-09-15 11:12:04 -06:00
Justin Findlay
d0c4846c89 skip tests that timeout on MacOS
Due to the changes in how the test daemons are handled, it seems.  The
tests fail intermittently.
2016-09-14 14:40:43 -06:00
Megan Wilhite
393bbef63b Add test 35015 (#35945)
* add salt-key eauth tests

* add salt-run with eauth tests

* add method docs

* change expected return
2016-09-09 12:58:50 -06:00
plastikos
dde85e1144 Various fixes for MacOS X (#36085)
* Change "unknown" user to "some_unknown_user_xyz" since "unknown"
  *is* a valid user

* Add timeout to proxy test_exit_status_no_proxyid() since a known
  failure case is to infinitely loop with an error.

* Always force the source code tree under test to be the first entry
  in PYTHONPATH (excluding verbatim_env)
2016-09-06 16:30:08 -06:00
Mike Place
7f137835b9 Merge pull request #35626 from cachedout/better_cleanup_for2731
Wrap the test in a try/finally to ensure that the keys get cleaned up.
2016-08-22 12:38:17 +09:00
Mike Place
9248ce07f9 Lint 2016-08-22 12:33:24 +09:00
Pedro Algarvio
f7693f306c
Apply child processes cleanup counter measure on testprogram too.
Additionally, avoid timeout exceptions with registered atexit calls for testprogram(s)
2016-08-22 00:36:53 +01:00
Mike Place
ea8fb37b48 Wrap the test in a try/finally to ensure that the keys get cleaned up.
We're seeing the keys appear later on in some tests, such as here:

integration.modules.saltutil.SaltUtilModuleTest.test_wheel_just_function
2016-08-21 20:22:26 +09:00
rallytime
1fe0b69a6c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/blockdev.py
  - salt/modules/ddns.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/linux_sysctl.py
  - salt/modules/status.py
  - salt/modules/x509.py
  - salt/utils/process.py
  - salt/utils/verify.py
  - tests/integration/__init__.py
  - tests/integration/modules/state.py
  - tests/integration/states/cmd.py
2016-08-12 16:21:58 -06:00
rallytime
cf038ee3fe Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/grains/core.py
  - salt/modules/file.py
  - salt/modules/hosts.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/portage_config.py
  - salt/modules/x509.py
  - salt/scripts.py
  - tests/integration/shell/enabled.py
2016-08-11 11:33:54 -06:00
Erik Johnson
a375dd7e1f Clean up open filehandles (#35359)
* salt/crypt.py: clean up open filehandles

* salt/fileclient.py: clean up open filehandles

* salt/grains/core.py: clean up open filehandles

* salt/modules/cp.py: clean up open filehandles

* salt/modules/data.py: clean up open filehandles

* salt/modules/dnsutil.py: clean up open filehandles

* salt/modules/dockerng.py: clean up open filehandles

* salt/modules/inspectlib/collector.py: clean up open filehandles

* salt/modules/file.py: clean up open filehandles

* salt/modules/hosts.py: clean up open filehandles

* salt/modules/incron.py: clean up open filehandles

* salt/modules/dpkg.py: clean up open filehandles

* salt/modules/linux_sysctl.py: clean up open filehandles

* salt/modules/netbsd_sysctl.py: clean up open filehandles

* salt/modules/network.py: clean up open filehandles

* salt/modules/nftables.py: clean up open filehandles

* salt/modules/openbsd_sysctl.py: clean up open filehandles

* salt/modules/rh_ip.py: clean up open filehandles

* salt/modules/portage_config.py: clean up open filehandles

* salt/modules/status.py: clean up open filehandles

* salt/modules/tls.py: clean up open filehandles

* salt/modules/xapi.py: clean up open filehandles

* salt/modules/x509.py: clean up open filehandles

* salt/modules/virt.py: clean up open filehandles

* salt/modules/zcbuildout.py: clean up open filehandles

* salt/returners/local_cache.py: clean up open filehandles

* salt/utils/cloud.py: clean up open filehandles

* salt/states/pkgrepo.py: clean up open filehandles

* salt/states/x509.py: clean up open filehandles

* salt/transport/mixins/auth.py: clean up open filehandles

* salt/utils/__init__.py: clean up open filehandles

* salt/states/pkg.py: clean up open filehandles

* salt/utils/minion.py: clean up open filehandles

* salt/utils/openstack/nova.py: clean up open filehandles

* salt/utils/openstack/swift.py: clean up open filehandles

* salt/utils/process.py: clean up open filehandles

* salt/utils/templates.py: clean up open filehandles

* salt/utils/virt.py: clean up open filehandles

* tests/integration/__init__.py: clean up open filehandles

* tests/integration/cli/grains.py: clean up open filehandles

* tests/integration/client/standard.py: clean up open filehandles

* tests/integration/modules/hosts.py: clean up open filehandles

* tests/unit/utils/vt_test.py: clean up open filehandles

* tests/integration/shell/enabled.py: clean up open filehandles

* tests/integration/states/cmd.py: clean up open filehandles

* tests/integration/states/file.py: clean up open filehandles

* tests/integration/states/match.py: clean up open filehandles

* tests/unit/config_test.py: clean up open filehandles

* tests/unit/templates/jinja_test.py: clean up open filehandles

* tests/unit/utils/find_test.py: clean up open filehandles

* tests/integration/modules/state.py: clean up open filehandles

* Update dnsutil_test to reflect changes in fopen usage
2016-08-11 10:45:24 -06:00
Mike Place
59dbb05db6 Disable init script test temporarily
This will be re-enabled later on.
2016-08-03 07:40:30 +09:00
Dmitry Kuzmenko
b50d85a154 Properly remove minion_test_issue_2731 key. 2016-08-02 14:47:51 +03:00
Mike Place
6994825b3d Merge pull request #35015 from DSRCompany/features/8705_run_and_key_eauth
#8705 run and key eauth
2016-08-02 02:47:27 -06:00
Dmitry Kuzmenko
1d606e71c8 Fixed pylint error. 2016-08-02 10:01:01 +03:00
Dmitry Kuzmenko
42ef411c82 Updated salt-key test. 2016-08-02 10:01:01 +03:00
rallytime
d787140861 Make some adjustments after resolving merge conflict 2016-08-01 18:32:28 -06:00
rallytime
1f45d906c8 PY3: Fix byte string encoding issues when running shell.master int tests 2016-08-01 18:03:48 -06:00