summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* allow injecting tempfiles into Chef::HTTPlcg/chef-http-inject-tempfileLamont Granquist2017-12-192-19/+32
| | | | | | | | | use this to inject the tempfile from Chef::FileContentManagement::Tempfile closes #2401 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #6652 from sandratiffin/CHEF-3058Tim Smith2017-12-192-9/+29
|\ | | | | fix for data bag names partially matching search reserved words
| * fix for data bag names partially matching search reserved wordsSandra Tiffin2017-12-122-9/+29
| | | | | | | | Signed-off-by: Sandra Tiffin <sandi.tiffin@gmail.com>
* | Merge pull request #6690 from chef/tm+nk/verify-commandThom May2017-12-192-5/+27
|\ \ | | | | | | Slight improvements to validation failures
| * | feed chefstyletm+nk/verify-commandThom May2017-12-181-1/+1
| | | | | | | | | | | | Signed-off-by: Thom May <thom@chef.io>
| * | Slight improvements to validation failures. Shows the failing command if ↵Noah Kantrowitz2017-12-182-5/+27
| | | | | | | | | | | | | | | possible and doesn't show anything for sensitive resources to be safe. Refs https://github.com/chef/chef/issues/4793 and ping @chef/client-core for review.
* | | Merge pull request #6689 from chef/resource_provider_magicTim Smith2017-12-181-30/+24
|\ \ \ | |/ / |/| | Modernize cookbook_file resource and expand specs
| * | Modernize cookbook_file and expand specsTim Smith2017-12-181-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | Don't hardcode the provider since the provider already has a provides line Test the source logic default properly by creating the resource name as a absolute path, which is how the user would use it Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #6660 from chef/tm/credentialsThom May2017-12-182-60/+12
|\ \ \ | |/ / |/| | implement credential management
| * | Specify a profile on the command lineThom May2017-12-181-0/+2
| | | | | | | | | | | | Signed-off-by: Thom May <thom@chef.io>
| * | Generate a credentials fileThom May2017-12-141-60/+10
| |/ | | | | | | Signed-off-by: Thom May <thom@chef.io>
* | Merge pull request #6683 from chef/reboot_resourceThom May2017-12-181-0/+52
|\ \ | | | | | | Modernize reboot resource and add spec
| * | Modernize reboot resource and add specTim Smith2017-12-151-0/+52
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | These specs can't be written in a cross platform waymsu_and_cab_defaultsTim Smith2017-12-162-10/+0
| | | | | | | | | | | | | | | | | | The path helper does exactly what we expect it to and that makes this only work on *nix Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Fix bugs in handling 'source' in msu_package and cab_packageTim Smith2017-12-152-8/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The two issues fixed here: 1) cab_package did not require source, but didn't set it from the resource name so cab_package 'xyz.cab' would just fail since source was nil 2) msu_package would coerce the resource name and not package_name so if you overwrote the package name you would also have to set the source, although you wouldn't realize that until it failed oddly So the solution here is to set the source value to package_name by default and that gets coerced into a path as was previously done. This adds tests for this behavior and the coerce behavior itself to both resources. This fixes issue #6674 Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fix failing msu_package resource specsTim Smith2017-12-152-5/+5
|/ | | | | | | Actions are arrays now Since we properly set source as a name property name gets coerced into a source path as expected. This was a bug before. This also uncovered #6674 which I'll fix in another PR. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6654 from ↵Tim Smith2017-12-111-4/+11
|\ | | | | | | | | MsysTechnologiesllc/vasundhara/chef_windows_task_resource_not_idempotent_for_any_command windows_task: Fix resource isn't fully idempotent due to command property
| * [MSYS-731] Fix for [chef] windows_task resource isn't idempotent for any commandVasu11052017-12-111-4/+11
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Merge pull request #6618 from MsysTechnologiesllc/nim/on_logon_issueTim Smith2017-12-111-0/+16
|\ \ | | | | | | Invalid date error on windows_task with frequency :on_logon
| * | invalid date error on windows_task with frequency :on_logonnimisha2017-12-081-0/+16
| | | | | | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* | | Fix sneaky chefstyle violationstm/fix_chefstyleThom May2017-12-111-3/+3
| |/ |/| | | | | Signed-off-by: Thom May <thom@chef.io>
* | Merge pull request #6636 from EmFl/patch-1Thom May2017-12-101-1/+22
|\ \ | | | | | | Ensure data bags names can contain reserved words
| * | added test for data bag name containing reserved wordEmilien2017-12-091-1/+22
| | |
* | | Merge pull request #6628 from chef/more_taskTim Smith2017-12-082-18/+97
|\ \ \ | |/ / |/| | windows_task: Add additional input validation to properties
| * | Update the start_time spec for the new messageTim Smith2017-12-081-1/+1
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | These are all input validation errors so they should raise ArgumentError not ↵more_taskTim Smith2017-12-081-9/+9
| | | | | | | | | | | | | | | | | | RuntimeError Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Expect the right exceptionsTim Smith2017-12-081-23/+23
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Properly handle an ISO8601 duration of 0 secondsTim Smith2017-12-081-0/+3
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Add tests for invalid datesTim Smith2017-12-071-2/+21
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Improve the integer/string warning messageTim Smith2017-12-072-5/+5
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Validate the start_date is correctly passedTim Smith2017-12-071-1/+1
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | allow random_delay and execution_time_limit to be integers and properly validateTim Smith2017-12-071-11/+37
| | | | | | | | | | | | | | | | | | Also set the default the right way with execution_time_limit Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Validate that starttime is actually in HH:mm formatTim Smith2017-12-071-0/+10
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Test lowercase system users not requiring passwordsTim Smith2017-12-071-0/+5
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Add testing of sec_to_durTim Smith2017-12-071-0/+16
| |/ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #6631 from chef/jsinha/fix_svcadmThom May2017-12-081-5/+6
|\ \ | | | | | | Solaris: Fix svcadm clear to only run in maintenance state
| * | Fix svcadm clear to only run in maintenance statejsinha/fix_svcadmJaymala Sinha2017-12-071-5/+6
| |/ | | | | | | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io> Signed-off-by: Patrick Wright <patrick@chef.io>
* | fix alphabetic sorting of classeslcg/node-map-speedupLamont Granquist2017-12-071-0/+16
|/ | | | | | but we really shouldn't do this... Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Improve the passwordless user error, logic, and testsimproved_task_loggingTim Smith2017-12-062-14/+19
| | | | | | Specify exactly what we're checking for in the error. This needs to go into the docs site as well. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update resource specsTim Smith2017-12-061-14/+14
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Clarify that we're talking about the 1 and only SYSTEM user hereTim Smith2017-12-062-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6625 from chef/lcg/lwrp-test-speedupLamont Granquist2017-12-065-35/+56
|\ | | | | speedup lwrp tests
| * travis caught another speclcg/lwrp-test-speedupLamont Granquist2017-12-061-1/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * speedup lwrp testsLamont Granquist2017-12-064-34/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reset the global resource and provider handler maps before each and every test. note that mutation through the top-level keys will get preserved so this is not perfect, but deep-duping through every single test we run becomes expensive. this is sufficient to flush out the global state of all the test lwrp fixtures that we setup. it discovered several usage bugs where we either relied on this feature or where we were testing different fixtures from the ones we thought we were. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #6424 from chef/lcg/deep-merge-cache-rewriteLamont Granquist2017-12-064-54/+117
|\ \ | | | | | | Node attributes per-container lazy deep merge and deep merge performance improvements
| * | fixup some unit testslcg/deep-merge-cache-rewriteLamont Granquist2017-12-061-6/+7
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | remove more debugging and revert no-longer necessary fixLamont Granquist2017-12-061-4/+2
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | Per-container deep merge cachingLamont Granquist2017-12-063-47/+111
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the one-big top level deep merge cache with individual deep merge caches in every container. The Immutable container state becomes the deep merge cache. - Does not use a pure decorator style approach since that failed before because of ruby internals breaking things like `===` and `=~` on decorated objects, so we inherit (ultimately from Hash + Array). - The state being the container state is useful in ruby since APIs on Hash and Array poke around in internal state to make things fast. If we inherit from Hash/Array but don't have the correct internal state things go wonky. - Throwing away the internal state is equivalent to flushing the cache. - Since we throw away all linked objects when we do that, we flush at every level below the level being flushed (which is correct semantics). - If a user has a pointer to an old immutable object from a sub-level, that isn't mutated so the old object still contains the old view of the data (which I think is correct, although I have some doubts that its necessary, but it came along free for the ride). - When we reset the cache we do mutate the cache being reset, which might change data in held references. If this becomes an issue the fix would be to reset the cache at the level above by creating a new, "empty" ImmutableHash/ImmutableArray object and inserting it into the deep_merge_cache datastructure instead of clearing the internal state of the child object. I don't know practically how anyone would hit this, though, so would prefer to wait on doing that work until we see an actual bug report. - Because of the way ruby pokes around internally there's some weirdnesses like the pre-generation of the cache for all the values of a subarray when #each is called, which is due to the way that ruby walks through array-serialized hashes when called like: `Array#each { key, value| ... }` (which is an undocumented(?) thing in ruby). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fixup the functional testsTim Smith2017-12-061-2/+2
|/ | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6590 from mal/knife-ssh-prefixLamont Granquist2017-12-012-46/+122
|\ | | | | Knife SSH prefix option