Remove unnecessary server preparation step and ensure ActiveRecord disconnection in teardown

This commit is contained in:
zinduolis
2025-09-06 10:52:04 +10:00
parent 5a333d45a9
commit f3834f730b

View File

@@ -56,7 +56,6 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do
# Spawn HTTP Server
print_info 'Starting HTTP Hook Server'
http_hook_server = BeEF::Core::Server.instance
http_hook_server.prepare
# Generate a token for the server to respond with
@token = BeEF::Core::Crypto.api_token
@@ -90,12 +89,13 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do
sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 }
@session = @driver.execute_script('return window.beef.session.get_hook_session_id().length')
@session = @driver.execute_script('return window.beef.session.get_hook_session_id()')
end
end
after(:all) do
server_teardown(@driver, @pid, @pids)
disconnect_all_active_record!
end
it 'confirms a websocket server has been started' do