summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Added spec for Timeout function in Windows remove package codedheerajd-msys2016-09-061-0/+9
| | | | | |
* | | | | | tweak chef-solo run_lock timing testlcg/solo-test-loop-tweakingLamont Granquist2016-09-021-4/+4
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix the 'last' statements (my perl brain occassionally crops up in ruby code) and replace with a raise. of course this just swaps one exception for another, but this time its really intended to work this way. - swap the order of the expecations so that if we fails to see the waiting on the other process statement, but we blow up in both threads in the exception that was just added, we know we actually have a legit run_lock race condition that this code just found. does not fix this bug, just gets us a bit more information if it reoccurs. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | | Added fix for spaces in profile identifiers (#5159)Nate Walck2016-08-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added fix for spaces in profile identifiers * Added an attempt to test spaces in identifier names * Derp, bad merge * Fixed osx profile spec test
* | | | | Merge pull request #5248 from chef/lcg/linux-user-check-lockLamont Granquist2016-08-261-38/+19
|\ \ \ \ \ | | | | | | | | | | | | rewrite linux_user provider check_lock
| * | | | | 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>
* | | | | | Use symbols instead of strings as keys for systemd user property (#5241)Joshua Miller2016-08-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use symbols instead of strings as keys for systemd user property related funcs * Fix tests for provider/service/systemd for when user property is set * Change hash in systemctl_opts to use symbols instead of strings * Fix tests for chef/provider/systemd_unit.rb
* | | | | | Merge pull request #5249 from evan2645/use-upstart-goal-state-as-service-statusThom May2016-08-251-12/+27
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use upstart goal state as service status
| * | | | | | Use upstart goal state as service statusEvan Gilman2016-08-241-12/+27
| |/ / / / / | | | | | | | | | | | | | | | | | | Solves #5204
* | | | | | Allow flagging a resource property as sensitiveadamleff/sensitive-propertiesAdam Leff2016-08-251-0/+20
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some properties in custom resources may include sensitive data, such as a password for a database server. When the Resource's state is built for use by Data Collector or similar auditing tool, `Chef::Resource#state_for_resource_reporter` builds a hash of all state properties for that resource and their values. This leads to sensitive data being transmitted and potentially stored in the clear. This change enhances properties with the ability to set an individual property as sensitive and then have the value of that property suppressed when exporting the Resource's state.
* | | | | 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>
* | | | | Merge pull request #5243 from chef/lcg/rewrite-linux-user-providerLamont Granquist2016-08-243-23/+27
|\ \ \ \ \ | | | | | | | | | | | | Rewrite linux useradd provider
| * | | | | remove homedir in beforelcg/rewrite-linux-user-providerLamont Granquist2016-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | add func spec for default and fix unit specsLamont Granquist2016-08-232-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | clean up everythingLamont Granquist2016-08-232-16/+6
| |/ / / / | | | | | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | | Create and delete yum repositoriesThom May2016-08-246-8/+97
|/ / / / | | | | | | | | | | | | Signed-off-by: Thom May <thom@may.lt>
* | | | Merge pull request #5236 from chef/lcg/fix-useradd-test-filtersLamont Granquist2016-08-231-0/+12
|\ \ \ \ | | | | | | | | | | fix the useradd test filters
| * | | | 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>
* | | | Merge pull request #5233 from coderanger/notifstringNoah Kantrowitz2016-08-231-0/+46
|\ \ \ \ | |/ / / |/| | | Add a warning for guard blocks that return a non-empty string
| * | | Add a warning for guard blocks that return a non-empty string.Noah Kantrowitz2016-08-221-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will hopefully catch errors like this: myresource 'name' do not_if { 'some command' } end
* | | | 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>
* | | Merge pull request #5231 from chef/lcg/fix-func-useradd-specLamont Granquist2016-08-224-22/+18
|\ \ \ | | | | | | | | fix omnibus test breaks
| * | | 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
| * | | try to fix el breaksLamont Granquist2016-08-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the default behavior of the remove action changed to have manage_home set toi true to match the :create action Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | | also fix typo in windowsLamont Granquist2016-08-221-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | | 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-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Stop using obsolete URI.escape; use Addressable::URI instead.John Keiser2016-08-221-2/+4
|/ / / | | | | | | | | | See http://stackoverflow.com/questions/2824126/whats-the-difference-between-uri-escape-and-cgi-escape#answer-13059657 for details on why.
* | | Fix TinyServer races.jk/tinyserver-raceJohn Keiser2016-08-229-74/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Wait for the start callback rather than the do block, as it happens later. This prevents us from getting into many conditions where the start returns before the server is fully initialized, where if stop() is called too soon after start returns, it would cause exceptions. 2. Wait for the thread to finish completely 3. Use Thread.current.abort_on_exception` to show the actual listen errors, so that problems like this can be diagnosed. 4. Use :each to start and stop TinyServer so that race conditions like this are exposed earlier and more often (this will let us rid ourselves of them more quickly). 5. Use WEBrick::HTTPServer directly, which gets rid of the need for the complicated trap workaround (rack is the one that traps).
* | | Merge pull request #5223 from chef/jkeiser-patch-1Lamont Granquist2016-08-221-3/+2
|\ \ \ | | | | | | | | Stop logging "SIGQUIT is not a command" in tests
| * | | Stop logging "SIGQUIT is not a command" in testsjkeiser-patch-1John Keiser2016-08-181-3/+2
| | | | | | | | | | | | This looks like a typo was introduced; we're seeing this in the logs on nodes.
* | | | user provider manage_home behavior and refactorLamont Granquist2016-08-199-65/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #5222 from chef/lcg/solo-test-speedupLamont Granquist2016-08-181-20/+6
|\ \ \ \ | | | | | | | | | | speed up solo test
| * | | | use the chef log file for IPClcg/solo-test-speedupLamont Granquist2016-08-181-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when running on my mac this entirely removes all the sleeps Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | | | speed up solo testLamont Granquist2016-08-181-16/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removes the requirement that the second wait for the first, just that one of them waits for the other, so if we ever somehow lose that race and the second wins the run_lock as long as the first sleeps then its all good... drops all the sleeps down a lot, thinking about how to make this more cleverer so that it doesn't sleep but handshakes properly so that we don't need 25 seconds of sleep on slowaris tests.. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-17154-1512/+1583
|/ / / | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Fix race where lockfile can be created but not yet acquiredJohn Keiser2016-08-171-4/+8
| | |
* | | Merge pull request #5215 from chef/jk/windows-ruby-2.3John Keiser2016-08-171-1/+70
|\ \ \ | | | | | | | | Don't use relative_path_from on glob results
| * | | Don't use relative_path_from on glob resultsjk/windows-ruby-2.3John Keiser2016-08-161-1/+70
| | | | | | | | | | | | | | | | Windows Ruby 2.3 translates pathnames like ADMINI~1 to Administrator, making the comparison fail.
* | | | fix Style/VariableName copLamont Granquist2016-08-162-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | fix some Style/TrailingWhitespaceLamont Granquist2016-08-161-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | I'm not sure how this happened Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | fixing Style/ConstantName copLamont Granquist2016-08-161-4/+4
| | | |
* | | | fixing Lint/Void copLamont Granquist2016-08-164-13/+13
| | | |
* | | | fix Lint/UselessAccessModifier copLamont Granquist2016-08-162-22/+16
| | | |
* | | | fix Lint/UnderscorePrefixedVariableName copLamont Granquist2016-08-162-10/+10
| | | |
* | | | autofixing Style/WhileUntilModifier copLamont Granquist2016-08-164-15/+5
| | | |