Commit Graph

11109 Commits

Author SHA1 Message Date
Daniel A. Wozniak
444da3f893
Fix py3 wart (chr vs bytesstring) 2018-04-14 17:39:29 -07:00
Daniel A. Wozniak
46fa2c04de
Fix py3 os.linesep wart 2018-04-14 17:09:50 -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
Daniel Wozniak
7fddad6cd9
Merge pull request #47064 from dwoz/roots_tests_fix
Fix fileserver roots tests
2018-04-14 14:30:22 -07:00
Mike Place
977c6939c4
Merge pull request #47069 from cachedout/match_timeout_arg
Pass the timeout variable to the CLI when calling salt in tests
2018-04-14 09:20:25 -06:00
Mike Place
b8990f5258
Pass the timeout variable to the CLI when calling salt in tests 2018-04-13 16:37:01 -06:00
Nicole Thomas
c484c0bd71
Merge pull request #47055 from bloomberg/GH-47000
#47000 - add proper handling of full_return in cmd_subset
2018-04-13 16:17:09 -04:00
Daniel A. Wozniak
3c565d7e54
Use salt.utils.fopen 2018-04-13 13:14:19 -07:00
Mike Place
7db5625632
Catch an operation on a closed socket in a test
This failure wouldn't be related to the test in question so it should
be safe to ignore.
2018-04-13 13:54:18 -06:00
Daniel A. Wozniak
25fd7c0694
fix py3 wart, encode os.linesep 2018-04-13 12:33:23 -07:00
Daniel A. Wozniak
aa965310f1
Clean up cruft 2018-04-13 10:27:17 -07:00
Daniel A Wozniak
efc9866580
Jinja test fixes 2018-04-13 10:23:34 -07:00
Daniel A Wozniak
d79f1a1961
Fix fileserver roots tests 2018-04-13 10:15:13 -07:00
Matt Phillips
8af3f5b874 GH-47000: add proper handling of full_return in cmd_subset
as noted in the original issue, full_return wasnt being handled properly. This
rectifies that.
2018-04-13 10:58:03 -04:00
twangboy
6635b9003f
Fix winrm powershell script
Removes the `Hostname` paramater in the winrm create command. It is not
needed. It must match the hostname on the certificate, which is not
defined in the case of the Remote Desktop certificate
Removes extra spaces
2018-04-12 14:41:19 -06:00
Daniel Wallace
385fe2bc1e
Merge pull request #47020 from rallytime/bp-46970
Back-port #46970 to 2017.7
2018-04-11 16:48:24 -05:00
Gareth J. Greenaway
9373dff52b
Update test_pkgrepo.py 2018-04-11 10:55:36 -04:00
Gareth J. Greenaway
13cf9eb5b1
Removing debugging. 2018-04-11 10:55:36 -04:00
Gareth J. Greenaway
a61a8593e5
Removing suse from pkgrepo comments tests. the pkgrepo functions in SUSE pkg module do not support comments. 2018-04-11 10:55:36 -04:00
Nicole Thomas
8f994e7cf9
Merge pull request #46539 from jfoboss/patch-1
#46504 Fix
2018-04-11 10:13:23 -04:00
Nicole Thomas
74d70e95a5
Merge pull request #46999 from gtmanfred/2017.7
switch pip test package
2018-04-10 17:18:32 -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
twangboy
19c3fadbe5
Fix unit test for win_ntp 2018-04-10 12:12:17 -06:00
Mike Place
0ac0b3ca29
Merge branch '2017.7' into parallel-orch 2018-04-10 11:31:58 -06:00
Nicole Thomas
39d65a39cf
Merge pull request #46613 from myinitialsarepm/fix_puppet.fact_and_puppet.facts
Fix puppet.fact and puppet.facts to use stdout.
2018-04-10 11:18:07 -04:00
Nicole Thomas
00c4067585
Merge pull request #46975 from gtmanfred/windows
Make windows work for test runs in jenkinsci
2018-04-10 09:41:17 -04:00
Peter Morris
44ecd13abc Update tests to use cmd.run_all 2018-04-10 01:11:03 +01:00
Matt Phillips
a9866c7a03 fix parallel mode py3 compatibility
parallel: True codepath incompatibilities uncovered by the added tests.
additionally use salt.serializers.msgpack to avoid other py2/py3/back compat
issues.
2018-04-05 22:30:59 -04:00
Matt Phillips
6d7730864a removing prereq from test orch
seems to be encountering unrelated preexisting failures in the functionality
unrelated to my changes.
2018-04-05 11:45:25 -04:00
Matt Phillips
6c8a25778f add integration test to runners/test_state to exercise parallel
this should hopefully exercise a few different facets of parallel that were
previously not covered in the code base.
2018-04-05 11:45:25 -04:00
Nicole Thomas
d0f5b43753
Merge pull request #44926 from frogunder/whitelisted_acl
whitelist_acl_test
2018-04-05 11:09:25 -04:00
Mike Place
7d822f9cec
Merge pull request #46464 from gtmanfred/orchestration
fix salt subset in orchestrator
2018-04-05 09:52:00 -05:00
Nicole Thomas
18e460fc30
Merge branch '2017.7' into whitelisted_acl 2018-04-04 17:28:40 -04:00
Daniel A. Wozniak
dc54fc53c3
Fix multiple typos causing tests to fail 2018-04-04 14:20:51 -07: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
Daniel Wallace
637cdc6b7b
fix pylint 2018-04-04 14:37:04 -05:00
Daniel Wallace
2edd5eaf9e
fix path 2018-04-04 13:37:39 -05:00
Daniel Wallace
4a3ed6607d
add test for subset in orchestration 2018-04-03 15:13:00 -05: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
Daniel Wallace
bff61dd291
use http registry for npm
Older versions of npm can't validate the newer certificate.

