summaryrefslogtreecommitdiff
path: root/spec/integration
Commit message (Collapse)AuthorAgeFilesLines
* Remove the canonical DSLLamont Granquist2020-03-037-161/+70
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove the last bits of Appveyor from the specsappveyorTim Smith2020-02-281-2/+1
| | | | | | We don't have Appveyor anymore. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #8986 from ↵Lamont Granquist2020-02-242-5/+62
|\ | | | | | | | | MsysTechnologiesllc/VSingh/fix-knife-download-environments ChefFS & knife environment matching the output
| * ChefFS and knife environment matching the outputVivek Singh2019-10-142-5/+62
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Update HTTPServerException to be HTTPClientExceptionnet_http_deprecationsTim Smith2020-02-191-1/+1
| | | | | | | | | | | | | | | | Avoid deprecation warnings. Also remove the monkeypatch that provided HTTPClientException on older Ruby releases since we're 2.6+ now and we don't need this. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Cleanup the specs for the load_cookbooks warningsTim Smith2020-01-232-16/+0
| | | | | | | | | | | | Remove all these expects Signed-off-by: Tim Smith <tsmith@chef.io>
* | Use .load! in the Cookbook loader not .load_cookbooksTim Smith2020-01-231-28/+1
| | | | | | | | | | | | We added a deprecation warning to load_cookbooks and this is going to cause a ton of console spam for end users. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Provider a better error message in Chef::Cookbook::CookbookVersionLoaderTim Smith2020-01-233-43/+43
| | | | | | | | | | | | | | When this shows up in logs it's impossible to figure out what actually needs to be updated Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fixed failing specsVasu11052020-01-221-16/+17
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Fixed failing specsVasu11052020-01-223-0/+42
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Added more few more integration specsVasu11052019-12-232-1/+30
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Genrates metadata.json if not present and uploads it to chef server and ↵Vasu11052019-12-161-12/+32
| | | | | | | | | | | | deletes the local copy of it from chef repo Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Genrates metadata.json from metadata.rb if json file does not exist.Vasu11052019-12-162-5/+40
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Revert "Validate name argument for knife list"Tim Smith2019-11-121-11/+7
| | | | | | | | This reverts commit c29b8da2b0353bb5d6e499b5d7cc79c0fadab9b3.
* | Merge pull request #9059 from ↵Tim Smith2019-11-121-7/+11
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/VSingh/MSYS-1154_knife_list_relative_paths [knife list] Validate name argument & raise error if no args provided
| * | Validate name argument for knife listVivek Singh2019-11-051-7/+11
| | | | | | | | | | | | | | | | | | | | |  - Add required specs.  - Raise an error if no argument provided. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | | Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-086-11/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fix TypeError: no implicit conversion of nil into StringVivek Singh2019-11-031-0/+7
|/ | | | | |  - Now showing relevant logs for config.d configuration files. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Fix Windows Integration and Functional tests for BKJaymala Sinha2019-09-271-2/+4
| | | | | | | | | * Use default windows 2019 image * Skip 8dot3name tests as default disabled on 2019 * Use windows privileged executor for functional tests * Use windows docker image for chocolatey tests Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* fix comverge_if_changed to compare default valueslcg/converge-if-changedLamont Granquist2019-09-231-19/+19
| | | | | | | | Fixes #6300. This may be a breaking change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove app_server_support spec filelcg/remove-support-specLamont Granquist2019-08-283-34/+62
| | | | | | | | | | | | | Convert to using TinyServer and remove the duplicated functionality with the "app_server_support" helper. The fact that this change hits the knife raw / knife redirection specs that have so many timeout issues is very likely not a coincidence. I would bet a small, but not entirely insignificant amount of money that this makes those timeout issues go away. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix copypasta in title of the speclcg/fix-node-cookbooksLamont Granquist2019-08-261-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix node[:cookbooks] attributeLamont Granquist2019-08-261-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | closes #8817 Note that if any calling code winds up seeing this error message: ``` NoMethodError: undefined method `set_cookbook_attribute' for nil:NilClass ``` That means that the cookbook_collection was set before the node was set on the run_context. That wouldn't be a bug in core chef, that must be fixed in the caller to reverse the order of operations. Since I only made the positional arguments to the run_context constructor optional in Chef-15.0 though I don't expect this breaks any existing code written in the past month or two, but if anything crops up in the future, consider this a definitive statement that the caller must reverse the order of their operations and this error being thrown is a feature not a bug to be fixed. (The fact that we silently aborted rather than threw a NoMethodError on NilClass meant that we shipped this defect -- sometimes defensive programming can be overly defensive and swallow real errors). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add unified_mode switch for resourcesLamont Granquist2019-08-121-0/+876
| | | | | | | | | | | | | | | | | | | | | | | | | | This is inspired by "use_inline_resources". Setting `unified_mode false` in a resource would be the existing behavior with separate compile/converge phases. Setting `unified_mode true` in a resource will eliminate the converge phase. Reverse notifications and delayed notifications will still fire. The resource action will behave like all resources are executing at compile time. As a aside, notifications have never worked for resources firing at compile time. This implementation gets that behavior correct so that notifications will work. Of course forward immediate notifications to resources not yet declared will not be possible. Setting `resource_unified_mode_default true` in `Chef::Config` would turn off the split compile/converge mode for every custom resource. NOTE: This does not affect recipe mode at all. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix 4 copsLamont Granquist2019-07-053-3/+5
| | | | | | | | | | | | | | - Layout/MultilineMethodCallBraceLayout - Layout/ClosingParenthesisIndentation - Layout/IndentFirstArgument EnforcedStyle: consistent - Layout/BlockEndNewline the first of these autocorrected to horrible looking code which exposed that we really needed the other three as well, which also cleaned up a bunch of other terrible looking code. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolProcLamont Granquist2019-07-052-5/+3
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-0517-172/+172
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-1/+1
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-022-4/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-022-7/+7
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* more distro constantsMarc Chamberland2019-06-031-1/+1
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* distro constants for solo, zero and automateMarc Chamberland2019-05-232-4/+6
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* One missed fix on functionnal testTensibai2019-05-021-2/+2
| | | | Signed-off-by: Tensibai <tensibai@iabis.net>
* Remove chef-* binstubs from chef gemLamont Granquist2019-04-2910-32/+14
| | | | | | | | | | | | | | | | This is for the relicensing effort. Note that this PR leaves the knife and ohai binstubs still in the gem(s) while that discussion is still ongoing. This PR extracts the binstubs to chef-binstubs gem which is not intended to be redistributed outside of the omnibus chef binaries. A blank gem for chef-binstubs has been pushed to rubygems.org for obvious security concerns and so that bundler/rubygems can resolve the gem Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Update expected output to align with multi-line `ui.error` changesMarc A. Paradise2019-04-241-2/+2
| | | | | | Pun intentional. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
* addressing comments by coderangerMarc Chamberland2019-04-191-3/+3
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* Replacing workmarks with distro constantsMarc Chamberland2019-04-191-3/+3
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* Merge pull request #8077 from ↵Tim Smith2019-04-173-28/+242
|\ | | | | | | | | MsysTechnologiesllc/Vijay/MSYS-932_Fix_for_unable_to_access_databag_after_update_to_encrypt_data Allow encrypting a previously unencrypted data bag
| * Added Integration Rspecsvijaymmali19902019-04-173-28/+242
| | | | | | | | | | | | | | | | | | - Added specs for data_bag_create_specs - Added specs for data_bag_edit_specs - Added specs for data_bag_show_specs - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* | Allow empty strings in -o to result in empty override run listlcg/empty-override-runlistLamont Granquist2019-04-121-0/+67
|/ | | | | | | | | | | | | | | | | Previously this was not possible. Now you can do this: ``` chef-client -o "" ./foo.rb ``` And it will only run foo.rb and not any of the recipes in your run_list at all. Node will not be saved at the end. Useful to one-shot something like keyrotation (which still needs keys and needs to talk to the chef server API, so this is a different use case from simple chef-apply). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-112-66/+0
| | | | | | | | This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove checks for old versions of RubyTim Smith2019-02-284-21/+21
| | | | | | Some of this supports older versions of Ruby 2.1/2.2 and others support Ruby 1.8 Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove 'attributes' attribute from cookbook metadataTim Smith2019-01-221-2/+0
| | | | | | | | We have a foodcritic rule to tell people not to do this It's not being used anywhere and is just a pile of code we run for no reason We should start warning that it's an unknown attribute when cookbooks contain these as it's wasted effort on the part of cookbook authors Signed-off-by: Tim Smith <tsmith@chef.io>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-1552-545/+545
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-038-9/+9
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix the knife integration spec timeoutsLamont Granquist2018-11-082-11/+17
| | | | | | | | | rely on killing the thread to terminate the server, and rely on thread#join to correctly signal to the main thread that the server thread is dead, don't leak the server object out of the helper. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove Chef provisioning lazy loadingprovisioningTim Smith2018-11-021-20/+0
| | | | | | Remove the lazy loading of chef provisioning resources Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix a lingering rubocop issue.Noah Kantrowitz2018-07-111-28/+27
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Feed the rubocop.Noah Kantrowitz2018-07-111-22/+23
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* A few more test cases.Noah Kantrowitz2018-07-111-0/+52
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>