Commit Graph

1699 Commits

Author SHA1 Message Date
twangboy
d4b42540e3
Fix failing test when service doesn't exist 2018-06-04 18:09:12 -06:00
rallytime
7e1d278d19
Update old utils paths to use new utils paths 2018-06-01 15:00:46 -04:00
rallytime
3273bbdab7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/modules/all/index.rst
  - doc/topics/grains/index.rst
  - doc/topics/releases/2016.3.4.rst
  - doc/topics/spm/spm_formula.rst
  - doc/topics/tutorials/cron.rst
  - doc/topics/tutorials/index.rst
  - doc/topics/tutorials/stormpath.rst
  - salt/engines/slack.py
  - salt/log/handlers/fluent_mod.py
  - salt/modules/cyg.py
  - salt/modules/junos.py
  - salt/modules/namecheap_dns.py
  - salt/modules/namecheap_domains.py
  - salt/modules/namecheap_ns.py
  - salt/modules/namecheap_ssl.py
  - salt/modules/namecheap_users.py
  - salt/modules/reg.py
  - salt/modules/tomcat.py
  - salt/modules/vault.py
  - salt/modules/win_file.py
  - salt/modules/zpool.py
  - salt/output/highstate.py
  - salt/renderers/pass.py
  - salt/runners/cache.py
  - salt/states/boto_apigateway.py
  - salt/states/boto_iam.py
  - salt/states/boto_route53.py
  - salt/states/msteams.py
  - salt/states/reg.py
  - salt/states/win_iis.py
  - tests/integration/modules/test_cmdmod.py
  - tests/integration/states/test_user.py
  - tests/support/helpers.py
  - tests/unit/cloud/clouds/test_openstack.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/unit/modules/test_junos.py
  - tests/unit/pillar/test_git.py
  - tests/unit/states/test_win_path.py
  - tests/unit/test_pillar.py
  - tests/unit/utils/test_format_call.py
  - tests/unit/utils/test_utils.py
  - tests/unit/utils/test_warnings.py
2018-06-01 14:54:12 -04:00
Erik Johnson
93ee5ee2b0
Fix all Sphinx warnings
Well, all but one, which we expect to see
2018-05-31 15:28:25 -05:00
Nicole Thomas
8f78e3aef6
Merge pull request #47753 from Ch3LL/service_mac
Add stderr launchctl helper class and fix service mac tests
2018-05-31 14:16:57 -04:00
Ch3LL
e15e674955
Add stderr launchctl helper class and fix service mac tests 2018-05-30 15:30:24 -04:00
Frode Gundersen
38d114a2d2
add whoami test 2018-05-29 21:51:02 +00:00
rallytime
120ee16b70
Replace old utils paths with new utils paths 2018-05-29 11:19:34 -04:00
rallytime
dc32b67c03
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/win_snmp.py
  - tests/integration/modules/test_saltutil.py
  - tests/integration/states/test_pkg.py
  - tests/support/helpers.py
  - tests/support/runtests.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/whitelist.txt
2018-05-29 11:14:39 -04:00
Nicole Thomas
0bf651b470
Merge pull request #47846 from Ch3LL/p_refresh_test
Fix flaky refresh pillar integration test
2018-05-25 16:50:48 -04:00
Nicole Thomas
6f934c2259
Merge pull request #47823 from Ch3LL/win_dns_test
Add win_dns module integration tests for windows
2018-05-25 16:34:02 -04:00
Ch3LL
019edad8e4
Fix flaky refresh pillar integration test 2018-05-25 15:13:56 -04:00
Ch3LL
7848114d6a
Add win_dns module integration tests for windows 2018-05-24 14:11:27 -04:00
Nicole Thomas
0ca5224cbf
Merge branch '2017.7' into winuser 2018-05-24 12:08:35 -04:00
Ch3LL
2509d36888
Add windows to service disable ERROR check in tests 2018-05-24 08:30:17 -04:00
Daniel A Wozniak
6a6ab69722
Get the current username on windows 2018-05-23 16:16:32 -07:00
Nicole Thomas
2cb6634c6b
Merge pull request #47773 from frogunder/45011
add win_servermanager.list_available test
2018-05-23 15:44:13 -04:00
rallytime
c328450be2
Update old utils paths to new paths 2018-05-23 12:35:47 -04:00
rallytime
4abfd26e86
Merge branch '2017.7' into '2018.3'
Conflicts:
  - requirements/dev_python27.txt
  - requirements/dev_python34.txt
  - salt/fileclient.py
  - salt/output/__init__.py
  - salt/serializers/configparser.py
  - salt/states/pkg.py
  - salt/states/zpool.py
  - salt/transport/tcp.py
  - tests/integration/cloud/providers/test_ec2.py
  - tests/integration/modules/test_mac_user.py
  - tests/integration/modules/test_pip.py
  - tests/integration/modules/test_pkg.py
  - tests/integration/modules/test_service.py
  - tests/integration/states/test_pip_state.py
  - tests/integration/states/test_user.py
  - tests/unit/modules/test_cmdmod.py