We don't really need to worry about this, and it would be better to just make
sure the tests run correctly that to use https for the tests.
2018-04-03 09:44:48 -05:00
Nicole Thomas
ebf5dd276f
Merge pull request #46783 from twangboy/fix_46680
Fix network.managed test=True on Windows
2018-04-03 08:54:55 -04:00
Nicole Thomas
f652f25cc1
Merge pull request #46821 from rallytime/fix-mantest-failures
Fix the new test failures from the mantest changes
2018-04-03 08:40:50 -04:00
Nicole Thomas
df26f2641e
Merge pull request #46675 from dwoz/inspectlib-tests
Skip test when git symlinks are not configured
2018-04-03 08:19:18 -04:00
twangboy
da5ce25ef3
Fix unit tests on Linux 2018-04-02 19:59:13 -06: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
Nicole Thomas
3bac9717f4
Merge pull request #46769 from dwoz/wincloudtest
Adding windows minion tests for salt cloud
2018-04-02 14:51:48 -04: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
Mike Place
69d450db84
Merge pull request #46778 from terminalmage/salt-jenkins-906
Replace flaky SPM man test
2018-03-30 11:55:13 -06:00
Daniel A. Wozniak
d39f4852d8
Handle non-zero status exception 2018-03-29 14:39:40 -07:00
Daniel A. Wozniak
83c005802b
Handle cases where git can not be found
Signed-off-by: Daniel A. Wozniak <dwozniak@saltstack.com>
2018-03-29 14:39:29 -07:00
Daniel A. Wozniak
eabc234e5d
Fix config override name 2018-03-29 13:41:06 -07:00
Nicole Thomas
395b7f8fdc
Merge pull request #46655 from dwoz/pyobjects-46350
Fixing cleanUp method to restore environment
2018-03-29 14:31:47 -04:00
Nicole Thomas
af45c49c42
Merge pull request #46632 from dwoz/file-recurse-36802
Fix file.recurse w/ clean=True #36802
2018-03-29 14:30:41 -04:00
Erik Johnson
bbfd35d3ea
Replace flaky SPM man test
This replaces a test that has been intermittently failing, and also
expands it to check for _all_ man pages.
2018-03-29 12:19:41 -05:00
Daniel A. Wozniak
5c22a0f88d
Use aboslute imports 2018-03-28 22:32:30 -07:00
Daniel A. Wozniak
44db77ae79
Fix lint errors and typo 2018-03-28 21:06:34 -07:00
Daniel A. Wozniak
5aabd442f2
Fix up import and docstring syntax 2018-03-28 20:54:35 -07:00
Daniel A. Wozniak
810042710d
Set default cloud test timeout back to 500 seconds 2018-03-28 20:39:03 -07:00
Daniel A. Wozniak
5ac89ad307
Use winrm_verify_ssl option causing tests to pass 2018-03-28 20:21:40 -07:00
Daniel A. Wozniak
ba5f11476c
Adding windows minion tests for salt cloud 2018-03-28 15:16:54 -07:00
twangboy
5afc66452c
Remove unused/redundant imports 2018-03-28 12:30:26 -06:00
Nicole Thomas
d3623e0815
Merge pull request #46691 from Ch3LL/win_group_test
Add groupadd module integration tests for Windows
2018-03-28 14:01:45 -04:00
Nicole Thomas
14ab50d3f4
Merge pull request #46696 from dwoz/win_test_client
Windows `unit.test_client` fixes
2018-03-28 13:55:46 -04:00
twangboy
88fd72c52c
Use with_tempfile decorator where possible 2018-03-28 11:38:32 -06:00
Nicole Thomas
bd1e8bcc7d
Merge pull request #46734 from terminalmage/busybox
Make busybox image builder work with newer busybox releases
2018-03-27 17:14:28 -04:00
Nicole Thomas
c09c6f819c
Merge pull request #46742 from gtmanfred/2017.7
only use npm test work around on newer versions
2018-03-27 17:13:28 -04:00
Daniel A. Wozniak
62d64c9230
Fix missing import 2018-03-27 14:10:24 -07:00
Ch3LL
4f1c42c0e3
Workaround getpwnam in auth test for MacOSX 2018-03-27 15:18:29 -04:00
Daniel Wallace
fd0e649d1e
only use npm test work around on newer versions
The workaround only needs to be applied to versions of npm newer than 5.1, but
they work with versions newer than 5.0, so just do all newer versions using the
work around
2018-03-27 13:51:21 -05:00
Daniel A. Wozniak
18b1730320
Skip test that requires pywin32 on *nix platforms 2018-03-27 11:38:20 -07:00
Daniel A. Wozniak
ec4634fc06
Better explanation in doc strings 2018-03-27 10:35:51 -07:00
Erik Johnson
6502b6b4ff
Make busybox image builder work with newer busybox releases 2018-03-27 10:55:52 -05:00
Nicole Thomas
3f21e9cc65
Merge pull request #46503 from psyer/fix-cmd-run-env-corrupt
Fixes stdout user environment corruption
2018-03-27 10:20:14 -04:00
Daniel A. Wozniak
45dce1a485
Add reg module to globals 2018-03-26 12:00:39 -07:00
Nicole Thomas
fadc5e4ba4
Merge pull request #46669 from terminalmage/pillar-merge-order
Add option to return to pre-2017.7.3 pillar include merge order
2018-03-26 15:00:27 -04:00
Daniel A. Wozniak
d9ae2abb34
Fix splling in docstring 2018-03-26 09:45:04 -07:00
Nicole Thomas
6c80d90bb6
Merge pull request #46693 from dwoz/test_smtp_return
File and Pillar roots are dictionaries
2018-03-26 11:15:37 -04:00
Nicole Thomas
47409eaa6e
Merge pull request #46646 from twangboy/win_fix_test_local_cache
Fix `unit.returners.test_local_cache` for Windows
2018-03-26 10:16:22 -04:00
Daniel A Wozniak
b40efc5db8
Windows test client fixes
- Skip IPC transport test on windows
- Add TCP transport test for windows
2018-03-23 15:36:32 -07:00
Daniel A. Wozniak
5bf850c67f
File and Pillar roots are dictionaries
Fixes test_smtp_return test cases.
2018-03-23 11:42:14 -07:00
Ch3LL
7cda825e90
Add groupadd module integration tests for Windows 2018-03-23 13:30:22 -04:00
Daniel A Wozniak
628b87d5c4
Skip test when git symlinks are not configured 2018-03-22 23:30:15 -07:00
Daniel A. Wozniak
73d06f664b Fix linter error 2018-03-22 13:47:41 -07:00
Erik Johnson
b4a1d34b47
Add option to return to pre-2017.7.3 pillar include merge order
https://github.com/saltstack/salt/pull/45025 changed the pillar include
merge order. This adds a new config option which allows a user to revert
to the pre-2017.7.3 behavior.
2018-03-22 13:35:12 -05:00
Daniel A. Wozniak
009a8f56ea
Fix up environ state tests for Windows 2018-03-22 11:31:25 -07:00
Daniel A. Wozniak
b4be10b8fc
Fixing cleanUp method to restore environment
The clean-up method was not reliabliy restoring sys.environment on
windows. Using Mock's patch to cleanup more reliably.
2018-03-21 20:01:30 -07:00
Mike Place
33af3cfc7c
Merge pull request #46631 from rallytime/update-pillar-unit-tests
Fix pillar unit test failures: file_roots and pillar_roots environments should be lists
2018-03-21 19:22:48 +00: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
twangboy
8d93156604
Fix unit.returners.test_local_cache for Windows
time.time is only precise to 3 decimal places in Windows. This adds a
sleep for .25 seconds to allow the test to pass
Also fixes a lint error
2018-03-21 16:00:52 +00:00
Erik Johnson
e8582e80f2
Python 3-compatibility fix to unit test
This should not be returning a string type for stderr, since
Popen.communicate() returns a bytestring. In Python 2, the str and bytes
types are the same, but the same is not true in Python 3.

