ncr / rack-proxy

A request/response rewriting HTTP proxy. A Rack app.
MIT License
269 stars 94 forks source link

test_net_http_hacked and test_http_full_request_headers fail #63

Closed pravi closed 2 years ago

pravi commented 7 years ago
pravi@shumbha:~/forge/debian/git/pkg-ruby-extras/ruby-rack-proxy$ bundle install
Warning: the running version of Bundler (1.13.6) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from http://rubygems.org/.................
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 0.9.2.2
Installing power_assert 0.2.6
Installing rack 1.2.1
Using bundler 1.13.6
Installing test-unit 3.1.5
Using rack-proxy 0.6.1 from source at `.`
Installing rack-test 0.5.6
Bundle complete! 4 Gemfile dependencies, 7 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
pravi@shumbha:~/forge/debian/git/pkg-ruby-extras/ruby-rack-proxy$ bundle exec rake test
/usr/bin/ruby2.3 -I"lib:test" -I"/var/lib/gems/2.3.0/gems/rake-0.9.2.2/lib" "/var/lib/gems/2.3.0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/rack_proxy_test.rb" "test/http_streaming_response_test.rb" "test/net_http_hacked_test.rb" 
Loaded suite /var/lib/gems/2.3.0/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
...F
================================================================================
Failure: <false> is not true.
test_net_http_hacked(NetHttpHackedTest)
/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-rack-proxy/test/net_http_hacked_test.rb:12:in `test_net_http_hacked'
      9: 
     10:     # Response code
     11:     res = http.begin_request_hacked(req)
  => 12:     assert res.code == "200"
     13: 
     14:     # Headers
     15:     headers = {}
================================================================================
.....F
================================================================================
Failure:
  Google always sets a cookie, yo. Where my cookies at?!.
  <false> is not true.
test_http_full_request_headers(RackProxyTest)
/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-rack-proxy/test/rack_proxy_test.rb:35:in `test_http_full_request_headers'
     32:     app(:streaming => false)
     33:     app.host = 'www.google.com'
     34:     get "/"
  => 35:     assert !Array(last_response['Set-Cookie']).empty?, 'Google always sets a cookie, yo. Where my cookies at?!'
     36:   end
     37: 
     38:   def test_https_streaming
================================================================================
......

Finished in 13.579432031 seconds.
--------------------------------------------------------------------------------
16 tests, 41 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
87.5% passed
--------------------------------------------------------------------------------
1.18 tests/s, 3.02 assertions/s
rake aborted!
Command failed with status (1): [/usr/bin/ruby2.3 -I"lib:test" -I"/var/lib/...]

Tasks: TOP => test
(See full trace by running task with --trace)