summaryrefslogtreecommitdiff
path: root/spec/functional/resource/user
Commit message (Collapse)AuthorAgeFilesLines
* Update useradd test to account for new SUSE 12.1 behaviorTom Duffield2016-10-201-2/+4
| | | | | | | The `usermod` binary in SUSE 12.1 no longer throws an error if you attempt to unlock a user account that has no password. Signed-off-by: Tom Duffield <tom@chef.io>
* remove homedirs not owned by userLamont Granquist2016-08-241-1/+1
| | | | | | | userdel -r will not remove a homedir not owned by the user, have to manually rm -rf it. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove homedir in beforelcg/rewrite-linux-user-providerLamont Granquist2016-08-231-0/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add func spec for default and fix unit specsLamont Granquist2016-08-231-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add func test that manage_home is false by defaultLamont Granquist2016-08-231-0/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix the useradd test filterslcg/fix-useradd-test-filtersLamont Granquist2016-08-231-0/+12
| | | | | | | try to document it a bit better so i don't accidentally delete it again. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixed CHEF-2205 so fix the func testlcg/fix-rhel-func-testsLamont Granquist2016-08-221-9/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* i think i need a napLamont Granquist2016-08-221-1/+1
|
* be less cleverLamont Granquist2016-08-221-30/+25
| | | | instance_eval ran into namespace issues
* fix typo in mac testsLamont Granquist2016-08-221-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* no need for provider-resolver hereLamont Granquist2016-08-221-1/+1
| | | | | | mac always gets dscl, windows always gets windows Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* use provider resolver to get right resourceLamont Granquist2016-08-221-33/+30
| | | | 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 #4617 from chef/lcg/chefstyle-perfLamont Granquist2016-03-041-1/+1
|\ | | | | Autofixing new Perf cops in 0.37.2
| * Autofixing new Perf cops in 0.37.2Lamont Granquist2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | 6 Performance/Casecmp 18 Performance/Detect 1 Performance/RangeInclude 27 Performance/RedundantBlockCall 6 Performance/RedundantMatch 5 Performance/RedundantMerge 18 Performance/StringReplacement
* | Revert "Merge pull request #4465 from ↵tm/revert_4465Thom May2016-03-021-3/+0
|/ | | | | | | artursitarski/change-shell-for-locked-user" This reverts commit 94494e761763b877c3ef3b52eee9ac9df2186340, reversing changes made to a95a87d50c9e5af2fbd583afcf972880656d1a4b.
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-1/+1
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* skip uid check for aix in user add functional testsMatt Wrock2016-02-181-16/+9
|
* change shell to /bin/sh in user_add tests to fix aixMatt Wrock2016-02-161-1/+1
|
* Merge pull request #4465 from artursitarski/change-shell-for-locked-userThom May2016-02-161-0/+3
|\ | | | | Change shell for locked user.
| * Updated specartursitarski2016-02-021-0/+3
| |
* | 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-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | 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-023-3/+3
|/ | | 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"
* Set range of system user/group id to max of 200Jay Mundrawala2016-01-261-3/+3
| | | | | | | | | | | | | | According to https://abcofaix.wordpress.com/tag/usermod/, the value can be up to 200. We were seeing tests on our aix testers fail with ``` 1) Chef::Provider::User::Useradd action :create when the user does not exist beforehand when a system user is specified ensures the user has the properties of a system user Failure/Error: expect(pw_entry.uid.to_i).to be < uid_min.to_i expected: < 100 got: 101 # ./spec/functional/resource/user/useradd_spec.rb:306:in `block (5 levels) in <top (required)>' ```
* wrlinux is a derivative of RHEL and as such the default creation of user ↵tball/nexus7_more_failurestyler-ball2016-01-251-1/+1
| | | | home directory is expected
* Test failures for the Cisco Nexus 7 platform in Manhattan. It cannot have ↵tyler-ball2016-01-211-4/+4
| | | | uppercase users
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-1/+1
| | | | | | 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-143-31/+31
| | | | | | | 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-1/+1
| | | | chefstyle -a fixed 1044 occurrances
* ignore gid on windows and warn to use groupMatt Wrock2015-10-081-0/+8
|
* Move `skip` for useradd test to metadatadanielsdeleo2015-05-261-8/+7
| | | | | Otherwise we run useradd provider prior to the before block with the example-level `skip` being called.
* Fix overridden method `skip` causing arity failuresdanielsdeleo2015-05-261-10/+3
|
* Purge pending specscleanup-pendingdanielsdeleo2015-05-231-4/+4
| | | | RSpec isn't a bug database
* Added functional tests for user resource on windowsJay Mundrawala2015-05-151-0/+125
|
* Use FileUtils to delete directoryjdm/useradd-specsJay Mundrawala2015-03-121-1/+1
|
* Use less common dir namesJay Mundrawala2015-03-121-14/+14
|
* Use User resource to cleanupJay Mundrawala2015-03-121-5/+4
|
* Freebsd stuffJay Mundrawala2015-03-121-1/+5
|
* Cleanup user directories if state was leftover from previous runJay Mundrawala2015-03-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We are seeing failures in our CI relating to state not being cleaned up in a previous run: ``` 1) Chef::Provider::User::Useradd action :create when the user already exists and home directory is updated and manage_home is enabled moves the home directory to the new location Failure/Error: user_resource.run_action(:create) Mixlib::ShellOut::ShellCommandFailed: user[TEST USER RESOURCE] (dynamically defined) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '12' ---- Begin output of ["usermod", "-d", "/home/bar", "-m", "cf-test"] ---- STDOUT: STDERR: usermod: directory /home/bar exists ---- End output of ["usermod", "-d", "/home/bar", "-m", "cf-test"] ---- Ran ["usermod", "-d", "/home/bar", "-m", "cf-test"] returned 12 # ./lib/chef/mixin/shell_out.rb:56:in `shell_out!' # ./lib/chef/provider/user/useradd.rb:42:in `manage_user' # ./lib/chef/provider/user.rb:137:in `block in action_create' # ./lib/chef/mixin/why_run.rb:52:in `call' # ./lib/chef/mixin/why_run.rb:52:in `add_action' # ./lib/chef/provider.rb:180:in `converge_by' # ./lib/chef/provider/user.rb:136:in `action_create' # ./lib/chef/provider.rb:145:in `run_action' # ./lib/chef/resource.rb:561:in `run_action' # ./spec/functional/resource/user/useradd_spec.rb:336:in `block (4 levels) in <top (required)>' ```
* dscl specs should only run on macjdm/dscl-fixJay Mundrawala2015-03-101-1/+1
|
* Dont run useradd_spec on osxjdm/osxJay Mundrawala2015-03-091-0/+1
|
* Modify dscl_spec to runJay Mundrawala2015-03-091-1/+0
|
* Fixed typo in test from #2823.Julian C. Dunn2015-01-281-1/+1
| | | | See https://github.com/chef/chef/commit/f445869cfa26b17e22a4266c58907b3619b749ae#commitcomment-9471756
* userdel functional test fixkaustubh-d2015-01-271-5/+18
|
* Update to RSpec 3.Claire McQuin2014-10-292-50/+50
|
* DSCL resource says it doesn't support OS X below 10.7, so don't run it on 10.6.Chris Doherty2014-09-291-1/+2
|