summaryrefslogtreecommitdiff
path: root/spec/tiny_server.rb
Commit message (Collapse)AuthorAgeFilesLines
* Simplify / fix our yard doc Rake taskTim Smith2018-08-231-1/+0
| | | | | | | | | We were trying to parse out a readme file that doesn't exist and the license file which produced errors We namespaced the task in a way we don't do anywhere else. This matches our other gems now Tell people to use bundler in the errors instead of gem installing things We required rubygems which is not necessary Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/MutableConstantLamont Granquist2018-07-021-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix TinyServer races.jk/tinyserver-raceJohn Keiser2016-08-221-41/+53
| | | | | | | | | | | | | | | 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).
* improved waiting logic for server startMatt Wrock2016-08-161-33/+6
|
* autofixing whitespace copsLamont Granquist2016-02-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | 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"
* 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"
* Use double quotes by defaultThom May2016-01-141-11/+11
| | | | | | | 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.
* Consistent return value for started?Jay Mundrawala2015-12-181-0/+1
|
* tiny_server should retry Errno::EHOSTUNREACHJay Mundrawala2015-12-181-1/+2
| | | | | | | | | | | | | | | | | | | AIX seems to raise Errno::EHOSTUNREACH when the server is not ready yet. Our tests on AIX fail with: ``` Errno::EHOSTUNREACH: No route to host - connect(2) for "localhost" port 9000 Shared Example Group: "a file with the wrong content" called from ./spec/support/shared/functional/file_resource.rb:936 Shared Example Group: "a configured file resource" called from ./spec/support/shared/functional/file_resource.rb:279 Shared Example Group: "a file resource" called from ./spec/functional/resource/remote_file_spec.rb:122 # ./spec/tiny_server.rb:91:in `started?' # ./spec/tiny_server.rb:82:in `block in block_until_started' # ./spec/tiny_server.rb:81:in `times' # ./spec/tiny_server.rb:81:in `block_until_started' # ./spec/tiny_server.rb:72:in `start' # ./spec/support/shared/functional/http.rb:45:in `start_tiny_server' # ./spec/functional/resource/remote_file_spec.rb:111:in `block (3 levels) in <top (required)>' ```
* fix rspec timeouts in tinyserverLamont Granquist2015-12-101-1/+1
|
* fix rspecs-ctrl-clcg/fix-rspec-ctrl-cLamont Granquist2015-11-251-1/+3
| | | | | | | | | | | we can't fork off tinyserver without a lot of work in the test codebase, so instead save a copy of the old rspec signal handler and then after tinyserver has started (and we're sure that rack has scribbled over the signal handler), restore the rspec signal handler. there's an obvious race if someone hits ctrl-c after tinyserver has scribbled over the sigint handler but before we restore it, but this is 99.9% better of a solution than nothing.
* Trying to eradicate all traces of the JSON gem from Cheftyler-ball2014-10-071-2/+1
|
* Return rack-compliant 404 messagesdanielsdeleo2014-06-111-1/+1
|
* Normalize whitespace on all filesSeth Vargo2013-09-261-2/+2
|
* Rescue ECONNRESET during tiny server startup.sersut2013-05-311-1/+1
|
* Rescue EOFError in tiny server startupdanielsdeleo2013-05-311-1/+1
| | | | | | EOFError sometimes occurs when running remote file tests with HTTPS, should be a recoverable condition. This is not 100% verified because the error is very intermittent.
* Run remote_file functional tests w/ HTTPSdanielsdeleo2013-05-291-0/+1
| | | | | | - Run standard file behavior functional tests with HTTPS on port 9000. - Confirms CHEF-3005 fixed. - Refactor tests to run against different server configurations.
* functional test for CHEF-3140Jesse Campbell2013-02-181-10/+11
|
* race condition that resolves itself?Lamont Granquist2013-01-101-2/+2
|
* replace thin w/ webrick for func. test serverdanielsdeleo2012-11-191-10/+29
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+183
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!