diff --git a/test/frameworks/sinatra_test.rb b/test/frameworks/sinatra_test.rb index 81e7aeca..43e56462 100644 --- a/test/frameworks/sinatra_test.rb +++ b/test/frameworks/sinatra_test.rb @@ -3,11 +3,11 @@ require 'test_helper' require 'rack/test' -require 'byebug' + class SinatraTest < Minitest::Test include Rack::Test::Methods APP = Rack::Builder.parse_file('test/support/apps/sinatra/config.ru') - byebug + sinatra_version = Gem::Specification.find_by_name('sinatra').version if sinatra_version < Gem::Version.new('4.0.0') APP = APP.first @@ -19,12 +19,8 @@ def app def test_basic_get clear_all! - byebug r = get '/' - # , nil, { - # "HTTP_FORWARDED" => "localhost", - # "action_dispatch.show_detailed_exceptions" => true - # } + assert last_response.ok? diff --git a/test/support/apps/sinatra/config.ru b/test/support/apps/sinatra/config.ru index 5ddd78c1..210a0f82 100644 --- a/test/support/apps/sinatra/config.ru +++ b/test/support/apps/sinatra/config.ru @@ -5,10 +5,14 @@ class InstanaSinatraApp < ::Sinatra::Base get '/' do "Hello Sinatra!" end - + get '/greet/:name' do "Hello, #{params[:name]}!" end + + configure do + set :host_authorization, {permitted_hosts: "example.org"} + end end run InstanaSinatraApp