Commit Graph

28 Commits

Author SHA1 Message Date
Erik Johnson
4f0b3be20c Fix localemod tests (#35583)
This changes the mocking for the context variables to reflect changes
made in 5b12f03.
2016-08-18 20:56:20 -06:00
rallytime
2930df924e Update localemod_test systemd.sd_booted mock to use salt.utils.systemd.booted
This brings these tests inline with the changes made to salt.utils.systemd.booted
in #35510
2016-08-18 13:31:26 -06:00
Andreas Lutro
a31cdf1968 Fix and improve locale module for systemd
- parse localectl output when dbus module is unavailable
- use dbus/localectl whenever the system is detected to have been booted
  with systemd as the init system, regardless of os grain
- simplify and improve logic when parsing dbus/localectl
  - don't rely on exceptions to find the end of the locale params
  - make sure that all locale params get returned
2016-03-21 20:22:16 +01:00
Jorge Schrauwen
4d2fa2e2aa switch unit test to except CommandExecutionError 2016-01-25 19:30:09 +00:00
Jorge Schrauwen
98664445c7 Swapping one unknow for debian failed, because debian use a different
function internally. Switched to RedHat for the test as it returns
LANG=XYZ
2016-01-25 17:38:51 +00:00
Jorge Schrauwen
745f203ea3 unit test, better to test with unknown os_family, we expect "" result without patching cmd.run 2016-01-23 22:56:00 +00:00
Jorge Schrauwen
d153f43771 unit test was filling in fake os_familiy, new code skips the expensive cmd_run unknown os_family 2016-01-23 22:53:07 +00:00
Colton Myers
1cbfa06591 Remove heavily-mocked failing test 2015-09-17 14:38:05 -06:00
Colton Myers
26b6c92975 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/conf.py
    salt/config/__init__.py
    salt/modules/rh_ip.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/user.py
    salt/templates/rh_ip/rh7_eth.jinja
2015-09-17 11:10:37 -06:00
Colton Myers
274464a85b Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/topics/reactor/index.rst
    salt/cloud/clouds/digital_ocean_v2.py
    salt/modules/groupadd.py
    salt/modules/localemod.py
    salt/modules/mysql.py
    salt/modules/useradd.py
    salt/modules/win_pkg.py
    salt/modules/win_useradd.py
    salt/netapi/rest_cherrypy/app.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/htpasswd.py
    salt/states/user.py
2015-09-14 14:39:03 -06:00
Evgeny Vereshchagin
8f77b743cd Use localectl for locale setting on Debian if available 2015-09-04 04:06:55 +03:00
Joe Julian
6108ec4280 Gated dbus for os families that use it
Gated the dbus include for os families that are currently using it
within this module at this time.

Renamed some defs to more appropriately express their function.
2015-09-01 15:19:49 -07:00
Colton Myers
e29be766bb Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    debian/changelog
    doc/man/salt.7
    salt/cloud/__init__.py
    salt/cloud/clouds/proxmox.py
    salt/cloud/clouds/vmware.py
    salt/config.py
    salt/fileclient.py
    salt/minion.py
    salt/modules/chocolatey.py
    salt/modules/localemod.py
    salt/modules/pacman.py
    salt/modules/pkgng.py
    salt/modules/schedule.py
    salt/modules/state.py
    salt/modules/win_file.py
    salt/modules/win_pkg.py
    salt/state.py
    salt/states/file.py
    salt/utils/args.py
    tests/unit/states/file_test.py
2015-07-30 16:54:44 -06:00
Andreas Lutro
dd2a188c05 fix tests 2015-07-23 15:17:18 +02:00
Colton Myers
60f2e9eefb Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop
Conflicts:
    doc/topics/development/contributing.rst
    salt/modules/tls.py
2015-05-26 16:38:42 -06:00
Justin Findlay
5eb97f0973 if a charmap is not supplied, set it to the codeset
Fixes #23221.
2015-05-22 14:48:39 -06:00
Colton Myers
6530a20340 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop
Conflicts:
    pkg/suse/salt.changes
    salt/modules/lxc.py
    salt/modules/ps.py
    salt/states/cloud.py
2015-05-18 11:39:43 -06:00
Justin Findlay
14c711eeb3 fix unit test mock errors on arch 2015-05-15 12:50:55 -06:00
Justin Findlay
f46db2c8cb move locale specifier utilities to utils/locales 2015-04-29 16:00:45 -06:00
Felix Dreissig
468d392074 Adjust tests to the new return value of modules.localemod.gen_locale() 2015-04-21 19:11:33 -06:00
Felix Dreissig
9e47d8ceba Adjust tests to the new return value of modules.localemod.gen_locale() 2015-04-18 20:41:14 +02:00
Justin Findlay
b1fe4f02c3 fix localemod unit tests for merge forward 2015-03-17 15:14:29 -06:00
Justin Findlay
b59a164717 fix merge forward localemod tests 2015-02-06 12:21:13 -07:00
Nicole Thomas
4b94cfb4dc Merge pull request #20269 from rallytime/refactor_localemod_tests
Fix broken localemod_test on develop
2015-02-02 12:56:56 -07:00
rallytime
a99b030e36 Mock salt.utils.which call 2015-02-02 11:55:11 -07:00
rallytime
3dbe1b30d6 Fix broken localemod_test on develop
- Fixed failing gen_locale test
- Refactor test to match refactored gen_locale function
- Break out gen_locale tests into inividual unit tests
2015-01-30 17:23:32 -07:00
Pedro Algarvio
0bc66403b9 Py3 compatibility 2015-01-30 23:37:00 +00:00
Rupesh Tare
3e2b08ca4f implemented unit test cases for localemod module 2015-01-30 18:22:27 +05:30