2018-05-23 12:33:00 -04:00
Frode Gundersen
7c9b0bda33
add win_servermanager.list_available test 2018-05-22 14:43:11 +00:00
Nicole Thomas
f45a96ba1d
Merge pull request #47668 from Ch3LL/win_pkg_test
Add pkg.latest_version windows test
2018-05-21 16:26:44 -04:00
Nicole Thomas
b91c0f5647
Merge pull request #47680 from rallytime/merge-2018.3
[2018.3] Merge forward from 2018.3.1 to 2018.3
2018-05-17 17:30:27 -04:00
Gareth J. Greenaway
0fe32f4066
Updating integration/modules/test_archive to include filenames with unicode characters. 2018-05-17 09:20:38 -06:00
rallytime
6c06cb3ae3
Merge branch '2017.7.6' into '2017.7'
No conflicts.
2018-05-16 12:46:26 -04:00
rallytime
9b1773a763
Merge branch '2018.3.1' into '2018.3'
Conflicts:
  - tests/integration/states/test_pip_state.py
2018-05-16 12:43:41 -04:00
Ch3LL
a8981024de
Add pkg.latest_version windows test 2018-05-15 16:20:55 -04:00
Ch3LL
ba40d3d1a1
Update test_mac_user_enable_auto_login to test both py2 and py3 2018-05-15 14:40:54 -04:00
Ch3LL
0a732d8e66
query the pip path for test test_issue_2087_missing_pip 2018-05-15 13:17:54 -04:00
Ch3LL
6032a01f55
change disable check for upstart service on ubuntu14 2018-05-15 12:07:27 -04:00
Ch3LL
225d90ad4c
query the pip path for test test_issue_2087_missing_pip 2018-05-14 15:45:37 -04:00
Ch3LL
33b4cfbc5b
Change service assertion check for systemd platforms 2018-05-10 16:16:39 -04:00
Ch3LL
502c5bdff5
Ensure mac_service.disabled is correctly querying services 2018-05-09 17:12:50 -04:00
rallytime
25f03ae425
Merge branch '2017.7' into '2018.3'
Conflicts:
  - tests/integration/modules/test_status.py
  - tests/integration/states/test_pip_state.py
  - tests/support/case.py
  - tests/whitelist.txt
2018-05-09 11:24:02 -04:00
rallytime
5565d5e9b1
Update old utils paths with new utils paths 2018-05-07 13:36:47 -04:00
rallytime
786076ac03
Merge branch '2017.7' into '2018.3'
Conflicts:
  - pkg/windows/modules/get-settings.psm1
  - salt/modules/cmdmod.py
  - salt/modules/pip.py
  - salt/modules/win_lgpo.py
  - salt/states/pip_state.py
  - tests/integration/states/test_pip.py
  - tests/support/helpers.py
  - tests/unit/modules/test_pip.py
  - tests/whitelist.txt
2018-05-07 13:17:01 -04:00
Mike Place
068da8ad7d
Merge branch '2017.7' into skip_diskusage 2018-05-07 09:20:38 -05:00
Nicole Thomas
da9871d36b
Merge pull request #47196 from twangboy/fix_47024
Fix issues with pip
2018-05-04 10:23:03 -04:00
Nicole Thomas
fa293f8fac
Merge pull request #47435 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-05-04 09:05:32 -04:00
Daniel A. Wozniak
559ee1961f
Sysname returns text type 2018-05-03 09:16:21 -07:00
rallytime
fd98ee3dc1
Lint: Add missing blank line 2018-05-02 16:50:36 -04:00
rallytime
561718b20b
Update old is_windows utils path to new utils path 2018-05-02 15:04:53 -04:00
rallytime
a94cdf8a0d
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/daemons/flo/zero.py
  - salt/minion.py
  - salt/pillar/pillar_ldap.py
  - salt/transport/zeromq.py
  - salt/utils/async.py
  - salt/utils/zeromq.py
  - tests/integration/modules/test_service.py
  - tests/integration/netapi/rest_tornado/test_app.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/unit/modules/test_pip.py
2018-05-02 15:00:40 -04:00
Nicole Thomas
b14e974b5f
Merge pull request #47343 from Ch3LL/win_srv_test
Add additional service module integration tests and enable for windows
2018-05-02 09:39:45 -04:00
Shane Lee
f031710af2
Merge branch '2017.7' into fix_47024 2018-05-01 16:26:04 -06:00
Ch3LL
1a7ffb4e0d
return error if diskusage not available 2018-05-01 13:11:23 -04:00
Ch3LL
2173b6f549
ensure we are enabling/disabling before test 2018-05-01 11:53:55 -04:00
rallytime
46806e595b
Update test assertion comment for pip pkgs 2018-05-01 11:08:09 -04:00
Ch3LL
10bd63a976
Skip status.diskusage integration tests on macsox 2018-04-30 14:44:34 -04:00
twangboy
22ac81df63
Fix integration.modules.test_pip
Removes references to `no_chown`. It hasn't been in use since 2015.8
Removes usage of user in pip calls. The user is defined as the current
user which is the default anyway and it's causing tests not to run in
Windows because Windows requires a password
Removes the pwd import since it is no longer needed
2018-04-27 15:15:34 -06:00
rallytime
fefc0cc3ca
Update old utils paths to use new utils paths 2018-04-27 13:44:44 -04:00
rallytime
13e8124031
Merge branch '2017.7' into '2018.3'
Due to the many merge conflicts created from #47106 against the 2017.7 branch
and #46002 against the 2018.3 branch, the changes from #47106 have been largely
removed from this merge forward and the HEAD of 2018.3 was taken.

