Refactor server start-up process in AutoRunEngine and Websocket tests for improved initialization

This commit is contained in:
zinduolis
2025-09-06 09:58:00 +10:00
parent e5c8a0c86d
commit 15fd00a69a
2 changed files with 4 additions and 6 deletions

View File

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

View File

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