summaryrefslogtreecommitdiff
path: root/spec/integration/solo
Commit message (Collapse)AuthorAgeFilesLines
* distro constants for solo, zero and automateMarc Chamberland2019-05-231-2/+3
| | | | 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-291-2/+2
| | | | | | | | | | | | | | | | 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>
* 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>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-151-9/+9
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-021-32/+32
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Ensure we don't run tests on unsupported platformstm/fix_unix_testsThom May2018-05-021-2/+2
| | | | | | Our more esoteric unices need some more careful hand holding Signed-off-by: Thom May <thom@chef.io>
* Ensure chef-solo creates node files w/ correct permissionsCOOL-604/chef-solo-node-permissionsScott Christopherson2016-12-061-0/+50
| | | | | | | This commit ensures that the `nodes` dir and the node files within it are created with the correct permissions by chef-solo. Signed-off-by: Scott Christopherson <scott@chef.io>
* fix chef-solo spec timeouts (#5367)Lamont Granquist2016-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * fix chef-solo spec timeouts caused by a race condition (not actually fixed) where the pid can be read by the process which lost the race to lock it before the pid has been written by the process which got the lock. the result is a message like: "WARN: Chef client is running, will wait for it to finish and then run." without any numerical pid. i'm not super concerned with fixing the race, this will unbreak a lot of red travis failures though. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> * revert some debugging Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* use threads to workaround Process.spawn buginesslcg/fix-solo-spec-testLamont Granquist2016-09-021-6/+11
| | | | | | | | | | | | | | | | | | | there's a WONTFIX closed bug in ruby-lang.org on this bug: https://bugs.ruby-lang.org/issues/10583 they seem to be favoring speed over accuracy with the result that if you're doing I/O synchronization (like our run_lock?) inside of a Process.spawn chain like this that you have to wrap the spawn calls inside of threads. probably a best practice to wrap every spawn call with a Thread. this probably also explains why we had the silly-long 20 second timeout? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* tweak chef-solo run_lock timing testlcg/solo-test-loop-tweakingLamont Granquist2016-09-021-4/+4
| | | | | | | | | | | | | | | | | - fix the 'last' statements (my perl brain occassionally crops up in ruby code) and replace with a raise. of course this just swaps one exception for another, but this time its really intended to work this way. - swap the order of the expecations so that if we fails to see the waiting on the other process statement, but we blow up in both threads in the exception that was just added, we know we actually have a legit run_lock race condition that this code just found. does not fix this bug, just gets us a bit more information if it reoccurs. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* use the chef log file for IPClcg/solo-test-speedupLamont Granquist2016-08-181-7/+8
| | | | | | when running on my mac this entirely removes all the sleeps Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* speed up solo testLamont Granquist2016-08-181-16/+1
| | | | | | | | | | | | | removes the requirement that the second wait for the first, just that one of them waits for the other, so if we ever somehow lose that race and the second wins the run_lock as long as the first sleeps then its all good... drops all the sleeps down a lot, thinking about how to make this more cleverer so that it doesn't sleep but handshakes properly so that we don't need 25 seconds of sleep on slowaris tests.. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Ensure that solo specific code is run at the proper timeThom May2016-05-161-1/+1
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* Too much log output and unnecessary warnings! Suppress that shit.Kartik Null Cating-Subramanian2016-04-251-2/+2
|
* autofixing whitespace copsLamont Granquist2016-02-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* Use double quotes by defaultThom May2016-01-141-28/+28
| | | | | | | 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.
* improve error message, add more testsLamont Granquist2015-10-261-0/+34
|
* Add minimal ohai mode option flagminimal-ohai-modedanielsdeleo2015-03-271-5/+7
|
* Clean all RSpec test filters related to Ruby 1.8.7 (issue #2497)Xabier de Zuazo2015-01-271-2/+1
|
* Update to RSpec 3.Claire McQuin2014-10-291-10/+10
|
* Add `name' attribute in fixture cookbooks' metadatadanielsdeleo2014-08-121-4/+8
|
* Convert Chef Zero helpers to instance methodsdanielsdeleo2014-08-101-11/+18
| | | | | | | | | | | | | * Prefer instance methods to class methods for Chef Zero helpers. RSpec's design and feature set heavily favors using instance methods for test setup. This change will allow us to use let bindings and more naturally move common setup to shared contexts. * Temporarily copy ChefZero's RSpec features in-repo. master of Chef Zero is currently broken for unit testing. Copy the changes here for now so we can make progress. * Automatically generate a metadata file when using the "cookbook" helper function. This will be needed for a subsequent change that makes `name' required in metadata.
* Change missing dependency from hard error to warning for now.danielsdeleo2014-03-141-2/+2
|
* Raise an error when including a recipe from an unreachable cookbookdanielsdeleo2014-03-141-0/+19
| | | | | | | | | | | | | | | | | | | | Fixes CHEF-4367. When attempting to load a recipe belonging to a cookbook that is not in the run_list or any dependencies of cookbooks in the run_list, chef will now produce an error like this: Chef::Exceptions::MissingCookbookDependency ------------------------------------------- Recipe `ancient::aliens` is not in the run_list, and cookbook 'ancient' is not a dependency of any cookbook in the run_list. To load thisrecipe, first add a dependency on cookbook 'ancient' in the cookbook you're including it from in that cookbook's metadata. This error will occur when chef-solo users use `include_recipe` without specifying the dependency in metadata; prior to this patch, chef would typically fail reading an undefined attribute, which commonly would result in a NoMethodError for nil.
* fix should_not raise_error(SpecificException)Lamont Granquist2014-01-291-1/+1
|
* Application::Solo must set @chef_client_jsondanielsdeleo2013-10-241-3/+21
| | | | | | | | | A past refactor was incomplete, leaving references to chef_solo_json. The contract with the superclass is that json data is set to @chef_client_json Conflicts: spec/integration/solo/solo_spec.rb
* Execute binaries using ruby so that they can execute everywhere.sersut2013-10-211-3/+3
|
* Make sure the bundle command is executed from the correct dir. Use bundle ↵sersut2013-10-211-5/+5
| | | | exec while launching chef-solo in functional tests as well.
* Increase the length of the first run and decrease the wait before launching ↵sersut2013-10-181-2/+2
| | | | the second to make sure they overlap during the test.
* Disable concurrent solo tests on ruby 1.8.7 because Process.spawn doesn't exist.sersut2013-10-151-1/+2
|
* Windows support for Chef::Runlock.sersut2013-10-141-1/+70
| | | | This ensures that if someone does a manual chef-client run, it doesn't fail if the chef is configured as a service on windows and if there is a chef-client run happening right now. The newly started run will wait for the old run to finish and continue after it.
* Minify chef-solo specJohn Keiser2013-10-021-29/+12
|
* Better error logging in solo integration test.sersut2013-06-141-5/+14
|
* Regression test for OC-8297.sersut2013-06-141-0/+32