A separate fix for Tornado 5.0 support will need to be made directly against the
2018.3 branch.

Conflicts:
  - doc/topics/development/conventions/formulas.rst
  - salt/master.py
  - salt/minion.py
  - salt/netapi/rest_tornado/saltnado.py
  - salt/states/zfs.py
  - salt/transport/ipc.py
  - salt/transport/tcp.py
  - salt/transport/zeromq.py
  - salt/utils/async.py
  - tests/support/helpers.py
  - tests/support/parser/cover.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_ssh.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_safe_walk.py
2018-04-27 13:38:35 -04:00
Nicole Thomas
55534fb659
Merge pull request #47311 from Ch3LL/firewall_windows
Add firewall execution modules tests for windows
2018-04-27 09:10:53 -04:00
Ch3LL
d58be06751
Add additionatl service module integration tests and enable for windows 2018-04-26 18:13:20 -04:00
Nicole Thomas
a545e55543
Merge pull request #47281 from Ch3LL/system_test
Add win_system integration module tests
2018-04-26 12:07:40 -04:00
Nicole Thomas
b64d930df0
Merge pull request #47283 from Ch3LL/ntp_test
Add windows ntp integration module tests
2018-04-26 12:04:43 -04:00
Daniel A. Wozniak
d9442d043e
Skip tests not applicable to windows 2018-04-25 15:26:13 -07:00
Ch3LL
67beb1451c
Skip netstat test on macosx as its not supported 2018-04-25 16:44:28 -04:00
Ch3LL
4b2fc4ec66
Add windows firewall execution modules integration tests 2018-04-25 15:25:55 -04:00
Daniel A. Wozniak
0386216005
Fix sneaky indention 2018-04-25 09:39:58 -07:00
Daniel A. Wozniak
082b8d0b3d
Use salt.utils.platform 2018-04-25 08:36:32 -07:00
Daniel A. Wozniak
cc2538e08f
The grp modules is not available on windows 2018-04-25 00:23:20 -07:00
Daniel A. Wozniak
7d045eb235
Fix decorator wart 2018-04-24 19:09:08 -07:00
Daniel Wozniak
f591cff643
Merge pull request #47290 from dwoz/test_cp_fix
Run cache_master test in tmp dir
2018-04-24 16:37:20 -07:00
Daniel A. Wozniak
5ff51affbd
Run cache_master test in tmp dir 2018-04-24 14:58:20 -07:00
Ch3LL
ced7f86546
Add windows ntp integration module tests 2018-04-24 15:12:58 -04:00
Ch3LL
c9181a75a6
Add destructivetest decorator on tests 2018-04-24 14:44:15 -04:00
Ch3LL
0d0c8987fc
Add win_system integration module tests 2018-04-24 14:37:14 -04:00
Nicole Thomas
d4269c2b70
Merge pull request #47193 from Ch3LL/network_test
Add network module integration tests
2018-04-20 09:37:18 -04:00
rallytime
120c5446b7
Update old utils paths to new utils paths 2018-04-19 17:25:55 -04:00
Nicole Thomas
c777248a78
Merge pull request #47189 from Ch3LL/autoruns
Add autoruns.list integration test for Windows
2018-04-19 17:16:33 -04:00
rallytime
4718d31e53
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/config/__init__.py
  - salt/minion.py
  - salt/modules/pip.py
  - salt/states/pip_state.py
  - salt/states/virtualenv_mod.py
  - tests/integration/modules/test_status.py
2018-04-19 17:15:20 -04:00
Nicole Thomas
1947ffdf56
Merge pull request #47122 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-04-19 16:44:17 -04:00
Ch3LL
bbf9987c19
Add network module integration tests 2018-04-19 16:17:35 -04:00
Ch3LL
e9e4d4af70
Add autoruns.list integration test for Windows 2018-04-19 15:09:50 -04:00
Ch3LL
25a84428b8
Add status module integration modules tests for Windows 2018-04-19 12:01:40 -04:00
Erik Johnson
879c557264
Use decorators for temp files/dirs in test suite
This adds a new decorator which creates a temporary directory and cleans
it after the test completes. It also modifies an existing decorator for
creating temporary files so that it accepts arguments, which will be
passed through to salt.utils.files.mkstemp().
2018-04-18 19:46:29 -05:00
Ch3LL
e7c9bc4038
Add user integration tests for windows OS 2018-04-17 16:45:41 -04:00
rallytime
3416e398c6
Update old utils paths references to use new paths 2018-04-17 11:02:38 -04:00
rallytime
94c2a12be6
Merge branch '2017.7' into '2018.3'
Conflicts:
  - tests/integration/modules/test_state.py
  - tests/unit/templates/test_jinja.py
  - tests/unit/test_minion.py
