Commit Graph

3079 Commits

Author SHA1 Message Date
Bo Maryniuk
6220380c3d Remove an older version of the unit test 2017-06-19 14:00:52 +02:00
Bo Maryniuk
d834bc2c8b Remove old tester. 2017-06-19 13:57:54 +02:00
Pablo Suárez Hernández
fb444db0f2 Search the entire CACHE_DIR because storage paths change across versions
Prevents zero length error on Python 2.6

Fixes Zypper unit test

Enhances pkg.list_downloaded information of a package

Listing all patches instead of security ones only

Adapting Zypper test to new list_downloaded output

Fixes zypper test error after backporting

Pylint fixes
2017-06-16 15:28:42 +02:00
Pablo Suárez Hernández
27ef83fd62 Adding support for installing patches in yum/dnf execution module
Adding support for installing patches in Zypper module

Adding list_downloaded function to Zypper module

Adding list_downloaded function to Yum module

Adding new pkg.downloaded state

Adding documentation for pkg.downloaded state

Adding pkg.patched and pkg.patch_downloaded states

Check targets for advisory patches installation

Adds support for listing advisory patches with Zypper

Adds support for listing advisory patches with Yum

Improving function naming

Moving advisory ids checks into pkg_resource.parse_targets

Fixes _find_download_targets to call _preflight_check

Fixes parse_targets when advisory id is passed as name

Pylint fixes

Enables pkg.downloaded to verify packages after package manager call.

Adding missing kwargs parameters to pkg.install call

Adding versionadded flags

Some refactoring and minor fixes

Adding unit tests for Zypper execution module

Adding more unit tests for Zypper module

Pylint fix
2017-06-16 15:28:10 +02:00
Peter V. Saveliev
4761e711fe clean up change attribute from interface dict
The attribute is hidden in IPDB from the high-level logics since
pyroute2 version 0.4.2.

Bug-Url: https://github.com/saltstack/salt/issues/41461

unit tests: add pyroute2 interface dict test

Bug-Url: https://github.com/saltstack/salt/pull/41487
Bug-Url: https://github.com/saltstack/salt/issues/41461

unit tests: fix absolute imports in test_pyroute2

Bug-Url: https://github.com/saltstack/salt/pull/41533

unit tests: add encoding clause into test_pyroute2

Bug-Url: https://github.com/saltstack/salt/pull/41533

unit tests: test_pyroute2 -- add skipIf

... and comments

Bug-Url: https://github.com/saltstack/salt/pull/41533

Update new pyroute2 unit test to conform with 2016.11 branch standards
2017-06-16 14:39:08 +02:00
Michael Calmer
f7cd2f6722 Fix os_family case in unittest 2017-06-16 14:39:08 +02:00
Bo Maryniuk
2d8c9883ff Use correct grain constants for timezone
Adjust the test so it is using the right grain for SUSE systems

Bugfix: use correct grain constant for platform

Refactor with setup/teardown

Add UT for RedHat's set_zone

Fix doc for RH UT

Remove unnecessary mock patch

Doc fix

Add UT for set_zone on SUSE series

Adjust UT to use correct grain for SUSE series

Bugfix: use correct os_family grain value for SUSE series

Add UT for gentoo on set_zone

Add UT for Debian on set_zone

Remove duplicate code

Add UT for get_hwclock on UTC/localtime

Remove dead code

Add UT for get_hwclock on SUSE platform

Bugfix: use correct grain for SUSE and RedHat platform

Add UT for RedHat/SUSE platforms on get_hwclock

Add UT for Debian on get_hwclock

Add UT on Solaris

Add UT for AIX on get_hwclock

Add UT for set_hwclock on AIX

Fix docstrings

Add UT for set_hwclock on solaris

Add UT for set_hwclock on Arch

Add UT for set_hwclock on RedHat

Fix UT names

Add UT set_hwclock on SUSE

Bugfix: use correct grain name for SUSE platform

Add UT for set_hwclock on Debian

Add UT on set_hw_clock on Gentoo

Fix lint issues

Rewrite test case for using no patch decorators

Disable the test for a while

Do not use multiple variables in "with" statement as of lint issues
2017-06-16 14:39:08 +02:00
Cléry Plassat
a7974fe508 Patched the windows status test 2017-06-16 12:48:15 +02:00
garethgreenaway
899d852791 Merge branch 'develop' into 41742_adding_force_option 2017-06-15 16:07:06 -07:00
Gareth J. Greenaway
87ff0eb3ad Adding the force option for situation where the -yes argument needs to be passed along to lvcreate 2017-06-15 13:39:17 -07:00
rallytime
7fef4cf38f Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/engines/slack.py
2017-06-15 10:57:27 -06:00
rallytime
b6cc0b6bf0 Manually backport the changes in PR #41615
The automatic back-porting process did't work for this file since the
testing file has been renamed. I manually added the changes to
`timezone_test.py` that were present in PR #41615.
2017-06-15 08:53:25 -06:00
rallytime
2b51a20d02 Replace "nitrogen" references with 2017.7.0, too! 2017-06-14 12:20:45 -06:00
rallytime
b0145578bf Update Nitrogen references to 2017.7.0 for states, utils, tests directory
Also updated version.py with release tuple
2017-06-14 11:54:27 -06:00
rallytime
396b06fdf8 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-06-07 09:54:20 -06:00
Nicole Thomas
832b96ea05 Merge pull request #41614 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-06-06 18:42:44 -06:00
rallytime
8aaadd8787 Revert "Update new pyroute2 unit test to conform with 2016.11 branch standards"
This reverts commit 535b8e8d8e.
2017-06-06 16:35:12 -06:00
Ch3LL
ea147701f4
Fix get_hwclock_aix test on MacOSX 2017-06-06 15:06:08 -04:00
rallytime
1a40e105e5 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - tests/integration/__init__.py
  - tests/integration/modules/test_state.py
2017-06-06 12:57:44 -06:00
rallytime
535b8e8d8e Update new pyroute2 unit test to conform with 2016.11 branch standards 2017-06-05 20:55:44 -06:00
Peter V. Saveliev
5c86dee73c unit tests: test_pyroute2 -- add skipIf
... and comments

Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
026b39493f unit tests: add encoding clause into test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
9ab203d54b unit tests: fix absolute imports in test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-05 17:22:48 -06:00
Peter V. Saveliev
1f507cfa7a unit tests: add pyroute2 interface dict test
Bug-Url: https://github.com/saltstack/salt/pull/41487
Bug-Url: https://github.com/saltstack/salt/issues/41461
2017-06-05 17:22:48 -06:00
Mike Place
3190b88df0 Merge pull request #41559 from rallytime/merge-develop
[develop] Merge forward from nitrogen to develop
2017-06-02 10:28:29 -05:00
rallytime
833b2145c4 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-06-01 17:15:36 -06:00
Nicole Thomas
a49348cc89 Merge pull request #41535 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-06-01 16:25:35 -06:00
rallytime
cb69296f55 Remove test_win_firewall unit tests: they don't actually test anything 2017-06-01 10:07:23 -06:00
Dmitry Kuzmenko
7ba25db473 Replace assertCountEqual not-implemented in Py2 2017-06-01 16:52:09 +03:00
Dmitry Kuzmenko
64954d8e40 Fixed pylint errors. 2017-06-01 16:49:57 +03:00
Dmitry Kuzmenko
4a2406f178 Py3: fixed some tests.
tls module: convert bytes to string
gzip util: use BytesIO for 'wb' file
django module: ignore arguments order in assert
pillar module: correctly test pillar merge
2017-06-01 16:49:57 +03:00
Peter V. Saveliev
602a7af748 unit tests: test_pyroute2 -- add skipIf
... and comments

Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-01 10:47:26 +02:00
Peter V. Saveliev
d4939e1ac9 unit tests: add encoding clause into test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-06-01 07:44:47 +02:00
Peter V. Saveliev
c744cbefd7 unit tests: fix absolute imports in test_pyroute2
Bug-Url: https://github.com/saltstack/salt/pull/41533
2017-05-31 22:34:00 +02:00
rallytime
63ea033ec3 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/win_status.py
  - salt/states/selinux.py
  - tests/unit/modules/test_ssh.py
2017-05-31 14:29:12 -06:00
Mike Place
06ed4f077b Merge pull request #41337 from Foxlik/2016.11
Fix #41335 - list index out of range on empty line in authorized_keys
2017-05-31 14:59:16 -05:00
Peter V. Saveliev
e51e5c7e2f unit tests: add pyroute2 interface dict test
Bug-Url: https://github.com/saltstack/salt/pull/41487
Bug-Url: https://github.com/saltstack/salt/issues/41461
2017-05-31 20:57:44 +02:00
Tomas Zvala
916fecb64f modify ssh_test.py, to check empty lines and comments in authorized_keys #41335 2017-05-31 10:56:02 +02:00
rallytime
8c1dc36a8b Merge branch 'nitrogen' into 'develop'
Conflicts:
  - salt/modules/zypper.py
  - salt/utils/parsers.py
2017-05-30 10:20:44 -06:00
rallytime
675937e0ab Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - tests/unit/states/test_keystone.py
2017-05-30 10:16:14 -06:00
Nicole Thomas
f7411393e4 Merge pull request #41495 from isbm/bp-41405
Takeover from "rallytime:bp-41405"
2017-05-30 09:11:43 -06:00
Mike Place
491d4d941a Merge pull request #41430 from DSRCorporation/bugs/py3_tests_nitrogen
One more bunch of tests fixes.
2017-05-26 16:53:37 -05:00
rallytime
ff417db115 Merge branch 'nitrogen' into 'develop'
Conflicts:
  - doc/topics/venafi/index.rst
  - pkg/salt-proxy@.service
  - salt/config/__init__.py
2017-05-26 11:27:24 -06:00
Petr Michalec
6db8915021 Endpoint handling per region, fixes #35874
- extend tests for multiple regions
- region arg by default set to None
- print verbose changes to be exec.
2017-05-26 11:15:29 -06:00
Bo Maryniuk
fa5c2c1672 Add UT for unsupported operators 2017-05-25 12:55:46 -06:00
Bo Maryniuk
157b83c05a Lintfixes 2017-05-25 12:55:46 -06:00
Bo Maryniuk
43abd345b2 Add UT for operator conditions 2017-05-25 12:55:46 -06:00
Bo Maryniuk
1053daf2d0 Add UT for typecheck on the output data 2017-05-25 12:55:46 -06:00
Bo Maryniuk
5c1259834f Add UT for None type verification if version has been not passed 2017-05-25 12:55:46 -06:00
Bo Maryniuk
0dd27380b1 Add UT for wildcard finder usage 2017-05-25 12:55:46 -06:00
Bo Maryniuk
5e836a2543 Test the exact methods for matcher 2017-05-25 12:55:46 -06:00
Bo Maryniuk
2af4160a1a Add UT for exact match of the pattern at the beginning 2017-05-25 12:55:46 -06:00
Bo Maryniuk
5a2248d254 Add UT for exact match of the pattern at the end 2017-05-25 12:55:46 -06:00
Bo Maryniuk
334c634826 Add UT to match multiple asterisks 2017-05-25 12:55:46 -06:00
Bo Maryniuk
f73b39fd3c Add UT for matching all versions 2017-05-25 12:55:46 -06:00
Bo Maryniuk
a9c3c8bf03 Fix a docstring 2017-05-25 12:55:46 -06:00
Bo Maryniuk
344295666b Rename UT to a proper name 2017-05-25 12:55:46 -06:00
Bo Maryniuk
369b4bf127 Add unit test scaffold for wildcard support 2017-05-25 12:55:46 -06:00
rallytime
ff0def408b Whitespace fix 2017-05-25 10:26:06 -06:00
Dmitry Kuzmenko
7a9b4a92af Fixed syslog-ng test: it passes command as list, not as a string. 2017-05-25 14:33:43 +03:00
Dmitry Kuzmenko
6b0921e5ba Py3 tests fixes: don't mock non-callable objects with return_value.
mock = MagicMock(return_value='') works for functions: here mock() will
return the value (empty string). But mock returns the MagicMock object.
Not sure why but it worked in Py2, but in Py3 os.path.join(mock,
'something'), for instance, returns an error.

