File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,27 @@ def install
3030 end
3131 end
3232
33+ service do
34+ run [ opt_bin /"lume" , "serve" ]
35+ keep_alive true
36+ working_dir var
37+ log_path var /"log/lume.log"
38+ error_log_path var /"log/lume.log"
39+ end
40+
3341 test do
3442 # Test ipsw command
3543 assert_match "Found latest IPSW URL" , shell_output ( "#{ bin } /lume ipsw" )
3644
3745 # Test management HTTP server
38- # Serves 404 Not found if no machines created
3946 port = free_port
40- fork { exec bin /"lume" , "serve" , "--port" , port . to_s }
47+ pid = spawn bin /"lume" , "serve" , "--port" , port . to_s
4148 sleep 5
42- assert_match %r{^HTTP/\d (.\d )? (200|404)} , shell_output ( "curl -si localhost:#{ port } /lume" ) . lines . first
49+ begin
50+ # Serves 404 Not found if no machines created
51+ assert_match %r{^HTTP/\d (.\d )? (200|404)} , shell_output ( "curl -si localhost:#{ port } /lume" ) . lines . first
52+ ensure
53+ Process . kill "SIGTERM" , pid
54+ end
4355 end
4456end
You can’t perform that action at this time.
0 commit comments