2018-04-17 10:54:42 -04:00
Daniel A. Wozniak
444da3f893
Fix py3 wart (chr vs bytesstring) 2018-04-14 17:39:29 -07:00
Daniel A Wozniak
e8acca01c2
Fix failing state test by normalizing line endings
Fixes:

integration.modules.test_state.StateModuleTest.test_issue_1896_file_append_source
2018-04-14 15:45:11 -07:00
rallytime
590c7fc13f
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/state.py
  - salt/utils/files.py
  - tests/integration/modules/test_pip.py
2018-04-11 12:41:22 -04:00
Daniel Wallace
791af8f6ce
switch pip test package
Using irc3-plugins-test, since this should never be updated (i manage it and it
is fulfilling its only job).
2018-04-10 14:09:20 -05:00
Gareth J. Greenaway
0891c6b580
fixing docstring 2018-04-06 13:19:10 -07:00
Gareth J. Greenaway
c8945e4b2e
cleaning up some imports. 2018-04-06 13:19:10 -07:00
Gareth J. Greenaway
0599759e5b
cleaning up some test doc strings. 2018-04-06 13:19:10 -07:00
Gareth J. Greenaway
dceda5eb88
Moving all jinja filter tests into support/jinja_filters.py. Updaitng integration/ssh/test_jinja_filters.py to use those tests. Adding integration/modules/test_state_jinja_filters.py to also use the common jinja filter tests. 2018-04-06 13:19:10 -07:00
rallytime
0a297e7319
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/grains/core.py
  - salt/utils/__init__.py
2018-04-05 13:43:51 -04:00
Mike Place
4e5e291c99
Merge pull request #46873 from terminalmage/utf8-first
Attempt UTF-8 first when decoding/encoding
2018-04-05 09:16:27 -05:00
Nicole Thomas
f70f6de282
Merge pull request #46647 from twangboy/win_fix_test_grains
Fix the tear down function in integration.modules.test_grains
2018-04-04 17:14:05 -04:00
Erik Johnson
f59cee28db
Remove hacky workarounds to get encode/decode tests to pass on Windows 2018-04-04 13:18:04 -05:00
rallytime
a0fcd5c053
Fix test_cp failure: forgot to add tgt to test when @with_tempfile is present 2018-04-04 11:43:03 -04:00
rallytime
d0202cab72
Resolve bad merge: there should only be one test_get_file_from_env_in_url test 2018-04-03 16:19:12 -04:00
Gareth J. Greenaway
13875e78cf
Fixing documention string for test. 2018-04-03 12:37:49 -07:00
Gareth J. Greenaway
3d288c44d4
Fixing test documentation 2018-04-03 12:37:49 -07:00
Gareth J. Greenaway
6cff02ef6a
Adding tests for #46788 2018-04-03 12:37:49 -07:00
rallytime
4ad50bbdee
Update old utils paths to new paths 2018-04-03 14:46:56 -04:00
rallytime
893196d3e6
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/conf.py
  - salt/loader.py
  - salt/modules/dockermod.py
  - salt/modules/sensehat.py
  - salt/utils/parsers.py
  - tests/integration/cloud/providers/test_ec2.py
  - tests/integration/modules/test_cp.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/spm/test_man_spm.py
  - tests/integration/states/test_npm.py
  - tests/unit/states/test_environ.py
2018-04-03 14:33:11 -04:00
rallytime
209a8029c3
Fix the new test failures from the mantest changes
The changes in #46778 introduced a couple of test failures into the 2017.7 branch.

This PR cleans up some of the references causing failures on 3 new test failures.
The failures are due to the new reference of the `mantest` module, which is only
used for testing here, and not an actual module in salt to test docs and the
saltutil module against.
2018-04-02 16:06:50 -04:00
Erik Johnson
f8f9d045ac
Add regression test 2018-03-30 13:12:02 -05:00
Mike Place
e533b7182d
Merge pull request #46766 from twangboy/win_fix_test_git
Change the way we're cleaning up after some tests
2018-03-30 12:01:02 -06:00
twangboy
5afc66452c
Remove unused/redundant imports 2018-03-28 12:30:26 -06:00
twangboy
88fd72c52c
Use with_tempfile decorator where possible 2018-03-28 11:38:32 -06:00
rallytime
e312efb5e7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/man/salt-api.1
  - doc/man/salt-call.1
  - doc/man/salt-cloud.1
  - doc/man/salt-cp.1
  - doc/man/salt-key.1
  - doc/man/salt-master.1
  - doc/man/salt-minion.1
  - doc/man/salt-proxy.1
  - doc/man/salt-run.1
  - doc/man/salt-ssh.1
  - doc/man/salt-syndic.1
  - doc/man/salt-unity.1
  - doc/man/salt.1
  - doc/man/salt.7
  - doc/man/spm.1
  - salt/modules/cmdmod.py
  - salt/modules/pillar.py
  - salt/modules/yumpkg.py
  - salt/state.py
  - salt/utils/pkg/rpm.py
  - salt/utils/schedule.py
  - tests/integration/states/test_npm.py
  - tests/integration/states/test_pkgrepo.py
2018-03-27 16:31:55 -04:00
rallytime
00d4eb26f3
Merge branch '2018.3.0rc1' into '2018.3'
Conflicts:
  - pkg/windows/req.txt
