Refactor server start-up process in AutoRunEngine and Websocket tests for improved initialization
This commit is contained in:
@@ -72,10 +72,9 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do
|
||||
disconnect_all_active_record!
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
|
||||
end
|
||||
@pid = fork do
|
||||
http_hook_server.prepare
|
||||
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
|
||||
http_hook_server.start
|
||||
end
|
||||
|
||||
|
||||
@@ -65,10 +65,9 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do
|
||||
disconnect_all_active_record!
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
|
||||
end
|
||||
@pid = fork do
|
||||
http_hook_server.prepare
|
||||
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
|
||||
http_hook_server.start
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user