summaryrefslogtreecommitdiff
path: root/spec/unit/rest_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* autofixing whitespace copsLamont Granquist2016-02-051-50/+49
| | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | 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-2/+2
| | | 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-2/+2
| | | 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"
* Merge pull request #4423 from chef/tm/rest_deprecationThom May2016-01-211-0/+7
|\ | | | | Add deprecation warnings to Chef::REST and all json_creates
| * ensure unit tests are correctThom May2016-01-181-0/+7
| |
* | Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-1/+1
|/ | | | | | 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-141-49/+49
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-4/+4
| | | | chefstyle -a fixed 1044 occurrances
* Remove duplicate 'Accept' header in specJulian C. Dunn2015-10-241-2/+2
|
* Added versioned Chef Object API support code and repaired Chef::User.create.tylercloke2015-06-051-5/+5
| | | | Also added Chef::User.create V1 API support. Chef::User.create will attempt to use V1 of the server API, and if it fails, it will fall back to V0.
* Implemented X-Ops-Server-API-Version in Chef requests.tylercloke2015-05-041-20/+10
| | | | | | | | | | This takes advantage of Chef::HTTP::Authenticator.handle_request. After the authentication_headers have been merged, it adds: {'X-Ops-Server-API-Version' => Chef::HTTP::Authenticator::SERVER_API_VERSION} Chef::HTTP::Authenticator::SERVER_API_VERSION should corrospond to the max version of the server the client is compatible with. We are starting at "0". I also removed outer level lets :base_header and :req_with_body_headers from rest_spec.rb as they were never used anywhere. Another :base_header was defined in a tighter part of the spec and was only used in that scope, and :req_with_body_headers was never used anywhere.
* Test base HTTP client behaviors for chefzero URL casedanielsdeleo2015-04-011-0/+9
|
* Update to RSpec 3.Claire McQuin2014-10-291-12/+12
|
* rspec-3-ifylcg/rest-test-speedupLamont Granquist2014-10-201-74/+74
|
* speed up rest testLamont Granquist2014-10-181-1/+5
| | | | eliminate the sleep + retry delays on the other failing test as well
* Merge pull request #1912 from jessehu/CHEF-ISSUE-1904Claire McQuin2014-10-021-1/+4
|\ | | | | retry on HTTP 50X Error when calling Chef REST API
| * read http_retry_count from chef config in the spec; add HTTP error code in ↵Hui Hu2014-09-041-2/+3
| | | | | | | | the log.
| * retry on HTTP 50X Error when calling Chef REST APIHui Hu2014-08-251-1/+3
| |
* | Print out request and response body on non-2xx responsejk/http-error-logJohn Keiser2014-09-071-1/+1
|/
* Default port HTTP port 80 is not passed on in the Host header.Klaas Jan Wierenga2014-06-071-2/+2
|
* CHEF-5100:Lamont Granquist2014-03-271-0/+10
| | | | | | - Enable Content Validation Check for Chef::HTTP::Simple - Tidy up debug logs / comments - More specs.
* ensure Chef::REST does not modify options in-placeJoseph Anthony Pasquale Holsten2014-02-251-0/+5
|
* - Adding X-Remote-Request-Id to the set of headers for every request from ↵PrajaktaPurohit2014-02-071-13/+38
| | | | | | | | | | CCR and knife that will be sent to erchef - Each knife request has a different X-Remote-Request-Id, where as it remains the same for all requests originating from the same chef-client run. - Adding and fixing tests
* remove some more deprecation warningsLamont Granquist2014-01-291-2/+2
|
* add real error for bad download sizeClaire McQuin2014-01-231-4/+4
|
* validate streaming file sizeClaire McQuin2014-01-231-65/+14
|
* add specs for CHEF-4502 behaviorLamont Granquist2014-01-231-6/+32
|
* rspec modernizationLamont Granquist2014-01-231-55/+55
|
* more test refactoringLamont Granquist2014-01-231-97/+114
|
* WIP: partial rewrite of base specs on masterLamont Granquist2014-01-231-170/+226
|
* WIP: hacking on ugly spec testsLamont Granquist2014-01-231-22/+34
|
* Always set a correct Host header to avoid net/http bugdanielsdeleo2013-11-261-3/+12
| | | | | | | Net::HTTP fails to surround IPv6 addresses in brackets when constructing a Host header. Net::HTTP respects any user-supplied Host header, so we ensure that the Host header is correctly formatted by setting it manually for all requests.
* Add tests for raw_http_request to check that the authenticator getsjamesc2013-11-201-7/+38
| | | | called and that the correct headers are passed to send_http_request
* REST#raw_http_request needs to be public for legacy usedanielsdeleo2013-10-231-0/+7
|
* Use new Chef::ServerAPI API class in upload/download/diffJohn Keiser2013-10-091-6/+25
|
* Fix Chef::HTTP dependence on subclass methodsdanielsdeleo2013-10-081-23/+23
|
* Move streaming requests to generic HTTP classdanielsdeleo2013-10-081-2/+2
|
* Update test to make order of return values explicitdanielsdeleo2013-10-081-6/+7
| | | | | This seems to be more stable in rspec than giving #and_yield multiple times.
* Cleanup deprecation warnings, fix bad mocksdanielsdeleo2013-10-081-69/+60
|
* Add the binmode method to mock tempfile object.sersut2013-06-041-1/+1
|
* Remove binmode property from file / remote_directory resources and always ↵sersut2013-05-301-1/+1
| | | | operate in binmode.
* [CHEF-2682] add test case for InvalidRedirect exceptionLoic ANTOINE-GOMBEAUD2013-03-061-1/+5
|
* Fix syntax and force_encoding for 1.8danielsdeleo2012-10-311-1/+1
|
* [OC-3553] remove deprecated #rest_request and associated testsdanielsdeleo2012-10-311-190/+99
|
* [OC-3553] add 304 NotModified support to raw_http_requestdanielsdeleo2012-10-311-0/+9
| | | | | | 304 support was previously in #run_request, which is deprecated and going away. To support If-Modified-Since in the http_request resource, we need to add support for 304 to the api we're keeping.
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+661
| | | | The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!
* big refactor of the repo layout. move to a chef gem and a chef-server gem ↵Ezra Zygmuntowicz2008-10-081-228/+0
| | | | all with proper deps
* Changing the license on the spec files as wellAdam Jacob2008-08-171-13/+11
|
* Adding remote_file testsAdam Jacob2008-08-171-4/+5
| | | | | Fixing up some tests Updating the history to reflect our new additions