2018-03-27 11:41:56 -04:00
Nicole Thomas
c67afbeb36
Merge pull request #46650 from Ch3LL/nacl_test
Mirror libnacl imports in test from the nacl module
2018-03-26 10:48:39 -04:00
Gareth J. Greenaway
e721168dc4
removing salt.utils.stringutils.to_unicode from output/highstate.py and adding encoding=utf-8 to events payloads. 2018-03-23 19:09:20 -07:00
Ch3LL
7cda825e90
Add groupadd module integration tests for Windows 2018-03-23 13:30:22 -04:00
Ch3LL
f11d58a8e9
Mirror libnacl imports in test from the nacl module 2018-03-21 15:10:46 -04:00
twangboy
c179388b0e
Fix the tear down function in integration.modules.test_grains.GrainsAppendTestCase
Fix the tear down function to just set the grain to an empty list instead of
removing each individual item
2018-03-21 16:37:10 +00: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
Gareth J. Greenaway
152c43c843
Accounting for a case when multiple onfails are used along with requires. Previously if you have multiple states using 'onfail' and two of those states using a 'require' against the first one state, the last two will run even if the 'onfail' isn't met because the 'require' is met because the first state returns true even though it didn't excute. This change adds an additional hidden variable that is used when checking requisities to determine if the state actually ran. 2018-03-15 17:45:42 -07:00
rallytime
8d1e1e7f94
Merge branch '2017.7' into '2018.3'
Conflicts:
  - .kitchen.yml
  - Gemfile
  - pkg/windows/build_env_2.ps1
  - pkg/windows/build_env_3.ps1
  - pkg/windows/req.txt
  - salt/client/ssh/__init__.py
  - salt/client/ssh/ssh_py_shim.py
  - salt/modules/boto_vpc.py
  - salt/modules/file.py
  - salt/modules/heat.py
  - salt/modules/smartos_vmadm.py
  - salt/modules/win_dsc.py
  - salt/returners/elasticsearch_return.py
  - salt/runners/salt.py
  - salt/states/module.py
  - salt/utils/win_functions.py
  - setup.py
  - tests/integration/modules/test_state.py
  - tests/unit/grains/test_core.py
  - tests/unit/test_pillar.py
2018-03-15 17:22:05 -04:00
Erik Johnson
010d260d06
Rewrite failing Suse pkg integration test
This makes the test less brittle by hard-coding which package to use
2018-03-14 23:35:25 -05:00
rallytime
aa760334a1
Merge branch '2018.3.0rc1' into '2018.3'
No conflicts.
2018-03-13 10:58:28 -04:00
Nicole Thomas
22d753364b
Merge pull request #46337 from gtmanfred/2017.7
Fix using names with listen and listen_in
2018-03-12 14:49:59 -04:00
Gareth J. Greenaway
ab02ffd4ae
Swapping out import-error for unused-import. 2018-03-09 07:13:27 -08:00
Gareth J. Greenaway
e6c9740a7d
Gating nacl tests to ensure libnacl is installed. 2018-03-08 10:06:58 -08:00
Gareth J. Greenaway
4ae2861d68
Fixing a few bugs introducted following the move to unicode all the things. Adding deprecation notices for the previously used key and key_file arguments. Adding deprecation into Release notes. Adding some tests for Naccl module and runner to test encryption and decryption. 2018-03-08 10:06:55 -08:00
Daniel Wallace
3620611b5b
fix unhold package for debian 2018-03-06 14:54:40 -07:00
Nicole Thomas
82cb2ea5a0
Merge pull request #46174 from twangboy/win_fix_test_git_2
Fix a unicode issue with the git module on Windows
2018-03-06 13:53:53 -05:00
Daniel Wallace
d6d9e36359
add tests for names and listen/listen_in
Closes #30115
2018-03-05 12:15:23 -07:00
rallytime
7243baf2c0
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/topics/orchestrate/orchestrate_runner.rst
  - salt/grains/core.py
  - salt/modules/git.py
  - salt/pillar/ec2_pillar.py
  - salt/runner.py
  - salt/utils/ssh.py
  - tests/integration/modules/test_cp.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_file.py
  - tests/unit/modules/test_git.py
2018-02-27 17:13:28 -05:00
Erik Johnson
13abc175e1
Fix hanging tests in integration suite
A recent change to nginx appears to be causing this test to fail to
cache the test file in the temp nginx instance we've spun up. This
causes the return of cp.cache_file to be False, which in and of itself
should be enough to fail the test. But since we're not asserting on the
cp.cache_file results, flow proceeds to the next block of code, in which
we open the "file" that we cached. Some genius thought it would be a
swell idea to make io.open() successfully open a filehandle when the
path passed to it is a boolean False. When you try to read from this
filehandle, an AMAZING thing happens... It just blocks. Forever. I know,
right? Pure genius.