Additionally, the mocking here seems not to consider the fact that Popen
is called when runas is used to get the runas user's environment. Since
this test doesn't care about the output, we can just make the mocked
Popen.communicate() return an empty bytestring.
2018-03-20 22:09:18 -05:00
Daniel A. Wozniak
eb822f5a12
Fix file.recurse w/ clean=True #36802
Fix an endless looping but in file.recurse when clean is set to true.
This patch normalizes paths and handles the root correctly.
2018-03-20 16:12:01 -07:00
rallytime
0f728186aa
Fix pillar unit test failures: file_roots and pillar_roots environments should be lists 2018-03-20 17:49:58 -04: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
Nicole Thomas
f038e3c452
Merge pull request #46571 from garethgreenaway/46552_onfail_and_require
[2017.7] fixes to state.py
2018-03-20 09:40:03 -04:00
Nicole Thomas
7bc3c2e588
Merge pull request #46531 from terminalmage/issue44299
Fix regression in yumpkg._parse_repo_file()
2018-03-20 09:34:58 -04:00
rallytime
bcbddf5d07
Merge branch '2017.7.5' into '2017.7'
No conflicts.
2018-03-20 09:10:38 -04:00
Nicole Thomas
cdd768fa4d
Merge pull request #46577 from gtmanfred/2017.7.5
Fix npm issue
2018-03-19 07:51:03 -04:00
Nicole Thomas
e6682c660c
Merge pull request #46551 from terminalmage/salt-jenkins-885
Fix failing pkg integration test on OpenSUSE
2018-03-19 07:50:11 -04:00
Daniel Wallace
78cbf7b5cd
Fix npm issue
Fixes saltstack/salt-jenkins#884
2018-03-16 09:04:09 -06: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
Daniel A. Wozniak
3b6901e19d Honor named tests when running integration suites 2018-03-15 13:16:43 -07:00
Daniel Wallace
8d5ab72983
virtualenv version too old for python3.6
This test is testing an old version of virtualenv with pip_env, and the version
of pip is 6.x.x, which is too old and doesn't work with the importlib in python
3.6. Skipping this test if python is newer then 3.5.
2018-03-15 12:18:23 -06:00
Nicole Thomas
98e3260b9a
Merge pull request #46548 from Ch3LL/profit_test
profitbrick test: check for foo,bar username,password set in profitbrick config
2018-03-15 10:25:27 -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
Ch3LL
bb338c464c
Fix dimensionsdata test random_name call 2018-03-14 15:28:06 -04:00
Ch3LL
db96c4e72e
check for foo,bar username,password set in profitbrick config 2018-03-14 14:57:48 -04:00
Erik Johnson
ce391c53f4
Add regression test for #44299 2018-03-13 21:30:14 -05:00
Frode Gundersen
1ad4d7d988
fix assert errors 2018-03-13 21:01:46 +00:00
Frode Gundersen
e6a56016df
update test 2018-03-13 20:54:25 +00: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
Nicole Thomas
b7191b8782
Merge pull request #46413 from meaksh/2017.7-explore-result-in-depth
Explore 'module.run' state module output in depth to catch "result" properly
2018-03-12 14:49:06 -04:00
Nicole Thomas
cac096b311
Merge pull request #46434 from gtmanfred/highstate_return
split return key value correctly
2018-03-09 12:45:20 -05:00
Daniel Wallace
d18f1a55a7
fix pylint 2018-03-09 08:23:17 -07:00
Nicole Thomas
a188984cd9
Merge pull request #46446 from bdrung/fix-typos
Fix various typos
2018-03-08 16:11:46 -05:00
Daniel Wallace
9e2c3f7991
split return key value correctly 2018-03-08 13:38:52 -07:00
Nicole Thomas
e35fc5263c
Merge pull request #46309 from bdrung/dynamic-pillarenv
Support dynamic pillar_root environment
2018-03-08 14:15:35 -05:00
Nicole Thomas
35fe9827fe
Merge pull request #46430 from terminalmage/issue44032
Improve reliability/idempotence of file.blockreplace state
2018-03-08 10:41:37 -05:00
Benjamin Drung
a3c54b50f6 Fix various spelling mistakes
lintian found various spelling mistakes.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-03-08 15:25:42 +01:00
Benjamin Drung
584b451fd1 Support dynamic pillar_root environment
Allow users to specify a __env__ pillar_root directory that applies
equally to all environments that are not explicitly specified.

