buku: improve bukuserver tests
Closes #72512. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: Rylan Polster <rslpolster@gmail.com>master
parent
eba9930b5f
commit
9e823e4835
|
@ -278,5 +278,15 @@ class Buku < Formula
|
|||
# Test bukuserver
|
||||
result = shell_output("#{bin}/bukuserver --version")
|
||||
assert_match version.to_s, result
|
||||
|
||||
port = free_port
|
||||
fork do
|
||||
exec "#{bin}/bukuserver run --host 127.0.0.1 --port #{port} 2>&1 >/dev/null"
|
||||
end
|
||||
sleep 5
|
||||
|
||||
result = shell_output("curl -s 127.0.0.1:#{port}/api/bookmarks")
|
||||
assert_match "https://github.com/Homebrew/brew", result
|
||||
assert_match "The missing package manager for macOS", result
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue