summaryrefslogtreecommitdiff
path: root/spec/support/shared/unit/provider/useradd_based_user_provider.rb
Commit message (Collapse)AuthorAgeFilesLines
* Replace nonsense word with other silly words.Pete Higgins2020-05-181-4/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-131-1/+1
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Removed method for defining return codes, changed to evaluate stderr on exit ↵skippy2019-11-191-15/+14
| | | | | | code 12 Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* Resolved all chefstyle failuresskippy2019-11-171-14/+14
| | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* re-un-inverted my previous 3am coding adventure in double negativesskippy2019-11-171-3/+3
| | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* Resolved failing tests, fixed inverted logicskippy2019-11-171-12/+21
| | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* Resolved issues with tests not receiving exactly what they expected.skippy2019-11-171-5/+5
| | | | | | Resolved new method in linux_user not returning the correct array. Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/DotPositionLamont Granquist2018-07-021-18/+18
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-10/+10
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-151-11/+11
| | | | | | | 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 updating_home?lcg/cleanup-userLamont Granquist2018-05-101-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixes for rubocop 0.49.1 engineLamont Granquist2017-06-201-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove a whole bunch more stubbed property stuff.Noah Kantrowitz2017-04-111-3/+3
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* add check for the centos why-run buglcg/linux-user-check-lockLamont Granquist2016-08-241-0/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* rewrite linu_user provider check_lockLamont Granquist2016-08-241-38/+16
| | | | | | | | | | | | this removes the kinda brittle kinda insane parsing of the installed rpm version. now we're just less strict about the exit 1 code and fail on the output not being what is expected. this also likely fixes a bug in rhel in why-run mode where shell_out! would have failed on the user-not-found and raised an exception that would have ended the run. the code before certainly looks buggy. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* sort out the -m / -M mess a bit betterLamont Granquist2016-08-231-9/+9
| | | | | | -M is not valid for usermod Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* clean up everythingLamont Granquist2016-08-231-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* user provider manage_home behavior and refactorLamont Granquist2016-08-191-32/+20
| | | | | | | | | 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>
* Revert "Merge pull request #4465 from ↵tm/revert_4465Thom May2016-03-021-4/+4
| | | | | | | artursitarski/change-shell-for-locked-user" This reverts commit 94494e761763b877c3ef3b52eee9ac9df2186340, reversing changes made to a95a87d50c9e5af2fbd583afcf972880656d1a4b.
* Merge pull request #4465 from artursitarski/change-shell-for-locked-userThom May2016-02-161-4/+4
|\ | | | | Change shell for locked user.
| * Updated specartursitarski2016-02-021-4/+4
| |
* | autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-1/+1
| |
* | auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
| | | | | | | | | | | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* | autofixing whitespace copsLamont Granquist2016-02-051-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* | 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-1/+1
|/ | | 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-2/+2
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-141-24/+24
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-4/+4
| | | | chefstyle -a fixed 1044 occurrances
* Update to RSpec 3.Claire McQuin2014-10-291-69/+69
|
* Add "force" attribute to resource/user, passing "-f" to userdelChris Aumann2014-07-081-1/+10
| | | | This allows removal of logged in users.
* fix should_not raise_error(SpecificException)Lamont Granquist2014-01-291-1/+1
|
* s/mock\(/double(/gLamont Granquist2014-01-291-7/+7
|
* s/stub!/stub/gLamont Granquist2014-01-291-15/+15
| | | | fix deprecation warnings
* CHEF-3582: Fix #check_lock under why-runBryan McLellan2013-11-061-0/+18
| | | | | | | | | We assume in whyrun mode that a non-existant user would be created before we attempt to lock it, so we return false from #check_lock when user does not exist and we are in why_run mode. Conflicts: chef/lib/chef/provider/user/useradd.rb
* Ensure usermod -d option comes before -m.danielsdeleo2013-06-211-5/+6
| | | | | - Fixes CHEF-4305 http://tickets.opscode.com/browse/CHEF-4305 - Fixes RHEL/CentOS 5 usermod bug uncovered by functional tests.
* [CHEF-4204] Fix solaris tests to not access shadow file.danielsdeleo2013-06-201-67/+65
| | | | | | | | - 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-0/+408
- 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.