fixes #20581
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-03-08 10:12:40 +01:00
Erik Johnson
f9f187e915
Improve reliability/idempotence of file.blockreplace state
This makes the following changes:

- The `append_newline` argument to the `file.blockreplace`
  remote-execution function has been modified so that if its value is
  `None`, it only appends a newline when the content block does not end
  in one.
- A couple of fixes were made to newline handling. The existing code
  normalized the newlines in the content block, replacing them with
  os.linesep. However, when the file contains newlines that don't match
  the OS (i.e. POSIX newlines in a file on a Windows box, or Windows
  newlines on a Linux/Mac/BSD/etc. box), then we would still end up with
  mixed newlines. The line separator is now detected when we read in the
  original file, and the detected line separator is used when writing
  the content block. Additionally, the same newline mismatch was
  possible when appending/prepending the content block. This has been
  fixed by using a common function for appending, prepending, and
  replacing the content block.
- Support for the `append_newline` argument has been added to the
  `file.blockreplace` state. The default value for the state is `None`.
  A `versionchanged` has been added to the remote execution function to
  let users know that the Fluorine release will change the default value
  of that variable.
- 20 new integration tests have been written to test the
  `file.blockreplace` state.
2018-03-07 22:29:39 -06:00
Nicole Thomas
93a572f229
Merge pull request #46100 from jfindlay/resolv_scope
Handle IPv6 scope parameter in resolv.conf
2018-03-07 14:51:19 -05:00
Pablo Suárez Hernández
885751634e
Add new unit test to check state.apply within module.run 2018-03-07 15:43:52 +00:00
Daniel Wallace
3620611b5b
fix unhold package for debian 2018-03-06 14:54:40 -07:00
Justin Findlay
d5561bedaf
tests.unit.grains.core add scoped IPv6 nameserver 2018-03-05 12:31:04 -08:00
Daniel Wallace
d6d9e36359
add tests for names and listen/listen_in
Closes #30115
2018-03-05 12:15:23 -07:00
Nicole Thomas
a8f2f1b063
Merge pull request #46322 from terminalmage/issue44935
yamlify_arg: don't treat leading dashes as lists
2018-03-05 10:40:16 -05:00
Nicole Thomas
88b5f7383d
Merge pull request #46242 from redbaron4/fix-46127
Pass env_vars to pip.freeze
2018-03-05 09:53:12 -05:00
Erik Johnson
85ac6a9893
yamlify_arg: don't treat leading dashes as lists
We had a similar check to ensure "foo: bar" isn't loaded as a dict, this
adds a check to ensure that we only load lists when there is a leading
bracket.
2018-03-03 15:02:12 -06:00
Nicole Thomas
a0716643e4
Merge pull request #46265 from Ch3LL/profit_cloud
Add username/password to profitbricks conf for cloud tests
2018-03-02 16:40:21 -05:00
Nicole Thomas
8c2c4e3316
Merge pull request #46208 from terminalmage/audit-umask-usage
Blacklist os.umask
2018-03-02 13:46:06 -05:00
Nicole Thomas
c490a50452
Merge pull request #45874 from GwiYeong/2017.7-local-client-hotfix
fix for local client timeout bug
2018-03-01 14:39:35 -05:00
Dheeraj
727ebe1056
Merge branch '2017.7' into fix-46127 2018-03-01 10:19:38 +05:30
Nicole Thomas
da60399b8f
Merge pull request #46183 from oeuftete/fix-docker-container-running-host-config-ulimits
Fix docker_container.running HostConfig Ulimits comparison
2018-02-28 17:22:11 -05:00
Ch3LL
d4893eab4c
Add username/password to profitbricks conf for cloud tests 2018-02-28 17:09:28 -05:00
Nicole Thomas
a97a3e6fb0
Merge pull request #46101 from jfindlay/openrc_ret
In OpenRC exec module, make sure to ignore retcode on status
2018-02-28 15:01:36 -05:00
Dheeraj Gupta
08d1ee8baf Fix Python3 test errors 2018-02-28 16:44:29 +05:30
Dheeraj Gupta
aa9d709015 Pass env_vars to pip.freeze
pip.installed state calls pip.freeze to check for existing installation
and to verify installation post-install. This patch propagates the
env_vars passed to pip.installed to the pip.freeze function. It also modifies
existing pip unit tests to test new functionality and adds an integration test
that verifies the expected correct behavior

