summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Fix for Chocolate_resource options causing extra quotesKapil/Github-9413_Chocolate_resource_options_causing_extra_quotesKapil Chouhan2020-04-232-1/+30
| | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* Remove the unused simplecov depedencyTim Smith2020-04-211-11/+0
| | | | | | We're not actually running these coverage tests and even if we did they don't have high value since you can game the numbers without writing quality tests. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #9663 from damacus/remove/chef-10-metadata-paramTim Smith2020-04-201-12/+0
|\ | | | | Remove deprecated Chef-10 constraint handling
| * Stop handling the deprecated Chef version constraintsDan Webb2020-04-201-12/+0
| | | | | | | | | | | | | | | | | | handle_deprecated_constraints has been a work around since Chef 10 Remove old specs that checked that the metadata was transformed correctly Signed-off-by: Daniel Webb <dan.webb@damacus.io>
* | added multipackage support for pacman resourceIngo Becker2020-04-201-147/+65
| | | | | | | | Signed-off-by: Ingo Becker <ingo@orgizm.net>
* | Merge pull request #9627 from ↵Tim Smith2020-04-201-0/+37
|\ \ | | | | | | | | | | | | chef/Kapil/GitHub-2860_exception_raised_in_define_resource_requirements git resource: Fix for exceptions raised in why-run mode
| * | Fix for exception raised in define resource requirementsKapil/GitHub-2860_exception_raised_in_define_resource_requirementsKapil Chouhan2020-04-171-0/+37
| | | | | | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | | Merge pull request #7982 from chef/multi_packageTim Smith2020-04-171-174/+280
|\ \ \ | | | | | | | | Add multipackage support to homebrew
| * | | Use lamont's magic error handlingTim Smith2020-04-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tiny tweak to grab the first item so we actually get the hash back in the error handling. Given: ```ruby package %w{curl totally_junk_pkg} do action :upgrade end ``` ``` * No candidate version available for totally_junk_pkg ================================================================================ Error executing action `upgrade` on resource 'homebrew_package[curl, totally_junk_pkg]' ================================================================================ Chef::Exceptions::Package ------------------------- No candidate version available for totally_junk_pkg ``` Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Return empty hash from brew_info and avoid a bunch of nil checksmulti_packageTim Smith2020-04-171-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Properly handle unavailable packagesTim Smith2020-04-171-0/+10
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Remove some empty specs I left behindTim Smith2020-04-171-38/+1
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Fix the upgrade action specsTim Smith2020-04-171-25/+20
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Test install / remove / purge actionsTim Smith2020-04-171-39/+68
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Update specs for brew_cmd_outputTim Smith2020-04-161-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Add specs for available versionTim Smith2020-04-161-0/+12
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Update specs for brew_info and installed_versionTim Smith2020-04-161-93/+193
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Fix the load_current_resource specsTim Smith2020-04-161-17/+13
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Force requiring propertiesLamont Granquist2020-04-171-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All required properties are now required for all actions by default even if the action does not reference the property. In order to only make the property required for a subset of the actions, specify them as an array of symbols to the required options on the property. ``` property :whatever, String, required: %i{start stop} action :start do end action :stop do end action :enable do end action :disable do end ``` That property will be required for start+stop but not for enable+disable. There's an unaddressed edge case here where if you reference the property in an action which was not specified that it will also fail validation. That is correct behavior. We should probably dig into how to warn the user that they must either remove the reference to the property from that action or else to add the action to the list of required actions on the property. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | Merge pull request #9646 from chef/lcg/bootstrap-options-cleanupTim Smith2020-04-1711-317/+154
|\ \ \ \ | | | | | | | | | | Knife bootstrap options cleanup
| * | | | Knife bootstrap options cleanupLamont Granquist2020-04-1711-317/+154
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have issue that are caused by old code before merging of hash values were done correctly. The `config` hash correctly merges all options and should always be used. Knife plugins should never touch Chef::Config[:knife] values (either reading or writing from them). The `knife_config` should be converted to the `config` hash since it directly accesses Chef::Config[:knife] values. The `config_value()` helper should no longer be used. Very clearly most people started to use that when they should just use the config hash directly. That was intended to be used only when a knife cli option was being renamed and the former configuration value needed to be used as well. It has been cargo culted around as the way to access config values, and that should really stop. The DataBagSecretOption mixin has been cleaned up so that the cli options read+write only to the config[:cl_secret] and config[:cl_secret_file] values. The config file values go into config[:secret] and config[:secret_file]. The fact that those are the merged values in the `config` hash doesn't matter since only the cli should be writing to the first two and only the config file should be writing to the latter two. I don't know why it was made so complicated to begin with, but if there's some hidden chef-11.early backcompat there, then chef-16 deliberately breaks that. The use of `locate_config_value` helpers in all knife plugins is also discouraged (but they all implement those themselves), just use the config hash, which has the correct hash merge ordering. All of those need to be deleted. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | Add unit tests around Chef::VersionStringlcg/fix-platform-version-magicsaucLamont Granquist2020-04-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I guess this is minimum viable testing to ensure this doesn't break in the future. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | Remove some leftover spec junkohai_custom_resourceTim Smith2020-04-161-3/+0
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Merge ohai resource / provider into a single resourceTim Smith2020-04-162-86/+59
| |/ / |/| | | | | | | | | | | | | | Simplify this resource and squash some files Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #9666 from chef/eol_release_warningTim Smith2020-04-151-0/+16
|\ \ \ | | | | | | | | Add a warning to the end of the chef run for EOL releses
| * | | Simplify the logic + improve the specTim Smith2020-04-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use 2006 as the base year. Chef 15 goes EOL next year on 5-1-2021 so 2006 + 15 = 2021 and then we know it. Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Add a spec for the EOL warningsTim Smith2020-04-151-0/+16
| |/ / | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | add timeout propertydheerajd-msys2020-04-142-0/+6
| | | | | | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | | update specdheerajd-msys2020-04-141-2/+3
|/ / | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-13658-659/+659
| | | | | | | | | | | | | | | | 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>
* | make dep update fasterdheerajd-msys2020-04-131-1/+2
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | update filter for opensuse and fix depsdheerajd-msys2020-04-133-4/+4
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | update test for opensusedheerajd-msys2020-04-134-9/+220
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | remove support for SLES11dheerajd-msys2020-04-133-211/+0
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Update specs for the new class nameTim Smith2020-04-101-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Update spec/unit/resource/plist_spec.rb Tim Smith2020-04-101-24/+22
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-Authored-By: pete higgins <pete@peterhiggins.org>
* | Update spec/unit/resource/plist_spec.rb Tim Smith2020-04-101-1/+0
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-Authored-By: pete higgins <pete@peterhiggins.org>
* | Remove more contextsTim Smith2020-04-101-43/+24
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove a single contextmacos-resourcesTim Smith2020-04-101-19/+17
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add the plist resource from the macos cookbookTim Smith2020-04-101-0/+154
| | | | | | | | | | | | | | | | | | This is a very useful base resource for mac systems that allows us to write additional resources for managing macs. I've migrated their library into the resource itself to make it a single self-contained unit. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #9632 from chef/lcg/resource-partialsTim Smith2020-04-092-0/+128
|\ \ | | | | | | Add resource partials
| * | Add resource partialsLamont Granquist2020-04-082-0/+128
| |/ | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #9624 from chef/systemd_timerTim Smith2020-04-091-0/+70
|\ \ | | | | | | Add chef_client_systemd_timer resource
| * | Remove specs for integer assumptionTim Smith2020-04-091-9/+0
| | | | | | | | | | | | | | | | | | It's a string now Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Add chef_client_systemd_timer resourceTim Smith2020-04-081-0/+79
| |/ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | fix speclcg/fix-bootstrap-cli-optionsLamont Granquist2020-04-081-2/+2
|/ | | | | | | the bootstrap context isn't responsible for merging so this was always testing the wrong behavior Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9609 from MsysTechnologiesllc/VSingh/typos-fixesTim Smith2020-04-0752-114/+114
|\ | | | | Spell checking in comments and log messages
| * Add more typo fixesVivek Singh2020-04-0713-56/+56
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * some spec typosVivek Singh2020-04-0742-59/+59
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Really skip the reboot pending func test if a reboot is pendingBryan McLellan2020-04-061-5/+6
|/ | | | | | This looks like it never worked but we happened to never run into it until we added a desktop platform to the pipeline. Signed-off-by: Bryan McLellan <btm@loftninjas.org>