Commit Graph

318 Commits

Author SHA1 Message Date
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
rallytime
fbe87fbb4a PY3: Fix byte string encoding issues when running shell.proxy int tests 2016-08-01 18:03:48 -06:00
rallytime
f47e2f9399 PY3: Fix byte string encoding issues when running shell.minion int tests 2016-08-01 18:03:48 -06:00
Thayne Harbaugh
c6d08bf31b Minor tweaks to testing exit codes
* shared config settings go in `config_base` rather than *each* config
* Ensure that `name` attribute is a string
* Ensure that `dirtree` gets used from kwargs
* Adding 'XXXX' to the mkdtemp template is unnecessary
* Only template values if they are strings - otherwise just use them directly
2016-08-01 11:20:15 -06:00
Thayne Harbaugh
5816463eae Corrections to proxy testing:
* Ensure that the --config_dir argument is passed when "verbatim_args" is set
* Ensure that the user option is set to "unknown" for both proxy and minion configurations
2016-07-29 11:57:54 -06:00
Thayne Harbaugh
c37bafaca1 Appease the pylint gods. 2016-07-28 14:50:53 -06:00
rallytime
3149da1bcc Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-29 16:16:46 -06:00
Thayne Harbaugh
7082d91379 Test exit status of salt-call
* Only install packages when user is 'root'
* Only remove packages when user is 'root'
* Only remove packages that were installed
2016-06-28 15:10:11 -06:00
Thayne Harbaugh
5a8c2fcd2c Test exit status of salt-syndic 2016-06-28 15:10:09 -06:00
Thayne Harbaugh
8a5f1aa1cf Test exit status of "salt" CLI 2016-06-28 15:10:09 -06:00
Thayne Harbaugh
f790075a51 Test exit status of salt-run 2016-06-28 15:10:08 -06:00
Thayne Harbaugh
1a6a10e8da Improvements to salt-minion integration tests:
* Ensure current user is used to start minions
* Better logging strategy
* Start up multiple minions for SysV init script test (had been previously disabled)
* Track pid files for all minions running
2016-07-28 12:12:47 -06:00
Thayne Harbaugh
c79fe3d83a Programs may require multiple config files.
* Change the .config attribute to .config_base and .configs as a dictionary of configs
* A config has multiple parts

  :name: the key in the .configs dictionary
  :path: the path where the config is written (when absent defaults to .config_dir and config name)
  :map:  the contents of the config (for salt programs this is a dictionary)

* Values can be substituted into the config contents using standard python string formatting labels
* Add a .config_attrs which maps object attributes into config space
* Directories for make_dirtree() can reference object attributes using leading '&'
2016-06-28 15:10:07 -06:00
Erik Johnson
20ed2c6bcf Remove repr formatting flag in places where it is used solely for quoting (#34183)
* salt/cloud/__init__.py: remove repr formatting

* salt/cloud/clouds/azurearm.py: remove repr formatting

* salt/cloud/clouds/ec2.py: remove repr formatting

* salt/cloud/clouds/profitbricks.py: remove repr formatting

* salt/loader.py: remove repr formatting

* salt/modules/win_file.py: remove repr formatting

* salt/modules/zypper.py: remove repr formatting

* salt/pillar/consul_pillar.py: remove repr formatting

* salt/renderers/pyobjects.py: remove repr formatting

* salt/returners/sentry_return.py: remove repr formatting

* salt/states/bower.py: remove repr formatting

* salt/states/cabal.py: remove repr formatting

* salt/states/cmd.py: remove repr formatting

* salt/states/composer.py: remove repr formatting

* salt/states/win_network.py: remove repr formatting

* salt/states/eselect.py: remove repr formatting

* salt/states/file.py: remove repr formatting

* salt/states/htpasswd.py: remove repr formatting

* salt/states/memcached.py: remove repr formatting

* salt/states/npm.py: remove repr formatting

* salt/states/pip_state.py: remove repr formatting

* salt/states/pkg.py: remove repr formatting

* salt/states/pkgrepo.py: remove repr formatting

* salt/states/supervisord.py: remove repr formatting

* salt/states/timezone.py: remove repr formatting

* salt/states/virtualenv_mod.py: remove repr formatting

* salt/states/dockerio.py: remove repr formatting

* salt/states/win_system.py: remove repr formatting

* salt/utils/nb_popen.py: remove repr formatting

* salt/utils/cloud.py: remove repr formatting

* Add pylint disable due to legit usage of repr flag

See https://github.com/saltstack/salt-pylint/pull/6

* Fix composer tests

These tests needed to be updated because quoting was changed in the
state module in 9dc9146. There was an unnecessary !r used for the
exception class there, which means that instead of the exception class
being passed through the formatter and coming out with the equivalent
value of err.__str__(), we get a repr'ed instance of the exception class
(i.e.  SaltException('',)) in the state output.

The unit test was asserting that we have that repr'ed instance of
SaltException in the output, a case of writing the test to confirm the
badly-conceived output in the state. This has also been corrected.

* salt/cloud/clouds/azurearm.py: lint fixes

* salt/modules/boto_s3_bucket.py: lint fixes

* salt/modules/minion.py: lint fixes

* salt/modules/reg.py: lint fixes

* salt/modules/testinframod.py: lint fixes

* salt/modules/win_iis.py: lint fixes

* salt/pillar/csvpillar.py: lint fixes

* salt/utils/win_functions.py: lint fixes

* salt/states/nxos.py: lint fixes

* salt/returners/mongo_future_return.py: lint fixes

* tests/integration/__init__.py: lint fixes

* tests/unit/context_test.py: lint fixes

* tests/integration/states/file.py: lint fixes

* tests/integration/utils/test_reactor.py: lint fixes

* tests/integration/utils/testprogram.py: lint fixes

* tests/unit/__init__.py: lint fixes

* tests/integration/shell/minion.py: lint fixes

* tests/unit/modules/boto_apigateway_test.py: lint fixes

* tests/unit/modules/boto_cognitoidentity_test.py: lint fixes

* tests/unit/modules/boto_elasticsearch_domain_test.py: lint fixes

* tests/unit/modules/k8s_test.py: lint fixes

* tests/unit/modules/reg_win_test.py: lint fixes

* tests/unit/states/boto_apigateway_test.py: lint fixes

* tests/unit/states/boto_cognitoidentity_test.py: lint fixes

* tests/unit/states/boto_elasticsearch_domain_test.py: lint fixes
2016-06-29 16:30:18 -04:00
Nicole Thomas
94e094652c Back-port #34324 to 2015.8 (#34344)
* Add test to match against custom grains

* Lint

* Forgot to add custom grain
2016-06-28 16:35:32 -04:00
Mike Place
e81bd6ee94 Test custom grains matcher (#34324)
* Add test to match against custom grains

* Lint

* Forgot to add custom grain
2016-06-28 12:17:14 -04:00