summaryrefslogtreecommitdiff
path: root/spec/integration/client
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-131-1/+1
| | | | | | | | 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>
* Implement eager_load_libraries metadata optionLamont Granquist2020-04-031-2/+123
| | | | | | | | This implements RFC-40 from the old chef rfc repo: https://github.com/chef-boneyard/chef-rfc/blob/master/rfc040-on-demand-cookbook-libraries.md Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix all(?) circular requires coming from the specs.Ryan Davis2020-03-163-0/+3
| | | | | | | Lots more in lib, but that's out of scope for this. I'm just trying to make it easier to debug a failing spec when needed. Signed-off-by: Ryan Davis <zenspider@chef.io>
* 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>
* 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>
* Style/SymbolProcLamont Granquist2019-07-051-3/+1
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-053-82/+82
| | | | | | since we use double quotes, be consistent everywhere. 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-231-2/+3
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* Remove chef-* binstubs from chef gemLamont Granquist2019-04-293-23/+5
| | | | | | | | | | | | | | | | 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>
* 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>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-153-45/+45
| | | | | | | this is the result of changes to rules we already previously had enabled. 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 Layout/IndentHeredocLamont Granquist2018-07-023-221/+221
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-023-53/+53
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* check the path to --recipe-urlwindows-open-uriThom May2018-05-041-0/+6
| | | | | | Provide the user with feedback if it's invalid or missing. Signed-off-by: Thom May <thom@chef.io>
* Ensure we don't run tests on unsupported platformstm/fix_unix_testsThom May2018-05-022-2/+2
| | | | | | Our more esoteric unices need some more careful hand holding Signed-off-by: Thom May <thom@chef.io>
* fix legacy mode and legacy mode testsLamont Granquist2018-02-261-1/+1
| | | | | | | also more broadly applies the integration tests to legacy mode which was the original intent of the chef-solo tests in client_spec.rb here Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Don't use supervisor process for one-shot / command-line runsLamont Granquist2018-02-261-0/+98
| | | | | | | | without --interval we default to --no-fork, with --interval we default to running --fork. --once and --daemonize are handled before this code so they will also DTRT. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* lazily load cookbook_files and templatestm/even_lazierThom May2017-04-251-1/+0
| | | | | | Fixes: #6051 Signed-off-by: Thom May <thom@chef.io>
* Add tests for lazy load of cookbook filesThom May2017-04-251-0/+33
| | | | Signed-off-by: Thom May <thom@may.lt>
* couple of integration tests for Chef-13 formatterLamont Granquist2017-04-051-0/+38
| | | | | | | | make sure that we fail if we can see info logs at least (halfway decent check that we're not getting the logger when we're going through a pipe / not through a tty) Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* CHEF-13: remove magic from the logger/formatter settingsLamont Granquist2017-04-051-3/+2
| | | | | | closes #2514 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* RFC 59: Load Ohai pluginstm/ohai_plugins_2Thom May2017-04-051-0/+33
| | | | | | This adds a new phase in the compilation of the run context. Signed-off-by: Thom May <thom@chef.io>
* use rfc exit codesSteven Murawski2017-04-041-105/+1
| | | | Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
* fix spec that tested deprecations themselves using this warninglcg/nil-propertiesLamont Granquist2017-03-161-13/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* favor metadata.json over metadata.rbLamont Granquist2017-01-241-0/+33
| | | | | | | make sure that if we have a metadata.rb that is not valid to read that we never parse that and use compiled metadata.json instead. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix TinyServer races.jk/tinyserver-raceJohn Keiser2016-08-221-2/+2
| | | | | | | | | | | | | | | 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).
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* omit this chef-provisioning testLamont Granquist2016-08-161-0/+2
| | | | | | its always red on my mac Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* * define exit codesSteven Murawski2016-05-231-0/+245
| | | | | | | | | | | | * exit code functional specs * audit exit codes * reboot now/reboot failed/reboot pending exit codes * Deal with forked and unforked process and get the right exit code * Reboot Now should really be reboot scheduled * pass exception rather than exit code * updated with sigint and sigterm * support legacy fatal!("", 2) behavior * fixup all fatal! and exit! calls
* can't strip the PATH out of the env.Lamont Granquist2016-02-091-1/+1
| | | | | also add back a bunch of other ruby env vars so that our ruby environment remains sane.
* autofixing whitespace copsLamont Granquist2016-02-052-10/+8
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Fix nil with properties:John Keiser2016-01-271-1/+1
| | | | | | 1. Warn when default values are invalid. 2. Never validate nil (on set or get) if there is no default. 3. Emit "will be invalid in Chef 13" warning when setting an invalid nil value.
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-182-2/+2
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-142-71/+71
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Don't run IPv6 tests on GCEjk/no-ipv6-on-gceJohn Keiser2015-12-151-1/+1
|
* Don't activate cheffish and chef-provisioning until its DSL is usedjk/lazy-activationJohn Keiser2015-12-091-0/+43
|
* add integration test for the client sidelcg/chef-versionLamont Granquist2015-10-261-0/+20
|
* add optional ruby-profiling with --profile-rubyLamont Granquist2015-10-051-0/+17
| | | | dumps a large call graph into /var/chef/cache/graph_profile.out
* remove deprecation warnings testlcg/suppress_freeze_warningsLamont Granquist2015-09-141-2/+0
|
* Pass deprecations through formatter instead of logsJohn Keiser2015-09-011-0/+53
|
* Skip integration tests that aren't working on appveyor environmentdanielsdeleo2015-05-191-27/+29
|
* rvm needs GEM_PATH protectedlcg/integ-fixesLamont Granquist2015-05-181-1/+1
| | | | | otherwise the rubyopts passes -rbundler/setup which whacks the gem_path and then without the env var it can't find internal gems like i18n.
* just check for exit != 0Lamont Granquist2015-05-181-1/+1
|