Fixed the issues by avoiding of using mocks where we can use simple
strings.
2017-05-25 12:33:43 +03:00
rallytime
9ff2694155 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - pkg/salt-minion.service
  - salt/modules/junos.py
  - salt/modules/localemod.py
  - salt/modules/win_system.py
  - salt/states/junos.py
  - tests/unit/modules/test_localemod.py
  - tests/unit/modules/test_win_powercfg.py
  - tests/unit/states/dockerng_test.py
2017-05-24 16:32:59 -06:00
Nicole Thomas
a924806d6e Merge pull request #41411 from rallytime/fix-haproxyconn-tests
Fix haproxyconn unit test failures
2017-05-24 13:01:29 -06:00
Mike Place
88fd3c0ed9 Merge pull request #41336 from mcalmer/fix-locale-on-SUSE
fix setting and getting locale on SUSE systems
2017-05-24 12:46:07 -05:00
Mike Place
49f93cb091 Merge pull request #41405 from isbm/isbm-zypper-wildcards-dev
Wildcards for Zypper
2017-05-24 11:57:42 -05:00
rallytime
68c277e5f7 Fix haproxyconn unit test failures
Too many arguments were being passed into the test function

This change removes the extra "mock" arg and the tests pass.

This issue was introduced in PR #40713

Fixes https://github.com/saltstack/salt-jenkins/issues/357
2017-05-24 10:41:38 -06:00
Bo Maryniuk
22732504a3 Add UT for unsupported operators 2017-05-24 16:29:59 +02:00
Bo Maryniuk
a579ffc166 Lintfixes 2017-05-24 15:19:39 +02:00
Bo Maryniuk
3d40688cd9 Add UT for operator conditions 2017-05-24 13:55:49 +02:00
Bo Maryniuk
0bf0950158 Add UT for typecheck on the output data 2017-05-24 13:55:49 +02:00
Bo Maryniuk
20ff494b93 Add UT for None type verification if version has been not passed 2017-05-24 13:55:49 +02:00
Bo Maryniuk
c806128d51 Add UT for wildcard finder usage 2017-05-24 13:55:49 +02:00
Bo Maryniuk
552b3265d0 Test the exact methods for matcher 2017-05-24 13:55:49 +02:00
Bo Maryniuk
561ae0b8c8 Add UT for exact match of the pattern at the beginning 2017-05-24 13:55:49 +02:00
Bo Maryniuk
b1ddcccda0 Add UT for exact match of the pattern at the end 2017-05-24 13:55:49 +02:00
Bo Maryniuk
4c9dd39118 Add UT to match multiple asterisks 2017-05-24 13:55:49 +02:00
Bo Maryniuk
8839f7219b Add UT for matching all versions 2017-05-24 13:55:49 +02:00
Bo Maryniuk
5988e3b5d3 Fix a docstring 2017-05-24 13:55:49 +02:00
Bo Maryniuk
508c439b2b Rename UT to a proper name 2017-05-24 13:55:49 +02:00
Bo Maryniuk
3b44018f58 Add unit test scaffold for wildcard support 2017-05-24 13:55:49 +02:00
Benjamin Drung
33a7f8b2ec Fix typos
lintian found several spelling errors.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-24 12:50:29 +02:00
rallytime
718b0adc70 Merge branch 'nitrogen' into 'develop'
Conflicts:
  - salt/modules/zypper.py
  - tests/unit/utils/test_network.py
