summaryrefslogtreecommitdiff
path: root/spec/unit/provider/user/solaris_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove require mixlib/shellouts where not necessaryrequire_the_right_shelloutTim Smith2018-07-101-1/+0
| | | | | | the dscl user provider uses mixin/shell_out instead and the specs don't seem to use mixlib/shellout or actually need the require. Signed-off-by: Tim Smith <tsmith@chef.io>
* Unification of shell_out APIsLamont Granquist2018-06-151-6/+6
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* clean up solaris providerLamont Granquist2018-05-101-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Solaris users are locked only if *LK*COOL-413/getent-on-solaris-doesnt-workTom Duffield2016-10-311-1/+2
| | | | | | | | | According to `man shadow` on Solaris 10 and 11, an account is only locked if the first four characters in the password field are `*LK*`. The same is true for SmartOS (the OS for which the initial code was contributed). Signed-off-by: Tom Duffield <tom@chef.io>
* Properly check lock status of user on solaris2Tom Duffield2016-10-311-8/+34
| | | | | | | | | On Solaris, the 'shadow' database does not exist within `getent`, so the checking for the username there won't return accurate results. As the Solaris provider assumes user management via /etc/shadow, we can very easily parse the contents of the file directly. Signed-off-by: Tom Duffield <tom@chef.io>
* Fix solaris handling for -m/-M behavior. Fixes #5403.Noah Kantrowitz2016-10-051-1/+9
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Style fixes.Noah Kantrowitz2016-09-201-1/+0
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Add a test for create_user to make sure we have no `-r`s.Noah Kantrowitz2016-09-191-0/+10
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Refactor these tests to be less repeat-y.Noah Kantrowitz2016-09-191-41/+36
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* user provider manage_home behavior and refactorLamont Granquist2016-08-191-3/+3
| | | | | | | | | split out the user provider into 1:1 resources. fix the behavior of the linux user provider to implement manage_home behavior correctly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #4427 from juliandunn/remove-duplicate-shellcmddefLamont Granquist2016-02-161-6/+8
|\ | | | | Refactor test to remove duplicate definition of ShellCmdResult
| * Refactor test to remove duplicate definition of ShellCmdResultJulian C. Dunn2016-01-181-6/+8
| |
* | Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-2/+2
| | | | | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* | Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | | | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* | Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-2/+2
|/ | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-27/+27
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* fix locking/unlocking users on SmartOSDave Eddy2015-09-021-9/+66
|
* fix more solaris provider lolwutlcg/rspec3-updatesLamont Granquist2014-10-241-2/+2
|
* updating resources/providers unit tests to rpsec3Lamont Granquist2014-10-241-7/+7
| | | | mechanically generated patch using transpec 2.3.7 gem
* s/stub!/stub/gLamont Granquist2014-01-291-5/+5
| | | | fix deprecation warnings
* [CHEF-4204] Fix solaris tests to not access shadow file.danielsdeleo2013-06-201-27/+19
| | | | | | | | - Update useradd shared examples to rely on let block defined provider object so custom method stubs can be added. - Stub methods that manipulate shadow file on the solaris provider in the shared examples. - Remove unnecessary test setup from solaris provider specific tests.
* Pass useradd commands as argv array instead of sh command.danielsdeleo2013-06-201-340/+50
| | | | | | | | | | | | | - Fixes CHEF-4204 - Useradd provider commands converted from single string to argv array. This bypasses use of bin/sh command interpretation, so there is no need to escape shell-significant characters (e.g., quotes, etc.). - Un-pending-ize useradd functional tests for arguments to useradd with single quote characters. - Update useradd unit tests to expect command as argv splatted arrays. - Extract useradd unit tests to a shared example group. - deduplicate test code between solaris and useradd unit tests using shared example group.
* [CHEF-4204] Convert useradd provider to shelloutdanielsdeleo2013-06-201-64/+28
| | | | | | | - Convert all run_command and popen4 calls to shell_out! - Update useradd tests - User::Solaris subclasses from Useradd, so update those tests, too. - Functional tests pass unmodified
* adding solaris specific provider testsLamont Granquist2013-04-221-0/+414