Fixes #46127
2018-02-28 16:44:20 +05:30
Erik Johnson
31b1d98fcb
Replace direct use of os.umask with use of existing context manager
In cases where os.umask was being used simply to get the umask, a new
helper function has been added to keep improper direct usage of os.umask
from permanenly modifying the umask.
2018-02-27 23:42:51 -06:00
Erik Johnson
586d8b0dcf
archive.extracted: don't check source file when if_missing path exists
This exits the state early with a True result when the if_missing path
exists.
2018-02-27 23:39:32 -06:00
Ken Crowell
5b09644429
Sort lists from Ulimits before comparing 2018-02-27 23:49:05 -04: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
Benjamin Drung
0b445f2a37 tests: Add unit tests for _parse_os_release()
Add tests cases to fully cover _parse_os_release().

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:38:23 +01:00
Benjamin Drung
f6069b77ed Fix osfinger grain on Debian
Rework _run_os_grains_tests() to check all os grains including osfinger.
Fix osfinger on Debian (e.g. use "Debian-9" instead of
"Debian GNU/Linux-9").

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
8dde55a761 tests: Add os_grains test cases for Debian
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
ff02ab9937 tests: Add Ubuntu 17.10 (artful) os_grains test case
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
77d5356aba Fix incorrect oscodename grain on Ubuntu
Use the full content of /etc/os-release for the Ubuntu 16.04 (artful)
os_grains test case. This reveals a bug that 'oscodename' is not
correctly calculated if /etc/os-release provides PRETTY_NAME:

