diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/test | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -9,10 +9,15 @@ gemfile do gem "net-hippie", "~> 1.0" end -pid = Process.spawn("mise exec -- cargo run") +$bind_addr = ENV.fetch("BIND_ADDR", "127.0.0.1:7878") + +pid = Process.spawn({ + "BIND_ADDR" => $bind_addr +}, "mise exec -- cargo run") sleep 1 at_exit do + Process.kill('SIGTERM', pid) system("killall sts") end @@ -22,7 +27,7 @@ class ServerTest < Minitest::Test attr_reader :base_url, :client def setup - @base_url = "http://127.0.0.1:7878" + @base_url = "http://#{$bind_addr}" @client = Net::Hippie::Client.new end @@ -40,7 +45,7 @@ class ServerTest < Minitest::Test def test_metadata response = client.get(base_url + "/.well-known/oauth-authorization-server") assert_equal "200", response.code - # assert_equal "application/json", response["Content-Type"] + assert_equal "application/json", response["Content-Type"] end # /token - Token endpoint https://datatracker.ietf.org/doc/html/rfc8693#section-2.3 |