2017-05-23 09:05:13 -06:00
Mike Place
b43b89c5fa Merge pull request #40713 from pgstenberg/feature-haproxyconnaddfunc
Additional functionality to the haproxy module
2017-05-22 12:11:32 -05:00
rallytime
c6c1d30c48 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/yumpkg.py
  - salt/spm/__init__.py
  - tests/unit/modules/test_zypper.py
  - tests/unit/utils/test_network.py
2017-05-20 17:07:34 -06:00
Mike Place
ebd8376ef4 Merge pull request #41328 from jpautler/dev/jpautler/hwclock_nilinuxrt_support
Update timezone get/set_hwclock for NILinuxRT systems
2017-05-19 13:04:21 -05:00
Michael Calmer
f30f5c8a25 fix unit tests 2017-05-19 13:28:52 +02:00
Mike Place
9f359d841f Merge pull request #41208 from pkazmierczak/pkazmierczak-zypper-multiple-ver-pkgs
Fix: zypper handling of multiple version packages
2017-05-18 10:44:26 -05:00
Jeffrey Pautler
6254b8f326 Update set_hwclock to only accept UTC on NILinuxRT
NILinuxRT systems do not support non-UTC timezones for hwclock, so
enforce that in set_hwclock.
2017-05-17 16:44:44 -05:00
Mike Place
9d9bf1c7f6 Merge pull request #41247 from mcdermj/develop
JunOS: Change os_install to use get_file instead of get_template
2017-05-17 13:46:15 -05:00
Mike Place
fe38c7cf5e Merge pull request #41282 from mcdermj/bp-41247
JunOS: Change os_install to use get_file instead of get_template
2017-05-17 13:25:26 -05:00
Piotr Kaźmierczak
d411a91676 Reverted back to cascading with statements for python 2.6 compat 2017-05-17 11:52:56 +02:00
rallytime
9668480fc5 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-05-16 19:58:21 -06:00
rallytime
76714d116b Mock calls to salt.utils.pkg.clear_rtag call in aptpkg unit tests 2017-05-16 16:00:37 -06:00
Piotr Kaźmierczak
7204013653 Compacted with statements in the unit test. 2017-05-16 22:48:09 +02:00
Piotr Kaźmierczak
6c4c08042c Added unit tests and copied the behavior to
.upgrade method, too.
2017-05-16 20:47:04 +02:00
Jeremy McDermond
3e481cb764 JunOS: Fix whitespace for PEP compliance 2017-05-16 10:00:58 -07:00
Jeremy McDermond
f1751d135a JunOS: Fix Unit Test
When adding the cp.get_file function, we need to add it into the list of
mock functions in the unit test along with get_template or the unit
tests will fail.
2017-05-16 10:00:50 -07:00
Jeremy McDermond
40eef0c0e3 JunOS: Fix whitespace for PEP compliance 2017-05-16 08:21:16 -07:00
Jeremy McDermond
7cdf7b3546 JunOS: Fix Unit Test
When adding the cp.get_file function, we need to add it into the list of
mock functions in the unit test along with get_template or the unit
tests will fail.
2017-05-15 16:12:19 -07:00
rallytime
d23010a114 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/aptpkg.py
  - salt/states/libcloud_dns.py
  - salt/states/pkg.py
  - tests/integration/modules/test_pkg.py
  - tests/unit/modules/test_mac_brew.py
  - tests/unit/modules/test_pkgutil.py
  - tests/unit/modules/test_zypper.py
  - tests/unit/states/libcloud_dns_test.py
2017-05-15 16:41:59 -06:00