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
Manuel Giffels 2021-03-05 21:32:56 +01:00 committed by Rylan Polster
parent eba9930b5f
commit 9e823e4835
1 changed files with 10 additions and 0 deletions

View File

@ -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