test/test_proxy_pass.rb in yahns-1.15.0 vs test/test_proxy_pass.rb in yahns-1.16.0
- old
+ new
@@ -4,10 +4,11 @@
require_relative 'server_helper'
require 'json'
require 'digest'
begin
require 'kcar'
+ require 'yahns/proxy_pass'
rescue LoadError
end
class TestProxyPass < Testcase
ENV["N"].to_i > 1 and parallelize_me!
@@ -186,11 +187,10 @@
err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
host2, port2 = @srv2.addr[3], @srv2.addr[1]
pid = mkserver(cfg) do
@srv.autoclose = @srv2.autoclose = false
ENV["YAHNS_FD"] = "#{@srv.fileno},#{@srv2.fileno}"
- require 'yahns/proxy_pass'
cfg.instance_eval do
app(:rack, Yahns::ProxyPass.new("unix:#{unix_path}:/$fullpath")) do
listen "#{host}:#{port}"
end
app(:rack, Yahns::ProxyPass.new("unix:#{unix_path}:/foo$fullpath")) do
@@ -249,10 +249,9 @@
def test_proxy_pass
err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
host2, port2 = @srv2.addr[3], @srv2.addr[1]
pid = mkserver(cfg) do
- require 'yahns/proxy_pass'
@srv2.close
cfg.instance_eval do
app(:rack, Yahns::ProxyPass.new("http://#{host2}:#{port2}")) do
listen "#{host}:#{port}"
client_max_body_size nil