This commit adds an assert so that the test fails gracefully and doesn't
try to read from a bogus filehandle that SHOULDN'T EVEN EXIST.
2018-02-27 14:58:36 -05:00
Erik Johnson
0eb012659c
Fix hanging tests in integration suite
A recent change to nginx appears to be causing this test to fail to
cache the test file in the temp nginx instance we've spun up. This
causes the return of cp.cache_file to be False, which in and of itself
should be enough to fail the test. But since we're not asserting on the
cp.cache_file results, flow proceeds to the next block of code, in which
we open the "file" that we cached. Some genius thought it would be a
swell idea to make io.open() successfully open a filehandle when the
path passed to it is a boolean False. When you try to read from this
filehandle, an AMAZING thing happens... It just blocks. Forever. I know,
right? Pure genius.

This commit adds an assert so that the test fails gracefully and doesn't
try to read from a bogus filehandle that SHOULDN'T EVEN EXIST.
2018-02-27 13:32:57 -06:00
rallytime
776f2ea5d7
Merge branch '2018.3.0rc1' into '2018.3'
Conflicts:
  - salt/pillar/file_tree.py
  - tests/unit/modules/test_yumpkg.py
2018-02-26 11:01:42 -05:00
Daniel Wallace
667b5b9f0c
fix unicode for mac autologin test 2018-02-23 17:00:56 -07:00
twangboy
661a0687ec
Fix git utf-8 issues for Windows
Adds the `output_encoding` option to all the functions
Defaults to `utf-8` for Windows
Fixes some utf-8 issues in the test
2018-02-23 14:49:13 -07:00
rallytime
d6c2d0693a
Merge branch 'oxygen.rc1' into 'oxygen'
No conflicts.
2018-02-13 10:54:25 -05:00
rallytime
d80547e0b8
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/fileclient.py
  - salt/grains/disks.py
  - salt/modules/cmdmod.py
  - salt/state.py
  - salt/states/file.py
  - salt/utils/gitfs.py
  - salt/utils/win_functions.py
  - tests/integration/modules/test_state.py
  - tests/unit/cache/test_localfs.py
2018-02-08 11:23:31 -05:00
Erik Johnson
6cef37f310
2 unicode-compatibility fixes for cmdmod.py
First, `shlex.split()` will raise an exception when passed a unicode
type with unicode characters in the string. This modifies our
`shlex.split()` helper to first convert the passed string to a `str`
type, and then return a decoded copy of the result of the split.

Second, this uses our `to_unicode` helper to more gracefully decode the
stdout and stderr from the command. Unit tests have been added to
confirm that the output is properly decoded, including instances where
decoding fails because the return from the command contains binary data.
2018-02-07 02:01:55 -06:00
Nicole Thomas
7d5cf806f9
Merge pull request #45772 from terminalmage/decode-all-the-things
Decode payloads on Python 2 to preserve unicode in jobs and fileclient reqs
2018-02-01 16:06:50 -05:00
Erik Johnson
99de368afa
PY2: Fix system.set_computer_desc and set_computer_desc when desc is unicode
Both string_escape and unicode_escape don't like unicode content. This
scraps the escape encoding and simply does a series of string
replacements to disabmibguate quotes, newlines, and tab characters.
2018-02-01 10:30:12 -06:00
Gareth J. Greenaway
a4bb5be02f
pkg.upgrade does not return errors when something when wrong but raises an exception, so this code is no longer relevant. 2018-01-29 13:27:30 -08:00
Erik Johnson
293bdf2517
Merge pull request #45726 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-28 13:05:00 -06:00
Erik Johnson
227fcbf794
Fix groupadd tests for Arch Linux
The default /etc/login.defs does not have a value assigned to MOTD_FILE,
which causes a traceback in 2 of the tests.
2018-01-27 17:02:23 -06:00
rallytime
0ea728bd06
Update old utils paths to new paths 2018-01-26 17:34:29 -05:00
rallytime
0ad101d560
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - doc/man/salt.7
  - salt/modules/git.py
  - salt/modules/pacman.py
  - salt/states/git.py
  - tests/integration/modules/test_mac_user.py
  - tests/support/parser/__init__.py
2018-01-26 17:27:03 -05:00
Gareth J. Greenaway
359265869f
Adding a couple tests to ensure that duration is included in state run results even when states do not run. 2018-01-26 12:06:29 -08:00
Erik Johnson
fa37509d1f
Fix several shadow tests for PY3
The recent unicode_literals changes broke PY3 when generating a password
using random bytes from pycryto/Cryptodome, this catches the failure to
decode and skips until we get a decodable byte.
2018-01-26 11:19:15 -06:00
Gareth J. Greenaway
b3c1be27fb
Tier two unicode updates for modules, states and related tests. 2018-01-25 11:59:25 -08:00
Nicole Thomas
2a562243b6
Merge pull request #45541 from terminalmage/py3-tier1
[PY3] Add unicode_literals to high-priority modules/states
2018-01-24 16:54:24 -05:00
Nicole Thomas
66a38a1c61
Merge pull request #45601 from DSRCorporation/bugs/unicode_3
Salt Unicode Update 3rd tier 3rd bunch from DK
2018-01-24 16:32:29 -05:00
rallytime
9f78e53d4b
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-24 16:09:17 -05:00
Erik Johnson
9c86cd627a
[PY3] Add unicode_literals to high-priority modules/states 2018-01-24 10:33:58 -06:00
Erik Johnson
4a6ab729dd
Fix failing pkg integration tests for releases with no '.'
Fedora releases are integers, and Arch's osrelease is simply `rolling`,
so https://github.com/saltstack/salt/pull/45636 caused these tests to
regress. This fixes them by moving the osrelease check until after the
MacOS check.

