summaryrefslogtreecommitdiff
path: root/spec/unit/provider
Commit message (Collapse)AuthorAgeFilesLines
* More missed run_context references.remove-bad-test-filePete Higgins2020-06-261-2/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove test file that added a method to top-level scope.Pete Higgins2020-06-263-8/+5
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10074 from chef/lcg/win-unit-test-cherrypickLamont Granquist2020-06-261-1/+1
|\ | | | | Pick some of the unit test fixes from #10068
| * Pick some of the unit test fixes from #10068lcg/win-unit-test-cherrypickLamont Granquist2020-06-261-1/+1
| | | | | | | | | | | | This picks some of the more obviously correct looking fixes from #10068 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Remove other top-level methods defined in tests and do a little cleanup.other-test-cleanupPete Higgins2020-06-241-20/+17
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Fix some odd whitespacing in tests.Pete Higgins2020-06-247-36/+36
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Remove another top-level method from the test suite.Pete Higgins2020-06-241-22/+6
|/ | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10001 from chef/cron_cleanupTim Smith2020-06-151-49/+9
|\ | | | | Cron and Cron_d resource weekday property fixes
| * Moved all the constants together.antima-gupta2020-06-101-1/+0
| | | | | | | | | | | | | | | | | | Removed unnecessary assignment for weekday_in_crontab. Removed pry. Removed converted to a string function from weekday validation. Added unified_mode in cron and cron_d resources. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| * Added cron_shared partial.antima-gupta2020-06-101-6/+9
| | | | | | | | | | | | | | Fixed provider cron spec failure. Moved cron and cron resource into the lib/chef/resource/cron directory. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| * Fixed cron resource weekday property.antima-gupta2020-06-101-43/+1
| | | | | | | | | | | | | | | | | | Implemented same weekday functionality for cron_d resource. Fixed rspec failure. Added cron helper for weekday functionality Added spec for cron helper. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Add kitchen tests for snapdPhil Dibowitz2020-06-141-1/+1
|/ | | | Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Merge pull request #9932 from chef/script-resources-use-pipesTim Smith2020-06-053-155/+153
|\ | | | | Change script resources to use pipes rather than writing to temp files
| * Fix chefstyle.script-resources-use-pipesPete Higgins2020-06-031-2/+2
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
| * Adapt old tests from Script provider to Batch provider.Pete Higgins2020-06-031-0/+130
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
| * Move test of resource behavior to resource test.Pete Higgins2020-06-031-17/+0
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
| * Fix script provider tests.Pete Higgins2020-06-031-110/+20
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
| * Remove unnecessary cruft in test.Pete Higgins2020-06-031-25/+3
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
| * Fix test stub.Pete Higgins2020-06-031-4/+1
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Add specs and rename fingerprint -> short idzypper_repositoryTim Smith2020-06-051-10/+60
| | | | | | | | | | | | | | | | These aren't actually fingerprints. They're short key ids https://futureboy.us/pgp.html#ShortKeyID Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fixed Powershell_Package does not throw error when it cannot connect to ↵sanga172020-06-021-86/+95
|/ | | | | | powershell gallery Signed-off-by: sanga17 <sausekar@msystechnologies.com>
* Get lib/ free of spelling violations.Pete Higgins2020-05-182-3/+3
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Replace nonsense word with other silly words.Pete Higgins2020-05-181-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove useless testLamont Granquist2020-05-131-42/+0
| | | | | | | | We broke this and they didn't fail, refactored the code and fixed it and now they're failing. We've got coverage of this in the functional tests now Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9812 from chef/lcg/fix-unified-mode-launchdLamont Granquist2020-05-061-8/+8
|\
| * Update method name in launchd provider unit tests.lcg/fix-unified-mode-launchdPete Higgins2020-05-061-8/+8
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Align all our comments with the codeTim Smith2020-05-064-9/+9
|/ | | | | | Autocorrected with chefstyle after enabling that cop. It was very hard to read some complex autocorrected blocks w/o this. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix more ruby 2.7 warning logspamlcg/more-ruby-27-logging-suppressionLamont Granquist2020-04-282-44/+44
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9726 from chef/lcg/chef-16-gitTim Smith2020-04-232-5/+10
|\ | | | | Refactor scm, git and subversion resources & fix longstanding git issues
| * Chef-16 git provider fixesLamont Granquist2020-04-232-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git provider now no longer checks out to a "deploy" branch by default and now checks out to the branch (with a remote upstream) or else checks out to a detatched head. The prior behavior can be restored by using "checkout branch 'deploy'". This also removes the SCM resource base class and replaces it with a resource partial and does some internal reorganization. It also introduces the RecipeDSLHelper for better functional tests and cleans up the functional tests of the git provider. Properties that were only ever implemented on the git provider were removed from the subversion provider where they had been inherited from the base class incorrectly. Some additional env var handling was added to the subversion handler in the process of sorting out the common properties, including HOME handling for alternative users. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fix for Chocolate_resource options causing extra quotesKapil/Github-9413_Chocolate_resource_options_causing_extra_quotesKapil Chouhan2020-04-231-1/+1
|/ | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* 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>
* | | Merge ohai resource / provider into a single resourceTim Smith2020-04-161-84/+0
|/ / | | | | | | | | | | Simplify this resource and squash some files Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-1387-87/+87
|/ | | | | | | | 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>
* Add more typo fixesVivek Singh2020-04-074-5/+5
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* some spec typosVivek Singh2020-04-076-8/+8
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Merge pull request #9480 from chef/fix-clear-sourcesTim Smith2020-03-271-26/+211
|\ | | | | Fix unintuitive behavior of sources on gem resources