summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-29 15:44:39 -0600
committermo khan <mo@mokhan.ca>2025-05-29 15:44:39 -0600
commitc12918c287198128a7189e784ce5f30ff8b72d54 (patch)
tree30db81c9a8f34cf0813bcf021b51996c743a1f0f
parent0f19c35167269b275e6ec343dd6d77813d294a5b (diff)
chore: start sts server once before all tests
-rwxr-xr-xbin/test14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/test b/bin/test
index 3e35635..3d53f0e 100755
--- a/bin/test
+++ b/bin/test
@@ -7,6 +7,13 @@ gemfile do
gem "net-hippie", "~> 1.0"
end
+pid = Process.spawn("cargo run")
+sleep 1
+
+at_exit do
+ system("killall sts")
+end
+
require "minitest/autorun"
class ServerTest < Minitest::Test
@@ -15,13 +22,6 @@ class ServerTest < Minitest::Test
def setup
@base_url = "http://127.0.0.1:7878"
@client = Net::Hippie::Client.new
- pid = Process.spawn("cargo run")
- sleep 1
- end
-
- def teardown
- # Process.kill(-9, pid)
- system("killall sts")
end
def test_homepage