FAIL: test_ubuntu_os_grains (tests.unit.grains.test_core.CoreGrainsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/grains/test_core.py", line 439, in test_ubuntu_os_grains
    self._run_ubuntu_os_grains_tests(_os_release_map)
  File "tests/unit/grains/test_core.py", line 446, in _run_ubuntu_os_grains_tests
    self._run_os_grains_tests(os_release_map)
  File "tests/unit/grains/test_core.py", line 262, in _run_os_grains_tests
    self.assertEqual(os_grains.get('oscodename'), os_release_map['oscodename'])
AssertionError: 'Ubuntu 16.04.3 LTS' != 'xenial'
- Ubuntu 16.04.3 LTS
+ xenial

fixes #34423 for Ubuntu
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
7e62dc9fd2 tests: Support reading os-release files from disk
Instead of storing pre-parsed os-release files, add support for reading
os-release files from disk.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
a92ec0db1b Make _parse_os_release() always callable
To simplify running unit tests against os_data(), make the
_parse_os_release() function always callable to avoid needing to mock
os.path.isfile().

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
eee1fe5b38 tests: Dissolve _run_ubuntu_os_grains_tests
_run_ubuntu_os_grains_tests is only used once and does not provide any
useful abstraction since the introduction of _run_os_grains_tests.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
1d6ef731fe tests: Deduplicate _run_os_grains_tests()
_run_suse_os_grains_tests() and _run_ubuntu_os_grains_tests() share most
of their logic. Combine the common part in _run_os_grains_tests() and
let the remaining small parts live in their origin functions.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Nicole Thomas
705caa8cca
Merge pull request #46148 from rallytime/merge-2017.7
[2017.7] Merge forward from 2017.7.3 to 2017.7
2018-02-23 14:21:38 -05:00
rallytime
25deebf7a6
Merge branch '2017.7.3' into '2017.7'
Conflicts:
  - salt/modules/git.py
2018-02-22 10:22:22 -05:00
Erik Johnson
e2c4702e0c
Update tests to reflect changes to the SaltCacheLoader 2018-02-21 23:20:02 -06:00
Nicole Thomas
b92346645b
Merge pull request #46107 from amendlik/yumpkg-assumeyes
Add --assumeyes on YUM/DNF commands
2018-02-20 17:52:05 -05:00
Adam Mendlik
8d9a432fb2
Add --assumeyes to yum/dnf commands in yumpkg.refresh_db
Without --assumeyes, these commands can hang waiting for
user confirmation if there is an unaccepted repository key.
2018-02-19 17:51:11 -07:00
Justin Findlay
2eef3c65a6
tests.unit.modules.gentoo_service add retcode arg 2018-02-19 11:27:11 -08:00
Benjamin Drung
dd3f936557 Fix skipping Kubernetes tests if client is not installed
When the Kubernetes client is not installed, the import of
salt.modules.kubernetes will still succeed, but HAS_LIBS will be set to
False (since the library import will be covered by a try-except clause).

Therefore expect the salt.modules.kubernetes to always succeed and check
kubernetes.HAS_LIBS instead for the presence of the kubernetes library.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-19 12:32:14 +01:00
Erik Johnson
e2140d9a84
Mock the ssh.key_is_encrypted utils func 2018-02-15 14:37:50 -06:00
Nicole Thomas
edcb64de76
Merge pull request #45763 from twangboy/win_fix_path_rehash
Fix rehash function in win_path.py
2018-02-15 15:05:15 -05:00
Erik Johnson
f2b69f703d
git.latest: Fix regression with identity file usage
Unit test included
2018-02-15 09:35:10 -06:00
Nicole Thomas
a1f4092811
Merge pull request #46015 from rallytime/bp-45785
Back-port #45785 to 2017.7
2018-02-14 13:16:08 -05:00
Nicole Thomas
1279924f5f
Merge pull request #45991 from terminalmage/fix-duplicate-extra-opts
yumpkg: Fix a couple issues with _get_extra_opts
2018-02-14 11:48:28 -05:00
Erik Johnson
916766f651
yumpkg: Fix a couple issues with _get_extra_opts
`_get_extra_opts()` and `_get_branch_option()` were unnecessarily
quoting the value, causing it to be interpreted as a literal quote by
`subprocess.Popen()`.

Also, because there were separate helpers for repo options,
disableexcludes, branch options, and extra options, and specifically
because `_get_extra_opts()` parses *all* kwargs, any of the options from
the other helper funcs would end up being added to the command line
twice if `_get_extra_opts()` was used.

This commit consolidates all of the kwarg inspection and CLI opts
construction to a single helper function. It also adds unit tests to
make sure that we are formatting our commands properly.

Additionally, it makes a minor fix in `refresh_db()` which was not
accounted for when we changed the osmajorrelease grain to an integer in
2017.7.0.
2018-02-13 22:46:27 -06:00
Ollie Armstrong
ef6ffb1492
Resolve linting errors 2018-02-13 13:27:38 -05:00
Ollie Armstrong
8047066c46
Remove unused import 2018-02-13 13:27:38 -05:00
Ollie Armstrong
8f7c45935a
Add tests for salt.modules.selinux.fcontext_get_policy 2018-02-13 13:27:38 -05:00
Nicole Thomas
b18087cee0
Merge pull request #45711 from bdrung/fix-unicode-tests
Fix Unicode tests when run with LC_ALL=POSIX
2018-02-13 12:42:06 -05:00
Nicole Thomas
cf367dbd04
Merge pull request #45942 from terminalmage/issue45679-2017.7
Fix incorrect translation of docker port_bindings -> ports (2017.7 branch)
2018-02-13 11:10:02 -05:00
gwiyeong
949aefc82b
Merge branch '2017.7' into 2017.7-local-client-hotfix 2018-02-13 11:09:06 +09:00
Nicole Thomas
007214f7bf
Merge pull request #45908 from DimensionDataResearch/fix/issue/45884
Fix for #45884 ("TypeError: can't serialize <NodeImage" when calling salt-cloud with the dimensiondata driver)
2018-02-12 17:05:28 -05:00
GwiYeong
45d663f435
fix for local client timeout bug 2018-02-12 13:00:22 +09:00
Erik Johnson
89cbd72a0d
Don't try to sort ports when translating docker input
This sorting was done mainly for the benefit of the test suite, but
Python 3 will raise an error when you try to sort a mixture of int and
tuple types, so sorting breaks down when there are UDP ports.

Instead, this just leaves them as an unsorted list when passed to the
API, and the test suite does the sorting before the assertEqual.
2018-02-09 11:33:10 -06:00
Erik Johnson
9cd47b39dd
Fix incorrect translation of docker port_bindings -> ports
The logic which ensures that we expose ports which are being bound,
even when not explicitly configured, was done incorrectly. UDP ports
were being passed to the API as '1234/udp' instead of (1234, 'udp').
This results in the port not being exposed properly.

The logic has been corrected. Additionally both the "ports" input
translation function, as well as the post-processing code (where the
port numbers configured in port_bindings were being added) both
contained code to "fix" any ports which were configured using
'portnum/tcp', as these must be passed to the API simply as integers. To
reduce code duplication, this normalization is now only performed at the
very end of the post-processing function, after ports have been
translated, and any missing ports from the port_bindings have been
added.

The unit test for the port_bindings input translation code, which was
written based upon the same incorrect reading of the API docs that
resulted in the incorrect behavior, have been updated to confirm the
(now) correct behavior. The unit test for the ports input translation
code has been updated to reflect the new normalization behavior.

Finally, an integration test has been added to ensure that we properly
expose UDP ports which are added as part of the post-processing
function.
2018-02-08 23:23:43 -06:00
twangboy
29912adc15
Move the test_rehash test to test_win_functions 2018-02-08 17:44:30 -07:00
Erik Johnson
bb83e8b345
Add regression test for issue 45893 2018-02-08 16:31:23 -05:00
Adam Friedman
1a75786b5a
Fix linter warnings.
saltstack/salt#45884
2018-02-09 05:16:59 +11:00
Adam Friedman
a2bc155c73
Use __utils__['cloud.'] instead of salt.cloud.utils.
saltstack/salt#45884
2018-02-08 08:39:33 +11:00
Adam Friedman
de26b03e2c
Fix copy/paste bug in dimensiondata provider integration test.
saltstack/salt#45884
2018-02-08 08:39:07 +11:00
Adam Friedman
6b1b6be427
Add integration tests for dimensiondata cloud provider.
saltstack/salt#45884
2018-02-08 08:38:58 +11:00
Erik Johnson
9d200efc26
Add regression test for issue 45893 2018-02-07 14:32:59 -06:00
Nicole Thomas
900aadcd67
Merge pull request #45721 from garethgreenaway/44978_show_duration_when_no_state_run
[2017.7] Ensure duration and start time exist
2018-02-05 09:59:32 -05:00
Nicole Thomas
80a2d009b4
Merge pull request #45517 from kstreee/fix-mkdir
Fixes base dir making logic to ensure not raising the exception when base directory already exists.
2018-02-05 09:56:22 -05:00
kstreee
24d41f2451
Fixes base dir making logic to ensure not raising the exception when base directory already exists. 2018-02-02 09:55:08 +09:00
Benjamin Drung
b6181b5ed6 Fix Unicode tests when run with LC_ALL=POSIX
When running the unit tests with the locale set to POSIX, some Unicode
tests fail:

$ LC_ALL=POSIX python3 ./tests/runtests.py --unit
[...]
======================================================================
ERROR: test_list_products (unit.modules.test_zypper.ZypperTestCase)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/modules/test_zypper.py", line 236, in
test_list_products
    'stdout': get_test_data(filename)
  File "tests/unit/modules/test_zypper.py", line 53, in get_test_data
    return rfh.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
828: ordinal not in range(128)

======================================================================
ERROR: test_non_ascii (unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/templates/test_jinja.py", line 341, in test_non_ascii
    result = fp.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)

======================================================================
ERROR: test_non_ascii_encoding
(unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/templates/test_jinja.py", line 303, in
test_non_ascii_encoding
    fp_.read(),
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)
----------------------------------------------------------------------

Therefore open files in binary mode and explicitly decode them with
utf-8 instead of their default locale.
2018-02-01 19:24:23 +01:00
William Villeneuve
217791079b some code cleanup (lint errors and escape_argument as _cmd_quote) 2018-01-28 12:42:33 -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
William Villeneuve
1c29bc5a3d fixed quoting of script path in cmd.script 2018-01-26 09:05:18 -05:00
rallytime
9f78e53d4b
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-24 16:09:17 -05: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
7934372b7b
Merge pull request #45649 from rallytime/bp-45634
Back-port #45634 to 2017.7.3
2018-01-24 09:59:42 -05:00
Erik Johnson
0a6b06d8ea
Fix unnecessary/incorrect usage of six.binary_type 2018-01-23 17:54:27 -05:00
Nicole Thomas
79ee24c0c7
Merge pull request #45611 from terminalmage/tests-log-level
Fix unnecessary/incorrect usage of six.binary_type
2018-01-23 17:53:19 -05:00
Nicole Thomas
0a07e0d259
Merge pull request #45642 from rallytime/bp-45636
Back-port #45636 to 2017.7.3
2018-01-23 17:00:29 -05:00
Nicole Thomas
dbdef8230e
Merge pull request #45630 from bdrung/2017.7
Fix tests
2018-01-23 16:56:46 -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
Ch3LL
1c78fc23ea
Add different service name for Mac 10.13 test 2018-01-23 16:53:06 -05:00
Nicole Thomas
c290b6320b
Merge pull request #45634 from Ch3LL/mac-service
Add different service name for Mac 10.13 test
2018-01-23 16:51:56 -05:00
Frode Gundersen
e6917a291e
fix test_archive test for mac on 2017.7 branch 2018-01-23 14:35:32 -05: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
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
Ch3LL
31b712e27d
Add different service name for Mac 10.13 test 2018-01-23 10:07:10 -05:00
Benjamin Drung
76d44e9490 Fix skipping test when boto is not installed
When boto and moto are not installed, the BotoVpcTestCaseBase() should
be skipped. _get_boto_version() and _get_moto_version() require that
boto and moto are installed, but are called anyway in the skipIf
condition.
2018-01-23 13:32:22 +01:00
Benjamin Drung
2b9b262357 Fix unit.modules.test_cmdmod.CMDMODTestCase.test_run
The test_run unit tests end result when a command is not found. When
_run() is called without setting cwd, it will use the home directory as
working directory. When the home directory does not exist, the unit test
will fail:

Traceback (most recent call last):
  File "tests/unit/modules/test_cmdmod.py", line 231, in test_run
    ret = cmdmod._run('foo', use_vt=True).get('stderr')
  File "salt/modules/cmdmod.py", line 536, in _run
    .format(cwd)
salt.exceptions.CommandExecutionError: Specified cwd
'/sbuild-nonexistent' either not absolute or does not exist

Therefore set cwd to the current directory since the working directory
is not used in this test case.

This fixes one failing test of #45627.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-01-23 13:18:18 +01: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
Erik Johnson
6aa865cf54
Fix unnecessary/incorrect usage of six.binary_type 2018-01-22 11:17:06 -06:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
No conflicts.
2018-01-22 11:55:54 -05:00
Erik Johnson
629e6c9674
Further fixes to for salt-ssh test under heavy load
This makes some further tweaks to make the test more stable under heavy
load. Firstly, the background job sleeps longer, and secondly, we make
up to 3 attempts run state.running instead of just the one, in case our
first attempt was too early. It also uses threading to make the job
sleep, since the method of adding a & to the command seemed to be
producing intermittent failures with returning clean JSON.
2018-01-22 07:33:42 -05:00
Daniel Wallace
f7fd35fc4a
test updating the minion blackout timeout to 10 seconds 2018-01-21 14:42:56 -07:00
Daniel Wallace
bd3cb47fa7
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-20 09:58:22 -07:00
Daniel Wallace
808e26e69a
test simple website 2018-01-20 09:57:20 -07:00
Daniel Wallace
1f71f301ba
specify checking man page path
Without setting the man path, this would be checking that the installed salt
package used to bootstap has an spm man page, which is possible that it
doesn't, and also not what we want to check
2018-01-19 17:53:20 -07: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
Nicole Thomas
b3dc758ab0
Merge pull request #45483 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-18 17:54:11 -05:00
Daniel Wallace
8d907ee1a0
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-18 14:56:31 -07:00
Daniel Wallace
1241ab5fc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-18 14:56:27 -07: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
6c26025664
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-18 10:48:07 -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
Frode Gundersen
ccf062d62e
fix test_archive test for mac on 2017.7 branch 2018-01-17 18:54:35 +00:00
rallytime
de6d85959a
Lint fix 2018-01-17 12:42:38 -05:00
rallytime
9f547a31f0
Merge branch '2016.11' into '2017.7' 2018-01-16 17:19:08 -05:00
Nicole Thomas
5f58a87e84
Merge pull request #45365 from meaksh/2017.7-issue-45345
Return an error when "gid_from_name" is set but group does not exist
2018-01-16 13:31:49 -05: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
rallytime
590a6db626
Lint: use support TMP path instead of integration TMP path 2018-01-16 09:13:27 -05:00
Erik Johnson
919e92c911
Fix git.latest failure when rev is not the default branch 2018-01-14 08:25:30 -05:00
Erik Johnson
c081b2c62c
Fix git.latest failure when rev is not the default branch 2018-01-14 08:23:38 -05:00
Daniel Wallace
b9761971c2
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-13 15:01:14 -05:00
Daniel Wallace
0cd95d1cc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-13 15:01:14 -05:00
Pablo Suárez Hernández
52f9c06908
Fix integration tests for 'user.present' state. 2018-01-12 12:47:29 +00:00
Erik Johnson
0cbc6767bf
Fix git.latest failure when rev is not the default branch 2018-01-11 15:26:35 -06: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
Nicole Thomas
22c3efda06
Merge pull request #45371 from rallytime/bp-45158
Back-port #45158 to 2017.7
2018-01-11 12:51:37 -05:00
Erik Johnson
5473c085d9
Fix loader error in 2017.7 tests 2018-01-11 08:40:27 -06:00
Erik Johnson
ff3039db6c
Skip flaky test on 2017.7 branch
The behavior of the set union used to combine ext_nodes and top file
matches is not consistent on Python 3 (well, 3.5 at least), and this
produces flaky test results.

Since we do not change things like the state compiler in point
releases, the method used to combine the ext_nodes and top file matches
has been changed for Oxygen and is now fully deterministic. This test
will therefore be skipped for the remainder of the 2017.7 release cycle
on Python 3.

Fixes https://github.com/saltstack/salt-jenkins/issues/686.
2018-01-10 16:02:32 -06:00
twangboy
419be8a9b5
Backport changes from #45308 2018-01-10 11:16:59 -07:00
Erik Johnson
3565bc2bf2
Don't use include-test SLS in orch tests
This was the _actual_ cause of the failing test in the state module
integration tests.
2018-01-10 10:29:15 -05: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
Nicole Thomas
fb87010461
Merge pull request #45297 from Ch3LL/mac_service_state
Allow macosx service state tests to check for pid return
2018-01-09 15:47:23 -05:00
Nicole Thomas
8d04c2b3d4
Merge pull request #44856 from Ch3LL/running_test
Add state.running ssh integration test
2018-01-08 16:40:49 -05:00
Nicole Thomas
d0e5e70277
Merge pull request #45295 from gtmanfred/test_directory
test directory that doesn't exist
2018-01-08 15:59:52 -05:00
Nicole Thomas
f49b204b75
Merge pull request #45302 from gtmanfred/proxyp3
fix proxy tests for py3 on 2017.7
2018-01-08 12:41:57 -05:00
Nicole Thomas
eea7158e82
Merge pull request #45279 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-08 12:26:48 -05:00