diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-30 12:40:38 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-30 12:40:38 -0600 |
| commit | 463c259bd41f20d5811b028e8045f3de3effe097 (patch) | |
| tree | f669fa26ccbb4e46c146fcb924d093ce8b9bb4a4 /bin | |
| parent | f59105ea06171e090b22b37f74d861ccd781a6ed (diff) | |
feat: parse BIND_ADDR env variable
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 |
