Reverted back to taking token directly, auth was causing issues.:
This commit is contained in:
@@ -69,7 +69,7 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
|
||||
http_hook_server.prepare
|
||||
|
||||
# Generate a token for the server to respond with
|
||||
BeEF::Core::Crypto::api_token
|
||||
@token = BeEF::Core::Crypto::api_token
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
@@ -79,9 +79,6 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
|
||||
http_hook_server.start
|
||||
end
|
||||
|
||||
@response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
|
||||
@token = JSON.parse(@response)['token']
|
||||
|
||||
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
|
||||
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
|
||||
@caps["browserstack.local"] = true
|
||||
|
||||
@@ -63,7 +63,7 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
|
||||
http_hook_server.prepare
|
||||
|
||||
# Generate a token for the server to respond with
|
||||
BeEF::Core::Crypto::api_token
|
||||
@token = BeEF::Core::Crypto::api_token
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
@@ -76,9 +76,6 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
|
||||
# Give the server time to start-up
|
||||
sleep 1
|
||||
|
||||
@response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
|
||||
@token = JSON.parse(@response)['token']
|
||||
|
||||
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
|
||||
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
|
||||
@caps["browserstack.local"] = true
|
||||
|
||||
@@ -62,7 +62,7 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
|
||||
http_hook_server.prepare
|
||||
|
||||
# Generate a token for the server to respond with
|
||||
BeEF::Core::Crypto::api_token
|
||||
@token = BeEF::Core::Crypto::api_token
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
|
||||
Reference in New Issue
Block a user