It also fixes the windows check, which would _always_ evaluate to `True`
since it was not calling the function. Therefore, the `if` would just be
a simple boolean which would resolve to `True` since it was just checking
a function reference.
2018-01-24 10:13:22 -06:00
Nicole Thomas
fa373e658e
Merge pull request #45476 from rallytime/unicode-h
Add unicode_literals to modules, states, tests (H)
2018-01-24 09:15:40 -05:00
Nicole Thomas
d5cedf6d81
Merge pull request #45560 from rallytime/unicode-changes-1
Add unicode_literals to modules, states, and related tests
2018-01-24 09:13:58 -05:00
Nicole Thomas
a5abe5be68
Merge pull request #45594 from garethgreenaway/tier_three_unicode_modules_state_updates
[oxygen] Tier three Unicode modules state updates
2018-01-24 09:12:01 -05:00
Nicole Thomas
189c133ebc
Merge branch 'oxygen' into bugs/unicode_3 2018-01-24 09:11:23 -05:00
Nicole Thomas
4423989ac8
Merge pull request #45587 from DSRCorporation/bugs/unicode_2
Salt Unicode Update 3rd tier 2nd bunch from DK
2018-01-23 17:08:59 -05:00
Nicole Thomas
4a116beba6
Merge pull request #45639 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-23 17:03:26 -05:00
Nicole Thomas
e5c9cd91e8
Merge pull request #45619 from garethgreenaway/2017_7_test_mac_user_enable_auto_login
[2017.7] Fixing test_mac_user_enable_auto_login
2018-01-23 16:56:03 -05:00
rallytime
c08c67f3d4
Add unicode_literals to modules, states, and related tests 2018-01-23 15:26:25 -05:00
Gareth J. Greenaway
49d0d1f1a5
Updating various modules, states and related tests for Unicode fun & profit part one. 2018-01-23 11:53:16 -08:00
Nicole Thomas
0931b6417d
Merge pull request #45636 from Ch3LL/mac-tests
Fix mac service and pkg tests for 10.13
2018-01-23 13:44:55 -05:00
rallytime
583a89ca6f
Update old utils paths to new paths 2018-01-23 13:34:24 -05:00
rallytime
3c298afa72
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/modules/pip.py
  - salt/modules/reg.py
  - salt/modules/win_pkg.py
  - salt/runners/manage.py
  - salt/states/pkg.py
  - salt/transport/zeromq.py
  - salt/utils/event.py
  - tests/integration/modules/test_pip.py
  - tests/integration/states/test_user.py
  - tests/unit/grains/test_core.py
  - tests/unit/states/test_archive.py
  - tests/unit/utils/test_boto.py
2018-01-23 13:26:43 -05:00
Ch3LL
df0ad54c9a
remove unnecessary variable for test 2018-01-23 11:47:32 -05:00
Ch3LL
acb14fd43d
fix pylint 2018-01-23 11:42:49 -05:00
Ch3LL
a9b12cd1ea
Fix mac service and pkg tests for 10.13 2018-01-23 11:39:06 -05:00
rallytime
10b7b0601d
Add unicode_literals to more modules, states, and tests 2018-01-23 10:08:59 -05:00
rallytime
a35cf9ca1e
Add unicode_literals to modules, states, tests (H) 2018-01-23 09:55:46 -05:00
Nicole Thomas
9facc5ede5
Merge pull request #45543 from terminalmage/py3-tier1-2
[PY3] Add unicode_literals to more high-priority states/modules
2018-01-23 09:38:21 -05:00
Nicole Thomas
a8dabbc150
Merge branch 'oxygen' into bugs/unicode_2 2018-01-23 07:56:21 -05:00
Nicole Thomas
ff997aa552
Merge pull request #45592 from rallytime/unicode-changes-5
Add unicode_literals to modules, states, and tests [n]
2018-01-23 07:50:46 -05:00
Gareth J. Greenaway
f5f03e1e6c
Fixing integration.modules.test_mac_user.MacUserModuleTest.test_mac_user_disable_auto_login 2018-01-22 14:10:23 -08:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-22 11:55:54 -05:00
rallytime
8d54b95d8c
Add unicode_literals to modules, states, and tests [n] 2018-01-22 09:42:15 -05:00
rallytime
2e8b86a944
Add more unicode_literals to modules, states, and test files 2018-01-22 09:32:29 -05:00
Erik Johnson
06ec8db7e2
[PY3] Add unicode_literals to more high-priority states/modules 2018-01-22 08:26:28 -06:00
Dmitry Kuzmenko
9b09d1b2c9
Salt Unicode Update 3rd tier 3rd bunch from DK 2018-01-22 14:38:49 +03:00
Dmitry Kuzmenko
3ee328a28c
Salt Unicode Update 2018-01-22 14:38:24 +03:00
Erik Johnson
9df3dab883
[PY3] Add unicode_literals to pkg/pkgrepo states/modules 2018-01-20 22:21:41 -06: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
e0ffa32b49
Merge branch '2016.11' into '2017.7'
Conflicts:
  - tests/integration/modules/test_pkg.py
