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
rallytime
bde9d6cdc0
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-05-15 16:29:13 -06:00
Mike Place
50d8fde123
Merge pull request #41101 from terminalmage/issue40940
...
Fix "latest" keyword for version specification when used with aggregation
2017-05-15 11:52:35 -05:00
Dmitry Kuzmenko
b10730d8a1
Py3: Fixed timezone test.
2017-05-15 19:40:57 +03:00
Adam Mendlik
bec23de76f
Add function kernelpkg.upgrade_available to kernelpkg module
...
This function return a True/False value if a newer kernel
is available in the package repositories.
2017-05-11 18:09:14 -06:00
rallytime
4100e2b6a6
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-05-10 15:32:33 -06:00
rallytime
9014033726
Use LoaderModuleMockMixin for setting up default grains/salt dunders
2017-05-10 13:49:43 -06:00
rallytime
c282533612
Use with patch.dict for timezone.__grains__ dictionaries
2017-05-10 10:32:24 -06:00
rallytime
baa8e3f5a6
Move new timezone_test.py tests over to test_timezone.py tests
2017-05-09 16:33:18 -06:00
rallytime
ef0df4a954
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- salt/modules/win_network.py
- salt/modules/win_pkg.py
- salt/utils/gitfs.py
- tests/unit/modules/test_win_network.py
- tests/unit/states/test_file.py
2017-05-09 14:32:49 -06:00
Mike Place
a2f359fa13
Merge pull request #40852 from isbm/isbm-fix-coregrains-constants-bsc#1032931
...
Isbm fix coregrains constants bsc#1032931
2017-05-09 12:35:45 -06:00
Loren Gordon
06c46b48f3
Adds a function to list all users from shadow file
2017-05-09 12:58:12 -04:00
Bo Maryniuk
f3b12a3f5b
Do not use multiple variables in "with" statement as of lint issues
2017-05-09 10:17:49 +02:00
Bo Maryniuk
35a8d99934
Disable the test for a while
2017-05-08 13:49:54 +02:00
Bo Maryniuk
76cb1b7150
Rewrite test case for using no patch decorators
2017-05-08 10:41:50 +02:00
Erik Johnson
dcb0d63883
Update test to reflect additional calls to os.path.isfile()
2017-05-06 01:51:11 -05:00
Erik Johnson
772167306c
Merge pull request #41015 from gtmanfred/docker
...
Allow docker.call to run as non-root user
2017-05-06 01:21:05 -05:00
Erik Johnson
2af89beb53
Merge pull request #41103 from lorengordon/win.get_route
...
Adds a get_route() function to win_network.py
2017-05-06 01:19:41 -05:00
Erik Johnson
92011dbe5f
Fix "latest" keyword for version specification when used with aggregation
...
The "latest" keyword was only implemented when both "name" and "version"
were used, and not for "pkgs". But mod_aggregate puts all packages into
a single low chunk, within "pkgs". This means that using aggregation in
conjuntion with the "latest" keyword no longer resolves the latest
version and thus breaks these states.
This fixes the problem by moving the logic for resolving the "latest"
keyword into _find_install_targets(). It also makes some improvements to
the logic we use to ensure only one package DB refresh is performed per
Salt run, by making the pkg.refresh_db functions handle removing the
rtag file, instead of requiring a call to a helper function everywhere
in the pkg state where we might be calling a function that refreshes the
package DB.
2017-05-06 00:46:06 -05:00
Loren Gordon
93ce5644ea
Adds test for win_network.get_route
2017-05-05 17:32:50 -04:00
Mike Place
330e717150
Merge pull request #40977 from amendlik/kernelpkg
...
kernelpkg module
2017-05-05 10:21:12 -06:00
Adam Mendlik
2bc930acb3
Fix linter errors
2017-05-05 06:27:37 -06:00
Adam Mendlik
9f13ce9ee2
Fix kernelpkg.latest_available when no upgrades are available
2017-05-05 05:51:11 -06:00
Adam Mendlik
741fd9d1ee
Rename kernelpkg.current to kernelpkg.active for clarity
2017-05-04 19:15:04 -06:00
rallytime
b93e35dd06
Merge branch 'nitrogen' into 'develop'
...
Conflicts:
- salt/engines/docker_events.py
2017-05-03 10:00:24 -06:00
Daniel Wallace
97e67e262f
fix unit tests for dockermod
2017-05-02 18:50:03 -06:00
Mike Place
044e0b2063
Merge pull request #40860 from twangboy/change_broadcast
...
Remove dependency on win32gui
2017-05-02 10:45:51 -06:00
Adam Mendlik
74c7899f2a
Rename kernelpkg module files to kernelpkg_linux_<pkgmanager>
...
This groups them together lexicographically and makes it clear which
package manager each one supports.
2017-05-01 18:22:34 -06:00
Erik Johnson
26d2f4a52a
Do not automatically unmask services to start/restart/etc. them
2017-05-01 16:01:35 -05:00
Mike Place
9d12a614b7
Fix failing test
2017-05-01 11:50:39 -06:00
Anthony Shaw
77cdd3c2dc
backward compatibility with older versions of libcloud where snapshots don't have a name field
2017-05-01 21:05:33 +10:00
Anthony Shaw
e85f1a4314
snapshot name seems to be a recent addition
2017-05-01 14:28:54 +10:00
Adam Mendlik
e2524656c4
Add execution modules to manage Linux kernel packages
2017-04-30 12:53:48 -06:00
Anthony Shaw
7ec1d6ba83
lint fixes
2017-04-30 21:49:54 +10:00
Anthony Shaw
1c4a03c538
key pair management methods and tests, linting
2017-04-30 20:28:20 +10:00
Anthony Shaw
06e94dcb58
add image management methods and tests
2017-04-30 19:49:54 +10:00
Anthony Shaw
277933e8d8
add volume, list_images, snapshot methods and tests
2017-04-30 15:04:50 +10:00
Anthony Shaw
3f8827f6b4
add list_volumes
2017-04-29 15:54:59 +10:00
Anthony Shaw
ec95304153
destroy and reboot node
2017-04-29 15:45:07 +10:00
Anthony Shaw
cc40734255
implement list_locations
2017-04-29 15:33:20 +10:00
Anthony Shaw
3c6f13699b
unit tests for list_nodes and list_sizes with implementation
2017-04-29 15:24:15 +10:00
rallytime
f875ee3309
Merge branch 'nitrogen' into 'develop'
...
Conflicts:
- tests/integration/runners/test_runner_returns.py
2017-04-28 09:26:26 -06:00
Pedro Algarvio
e6ee82e7be
The expected error message is different on py2 and py3
2017-04-28 13:36:45 +01:00
Pedro Algarvio
abe608d739
Drop @patch
usage
2017-04-28 13:36:42 +01:00
Pedro Algarvio
4b59c351e4
This branch no longer targets py 2.6
2017-04-28 13:33:37 +01:00
Pedro Algarvio
9ffc79ca67
Use tornado HTTPClient directly.
2017-04-28 13:33:35 +01:00
Pedro Algarvio
7480a8e5fb
Check status on setUp
not on the module level @skipIf
decorator
2017-04-28 13:33:34 +01:00
Mike Place
78011f8740
Merge pull request #40761 from meaksh/develop-pkg-minor-fixes
...
Minor fixes on new pkg.list_downloaded
2017-04-28 06:32:48 -06:00
twangboy
e8d440b543
Mock win32api instead of win32gui
2017-04-26 12:41:13 -06:00
Pablo Suárez Hernández
9b241b7338
Adapting Zypper test to new list_downloaded output
2017-04-26 12:35:27 +01:00
Pablo Suarez Hernandez
ddf98e3fe3
Enhances pkg.list_downloaded information of a package
2017-04-26 12:34:13 +01:00
twangboy
fa8f9b55d8
Fix unit test, still mocking SendMessageTimout
2017-04-25 10:13:55 -06:00
Anthony Shaw
5dee8b12de
add support for custom algorithms and complementary test
2017-04-25 21:47:38 +10:00
Anthony Shaw
867e6c1ce5
tests for load balancer and lint for other modules, fixes for load balancer
2017-04-25 21:07:27 +10:00
Anthony Shaw
5f03b7a506
tests for load balancer and fixed issue with destroy balancer
2017-04-25 20:44:36 +10:00
Anthony Shaw
bb4ec6c4db
tests for the storage module
2017-04-25 20:27:52 +10:00
Bo Maryniuk
f71af0b625
Fix lint issues
2017-04-24 18:46:27 +02:00
Bo Maryniuk
0e6abb3e37
Add UT on set_hw_clock on Gentoo
2017-04-24 16:08:22 +02:00
Bo Maryniuk
a2b1d4638c
Add UT for set_hwclock on Debian
2017-04-24 16:08:22 +02:00
Bo Maryniuk
88e8184702
Add UT set_hwclock on SUSE
2017-04-24 16:08:22 +02:00
Bo Maryniuk
0cd590f927
Fix UT names
2017-04-24 16:08:22 +02:00
Bo Maryniuk
bee94ade63
Add UT for set_hwclock on RedHat
2017-04-24 16:08:22 +02:00
Bo Maryniuk
dfe2610d05
Add UT for set_hwclock on Arch
2017-04-24 16:08:22 +02:00
Bo Maryniuk
d000a8a6f5
Add UT for set_hwclock on solaris
2017-04-24 16:08:22 +02:00
Bo Maryniuk
d2614aedaa
Fix docstrings
2017-04-24 16:08:22 +02:00
Bo Maryniuk
6d782191dc
Add UT for set_hwclock on AIX
2017-04-24 16:08:22 +02:00
Bo Maryniuk
d303e0dd8a
Add UT for AIX on get_hwclock
2017-04-24 16:08:22 +02:00
Bo Maryniuk
86f2d83781
Add UT on Solaris
2017-04-24 16:08:22 +02:00
Bo Maryniuk
c3cafed6d5
Add UT for Debian on get_hwclock
2017-04-24 16:08:22 +02:00
Bo Maryniuk
d337c09357
Add UT for RedHat/SUSE platforms on get_hwclock
2017-04-24 16:08:22 +02:00
Bo Maryniuk
f25dc5c56c
Add UT for get_hwclock on SUSE platform
2017-04-24 16:08:22 +02:00
Bo Maryniuk
08e00c865c
Remove dead code
2017-04-24 16:08:22 +02:00
Bo Maryniuk
1216a0bf12
Add UT for get_hwclock on UTC/localtime
2017-04-24 16:08:22 +02:00
Bo Maryniuk
58676c568d
Add UT for Debian on set_zone
2017-04-24 16:08:22 +02:00
Bo Maryniuk
1b9ce37b1b
Add UT for gentoo on set_zone
2017-04-24 16:08:22 +02:00
Bo Maryniuk
6ed9be985e
Adjust UT to use correct grain for SUSE series
2017-04-24 16:08:22 +02:00
Bo Maryniuk
ce4c836a60
Add UT for set_zone on SUSE series
2017-04-24 16:08:22 +02:00
Bo Maryniuk
155a498b49
Doc fix
2017-04-24 16:08:22 +02:00
Bo Maryniuk
a40876cdac
Remove unnecessary mock patch
2017-04-24 16:08:22 +02:00
Bo Maryniuk
ffab2db213
Fix doc for RH UT
2017-04-24 16:08:22 +02:00
Bo Maryniuk
72388f7ae2
Add UT for RedHat's set_zone
2017-04-24 16:08:22 +02:00
Bo Maryniuk
11595d3a42
Refactor with setup/teardown
2017-04-24 16:08:22 +02:00
Bo Maryniuk
28072c9e41
Adjust the test so it is using the right grain for SUSE systems
2017-04-24 16:08:22 +02:00
Bo Maryniuk
7a0e4be4f8
Add unit test for get_zone and various platforms
2017-04-24 16:08:22 +02:00
Anthony Shaw
2b4d84ef3f
add a unit test to check the module starts correctly
2017-04-24 16:35:16 +10:00
Mike Place
6da806d1cc
Merge pull request #39850 from epcim/pr_fix_keystone_endpoints_multiregion
...
Fix endpoint handling per region
2017-04-23 04:00:00 -06:00
rallytime
a7eb8f717e
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-04-21 09:50:25 -06:00
Petr Michalec
ab1dd446e7
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-04-21 15:48:52 +02:00
Andrey Arapov
4c29c5f6ab
dockerng: avoid network duplication and add driver_opts
2017-04-21 08:52:55 +02:00
rallytime
d5b1241972
Skip tsl unit test when we hit an error due to OpenSSL and junos-eznc packaging conflict
...
he pip junos-eznc package, when installed with PyOpenSSL version 0.14 causes
this test failure. If you either remove junos-eznc, or upgrade PyOpenSSL
(current is 0.17) the test is happy. So, we need to handle this case in the test.
2017-04-20 17:02:33 -06:00
Pablo Suárez Hernández
bd1f170a05
Fixes Zypper unit test
2017-04-19 10:18:46 +01:00
rallytime
885419b3e7
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-04-17 13:27:58 -06:00
Mike Place
f7b062acd7
Merge pull request #40266 from meaksh/develop-pkg-improvements
...
[develop] Adding "pkg.downloaded" state and support for installing patches/erratas
2017-04-17 11:34:42 -06:00
Per-Gustaf Stenberg
a0d6f9d883
Fixed lint errors in haproxy module and unit-tests
2017-04-17 19:13:17 +02:00
Per-Gustaf Stenberg
bcd88b0fb2
Added wait_state function in haproxy module
2017-04-17 19:13:17 +02:00
Per-Gustaf Stenberg
0120e32cfb
added list_backends and get_backend function in haproxy module
2017-04-17 19:13:17 +02:00
Per-Gustaf Stenberg
438092126b
Added list_frontends in haproxy module with returned mock data
2017-04-17 19:13:17 +02:00
Per-Gustaf Stenberg
14b492b5b4
Fixed unit test comments for haproxy module
2017-04-17 19:13:17 +02:00
Pablo Suárez Hernández
fa9e7f01f7
Pylint fix
2017-04-17 14:18:09 +01:00
Pablo Suárez Hernández
40422ecd02
Adding more unit tests for Zypper module
2017-04-17 13:06:35 +01:00
Pablo Suárez Hernández
5701e90803
Adding unit tests for Zypper execution module
2017-04-17 13:02:08 +01:00
rallytime
f552dd63f3
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- pkg/windows/installer/Salt-Minion-Setup.nsi
- tests/unit/states/test_tomcat.py
2017-04-14 10:46:56 -06:00
Ch3LL
60724980ec
fix test_fstype test for mac
2017-04-13 12:04:20 -04:00
rallytime
749840ce5f
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-04-11 15:11:46 -06:00
rallytime
cd0adb82d6
Spelling fix
2017-04-11 13:35:38 -06:00
rallytime
36f7a6481b
Remove blacklisted loader usage of dunder variables
2017-04-11 12:16:15 -06:00
rallytime
2cd0c5e4ec
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- doc/topics/cloud/azurearm.rst
- salt/cloud/clouds/vultrpy.py
- salt/modules/aptpkg.py
- salt/modules/dockermod.py
- tests/unit/modules/dockerng_test.py
- tests/unit/modules/test_pillar.py
2017-04-10 14:09:25 -06:00
Chris Heald
5139275602
Add env
support for rvm.installed and rvm.do, opts
support for .installed
...
Currently, the RVM state has no way to pass environment variables (ie, RUBY_CONFIGURE_OPTS)
or compilation flags (-C, --patch) to the Ruby installer. This patch enables this
functionality, permitting installation of customized Ruby installs. For example, the following
should now work:
ruby-2.3.0:
rvm.installed:
- env:
- RUBY_CONFIGURE_OPTS: --with-jemalloc
- opts:
- '--patch /path/to/my.patch'
- '-C --enable-shared,--with-readline-dir=$HOME/.rvm/usr'
2017-04-10 12:40:56 -07:00
Nicole Thomas
93818257cb
Merge pull request #40591 from rallytime/merge-nitrogen
...
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-04-10 12:07:16 -06:00
rallytime
5a419b8aae
Merge branch '2016.3' into '2016.11'
...
Conflicts:
- salt/modules/pillar.py
2017-04-07 11:23:41 -06:00
rallytime
4a75675d07
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- doc/topics/cloud/azurearm.rst
- salt/modules/aptpkg.py
- salt/modules/dockermod.py
- tests/unit/modules/dockerng_test.py
2017-04-07 11:20:51 -06:00
Erik Johnson
0c608d7417
Add client_args_mock back to test
...
I removed this incorrectly in resolving a merge conflict.
2017-04-07 08:50:45 -05:00
Nevins Bartolomeo
b3a4d016c9
Mock cmd.run_stdout not cmd.run
2017-04-06 16:48:10 -04:00
Erik Johnson
cb4db56eb5
Allow pillar.get to merge list as well as dictionaries
...
This also gets rid of the exception that used to be raised when the
default was not of the proper type, and instead skips merging in those
cases.
2017-04-06 12:24:22 -05:00
Erik Johnson
a6d68f50fe
Merge remote-tracking branch 'upstream/2016.3' into merge-2016.3-2016.11
2017-04-06 10:15:47 -05:00
Pedro Algarvio
843e218572
Remove unmocked patching
2017-04-05 23:17:36 +01:00
Nicole Thomas
4d7871e4d7
Merge pull request #40494 from rallytime/merge-develop
...
[develop] Merge forward from 2016.11 to develop
2017-04-05 14:15:05 -06:00
Mike Place
8da27c9e1d
Merge pull request #40306 from terminalmage/issue40279
...
Don't use context caching for gathering systemd services
2017-04-04 14:36:38 -06:00
Pedro Algarvio
de9ccbdb43
Fix mocked test
2017-04-04 18:58:21 +01:00
Pedro Algarvio
61003bca0a
Take care of resource leakage on tests
2017-04-04 18:58:20 +01:00
Pedro Algarvio
4a43d00d80
Proper mocking
2017-04-04 18:58:19 +01:00
Mike Place
6056ee302a
Merge pull request #40339 from s0undt3ch/features/py3-pt2
...
[WIP] Move unit tests which were in integration tests - More py3 and mocking fixes
2017-04-04 10:21:46 -06:00
Eric Radman
3299f5b2ea
Add mocks to allow keyboard tests to function on non-Linux systems
2017-04-03 22:11:38 -04:00
Mike Place
17808e7181
Merge pull request #40480 from terminalmage/docker-auth-handling
...
Improved Docker auth handling and other misc. Docker improvements
2017-04-03 16:44:48 -06:00
Mike Place
55fa3c12fa
Merge pull request #39874 from kiorky/fixup_fail_rc
...
Make returncode friendly to onfail requisites
2017-04-03 15:28:50 -06:00
Erik Johnson
c526e8c7b0
Improved Docker auth handling and other misc. Docker improvements
...
This commit changes how we handle Docker authentication. We no longer
try to auth when pushing/pulling images. This was initially done based
on a misunderstanding of how authentication was handled in docker-py.
docker-py will automagically use the base64-encoded username/password
combination stored in config.json if present, so we don't need to auth
at all for push or pull, docker-py will handle all of that. We just need
to make sure that we get the auth info into the config.json. To do this
I have added a login() function to the execution module, which uses the
Docker CLI to authenticate (with output_loglevel set to "quiet" to
suppress any logging of the credentials). The CLI is used in this
instance because docker-py provides no interface by which to persist a
login in the config.json; it can read from the file, but is not designed
to *write* to it. Rather than trying to write to this file ourselves,
and potentially breaking it when (not *if*) Docker decides to change the
internal format of the JSON data structure, using the CLI is a way of
future-proofing the authentication logic.
Context caching of the docker-py client instance has also been removed.
Context caching was used based on the same incorrect understanding of
how docker-py handles authentication, and sought to avoid repeated login
attempts. As that is no longer a concern, there is no need to cache the
client instance in the context dunder because we don't really gain a
performance benefit from it.
The _image_wrapper() function has been removed, as it no longer serves
any purpose, and the image-specific code in it that was still needed
has been absorbed into the _client_wrapper() helper. The functions which
used the _image_wrapper() helper (like push() and pull()) now use
_client_wrapper().
Additionally, the decorators used to enforce a minimum Docker version
(or Docker API version) have been removed. These are not necessary since
docker-py handles raising exceptions when a given feature is not
supported by the effective API version. The _client_wrapper() helper
function now checks for miscellaneous docker exceptions by catching the
docker.errors.DockerException class, which is the base class for the
custom exceptions raised by docker-py, and by doing so catches exceptions
raised due to API version incompatibility (and more).
The list of functions in the top-level docstring has been removed as it
is very out-of-date, and is somewhat superfluous anyway given that we
have for some time now had a list of the functions on the right side of
the page in the documentation.
Other changes:
- Fixed a bug I introduced when I overhauled the
docker_container.running state, in which a container with no changes
to be made, which was not running, would be started by the state even
when test=True was passed.
- Custom registry image names are now properly identified. The colon in
the hostname of the custom registry was previously causing incorrect
identification of the image name and tag, when no explicit tag was
being passed (e.g. localhost:5000/myimage).
- When configuring credentials, the creds for the Docker Hub can be
configured under a registry named ``hub``. This keeps the user from
having to figure out the registry URL and configure it in their Pillar
data, and thus makes using this module easier.
- Removes the email address from the documentation for credential
configuration. This was probably initially added because docker-py
accepts it as an argument, but it is entirely ignored for purposes of
authentication (even by docker-py) and is thus unnecessary. Relic of
an earlier time in Docker's history, perhaps?
- Fixed RST references to functions which weren't caught when this
module was renamed to dockermod.py
- Allow filter arguments in docker.networks to be passed as a
comma-separated list as well as a Python list, in keeping with general
usage elsewhere in Salt.
2017-04-03 13:29:28 -05:00
Erik Johnson
1e2a04cfc5
Backport auth and custom registry fixes from #40480 to 2016.3 branch
2017-04-03 13:20:53 -05:00
rallytime
24e812add6
Merge branch '2016.11' into 'develop'
...
Conflicts:
- salt/cache/__init__.py
- salt/grains/core.py
- salt/utils/gitfs.py
- tests/unit/cache/test_localfs.py
- tests/unit/modules/test_ssh.py
2017-04-03 10:17:11 -06:00
Pedro Algarvio
a0245b049f
Proper mocking.
2017-04-01 14:22:59 +01:00
Pedro Algarvio
22b15a134e
Proper mocking.
2017-04-01 14:22:58 +01:00
Pedro Algarvio
06bc81dc3d
Proper mocking.
2017-04-01 14:22:58 +01:00
Pedro Algarvio
9a11538b54
Stop using deprecated TestCase methods
2017-04-01 14:22:57 +01:00
Pedro Algarvio
83db7547e7
Proper mocking.
2017-04-01 14:22:55 +01:00
Pedro Algarvio
da7192014e
Py3 compat
2017-04-01 14:22:52 +01:00
Pedro Algarvio
d05028e88c
These are not integration tests
2017-04-01 14:22:51 +01:00
rallytime
55405bcd30
Renamed unit.modules.tuned_test.py to test_tuned.py and updated salttesting imports
2017-03-31 12:23:46 -06:00
rallytime
2d73fca4d0
Merge branch '2016.11' into 'develop'
...
Conflicts:
- salt/cloud/clouds/vmware.py
- salt/modules/win_dsc.py
- salt/modules/win_psget.py
- tests/unit/utils/vmware_test/test_cluster.py
- tests/unit/utils/vmware_test/test_common.py
- tests/unit/utils/vmware_test/test_connection.py
- tests/unit/utils/vmware_test/test_datacenter.py
- tests/unit/utils/vmware_test/test_host.py
2017-03-31 10:09:56 -06:00
rallytime
0da4c46b68
Merge branch '2016.3' into '2016.11'
...
Conflicts:
- salt/utils/__init__.py
- salt/utils/gitfs.py
- tests/unit/modules/ssh_test.py
2017-03-31 09:59:59 -06:00
rajvidhimar
8d83d482c5
Correct the junos unit tests which mock getattr
2017-03-31 16:19:21 +05:30
Mathieu Le Marec - Pasquet
fa2f9cf7bd
Make returncode friendly to onfail requisites
...
Ensure that correctly handled states execution (via onfail)
will return a 0 code if onfail requisites suceed.
2017-03-31 00:22:51 +02:00
Nicole Thomas
fbbe0127f5
Merge pull request #40432 from rallytime/merge-develop
...
[develop] Merge forward from 2016.11 to develop
2017-03-30 15:57:57 -06:00
Lukas Raska
24cc9b2a0c
[WIP] Refactor Elasticsearch execution and state modules ( #40192 )
...
* Add Ingest pipeline methods to Elasticsearch execution module
* Refactor Elasticsearch execution module and properly handle exceptions
* Throw CommandExecutionError in methods applicable for different Elasticsearch versions
* Refactor Elasticsearch states to reflect execution module changes
* Add state for managing Elasticsearch pipelines
* Fix few typos in Elasticsearch module, return None when deleted document doesn't exist
* Implements stats and health methods for Elasticsearch
* Add Elasticsearch methods to open/close index, manage search templates and repositories
* Merge existing Elasticsearch states into single one, add Search Template handling
* Add index alias state for Elasticsearch, fix documentation
* Catch all global exceptions in Elasticsearch states, unit test all of them
* Implement few Unit tests for Elasticsearch execution module, merge fixes into deprecated elastic states
* Implement additional unit tests for Elasticsearch execution module
* Finalize Elasticsearch module documentation
2017-03-30 13:22:58 -06:00
rallytime
1792acedc0
Merge branch '2016.11' into 'develop'
...
Conflicts:
- salt/template.py
- tests/unit/modules/dockerng_test.py
2017-03-30 12:32:24 -06:00
rallytime
762e08634a
Skip 2 junos module unit tests: "salt.modules.junos.getattr" patch stacktraces
2017-03-30 10:10:16 -06:00
Dheeraj
77a40a0c44
Lint fixes
2017-03-30 10:31:16 +05:30
Dheeraj
8c1adfafd5
More complete fix for 39692
...
The existing fix did not work if the profile name itself had a dash `-`.
For example - `virtual-guest`. This commit fixes that by using `split('- ')`
rather than `split('-')`. This commit also provides two simple tests for the
`list_()` function to emulate behaviour of both old and new tuned-adm versions
Fixes #39692
2017-03-30 10:31:16 +05:30
rallytime
99c8dcc18e
Handle AttributeError for dockerng_mod.docker attempt fails and docker is installed
...
When we hit that attribute error, we need to set the docker version
variable to a tuple starting with 0 so we can use it in other test
comparisons. If docker is installed, but at a lower version, we will
see this attribute error.
Fixes the test failure on the 2016.11 branch on CentOS 6 VMs.
2017-03-29 10:28:51 -06:00
rallytime
d61b9631c6
Update docker execution module unit tests for develop branch
...
This test module was updated for both the 2016.11 and develop
branches in different ways. This commits removes some of the
changes that were merged-forward from the 2016.11 branch and
restores the develop branch tests functionality.
2017-03-29 09:07:22 -06:00
rallytime
96259d6c63
Lint fix
2017-03-28 17:12:56 -06:00
rallytime
52edbffc85
Merge branch '2016.11' into 'develop'
...
Conflicts:
- doc/ref/cache/all/index.rst
- doc/topics/cache/index.rst
- salt/cache/localfs.py
- salt/modules/boto_rds.py
- salt/roster/cloud.py
- salt/states/virtualenv_mod.py
- tests/integration/states/test_archive.py
- tests/unit/modules/test_dockermod.py
- tests/unit/states/dockerng_test.py
2017-03-28 17:09:30 -06:00
rallytime
4f7ac1431e
Create a unit test for the _replace_auth_key function in the ssh module
...
References Pull Request #39855
2017-03-28 16:27:53 -06:00
Pedro Algarvio
4c17fad6b6
No need to use tests.unit.ModuleTestCase. Proper Mocking.
2017-03-28 19:04:04 +01:00
Pedro Algarvio
4baabcfb1e
Proper mocking. Some additional mocking and fixes.
2017-03-28 19:04:02 +01:00