2018-01-19 10:09:36 -05:00
Daniel Wallace
f4b6367cf9
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-18 14:54:54 -07:00
Daniel Wallace
5455d2dee6
fix centos 6 pip test
flake8 is having problems installing on python2.6, switching to different
module that still works easily on python 2.6
2018-01-17 22:41:06 -07:00
Daniel Wallace
40255194b0
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-17 21:35:41 -07:00
Erik Johnson
4ca7931655
[PY3] Update modules/states for PY3/Unicode compatibility (B)
This includes all the boto modules
2018-01-17 17:06:07 -06:00
Nicole Thomas
de080983e3
Merge pull request #44822 from frogunder/pkg_latestversion
add pkg_latest_version test
2018-01-16 09:16:53 -05:00
Nicole Thomas
b90e7aedde
Merge pull request #45440 from terminalmage/py3-a
[PY3] Add unicode_literals to states/modules (A)
2018-01-14 07:52:02 -05:00
Nicole Thomas
4d03162227
Merge pull request #45396 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-14 07:44:37 -05:00
Erik Johnson
ce6fccde9c
[PY3] Add unicode_literals to states/modules (A) 2018-01-14 01:31:52 -06:00
Erik Johnson
1044b627a1
[PY3] Add unicode_literals to salt.utils modules (A-D) 2018-01-13 16:08:56 -06:00
rallytime
bbe6f54f84
Update old utils paths to new paths 2018-01-12 12:27:08 -05:00
rallytime
60370f5fb6
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/config/__init__.py
  - salt/daemons/masterapi.py
  - salt/proxy/dummy.py
  - salt/states/file.py
  - tests/integration/modules/test_state.py
  - tests/integration/runners/test_runner_returns.py
  - tests/integration/ssh/test_state.py
  - tests/support/parser/__init__.py
  - tests/unit/grains/test_core.py
  - tests/unit/states/test_file.py
2018-01-11 16:00:08 -05:00
twangboy
0356b3d56f
Backport changes from #45308 2018-01-11 15:36:38 -05:00
Nicole Thomas
2340f0b487
Merge pull request #45380 from twangboy/backport_45308
Backport changes from #45308
2018-01-11 14:45:20 -05:00
Frode Gundersen
08644e02a0
skip if mac 2018-01-11 19:12:31 +00:00
twangboy
419be8a9b5
Backport changes from #45308 2018-01-10 11:16:59 -07:00
Erik Johnson
8bc17e0d7a
Fix integration.modules.test_state.StateModuleTest.test_exclude
test_exclude shares file paths with test_include, and while I can't
reproduce the failures, it is likely that improperly cleaned-up files
from test_include are causing the failures in test_exclude. This is
backed up by the fact that the state.sls return data from the
salt-runtests.log shows no trace of the "to-include-test" file
(suggesting it was excluded as expected), yet os.path.isfile() returns
True for this path, causing the test to fail.

This commit uses a distinct base dir for both tests, which should keep
this sort of failure from happening.
2018-01-10 10:29:15 -05:00
twangboy
53506a5e86
Fix some additional tests
- Fix problem with invalid characters in requisites.prereq_simple2
- Fix problem with true/false commands in Windows. Need to use exit
- Fix some issues with hard-coded paths to /tmp
2018-01-09 16:50:29 -07:00
twangboy
db52f086e3
Fix some tests in integration.modules.test_state
Fixes the following tests:
- test_get_file_from_env_in_top_match
- test_issue_1896_file_append_source
- test_state_sls_id_test

Fixes in issue in file.managed where a command execution error was being
raised if the target file did not exist.
2018-01-09 15:21:58 -07:00
rallytime
59076f5ee8
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/client/ssh/wrapper/state.py
  - salt/modules/yumpkg.py
2018-01-04 17:45:29 -05:00
Ch3LL
74e6ed60ea
Fix MacOSX Service Status Check and integration test 2018-01-03 17:19:51 -05:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
rallytime
da1e33abea
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - pkg/windows/req_base.txt
  - salt/engines/slack.py
  - salt/modules/cmdmod.py
  - salt/modules/osquery.py
  - salt/modules/pip.py
  - salt/modules/win_pkg.py
  - salt/states/pip_state.py
  - tests/integration/modules/test_cmdmod.py
2017-12-30 08:44:11 -05:00
Erik Johnson
4bf072435d
Fix integration.modules.test_state.StateModuleTest.test_exclude
test_exclude shares file paths with test_include, and while I can't
reproduce the failures, it is likely that improperly cleaned-up files
from test_include are causing the failures in test_exclude. This is
backed up by the fact that the state.sls return data from the
salt-runtests.log shows no trace of the "to-include-test" file
(suggesting it was excluded as expected), yet os.path.isfile() returns
True for this path, causing the test to fail.

This commit uses a distinct base dir for both tests, which should keep
this sort of failure from happening.
2017-12-24 12:08:57 -06:00
Gareth J. Greenaway
48eafe3206
Adding some tests to tests cmd.script with cwd 2017-12-21 15:53:38 -08:00