Fixing some unit tests
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -76,10 +76,10 @@ end
|
|||||||
@beef_process_id = nil;
|
@beef_process_id = nil;
|
||||||
|
|
||||||
task :beef_start => 'beef' do
|
task :beef_start => 'beef' do
|
||||||
printf "Starting BeEF (wait 10 seconds)..."
|
printf "Starting BeEF (wait a few seconds)..."
|
||||||
@beef_process_id = IO.popen("ruby ./beef -x 2> /dev/null", "w+")
|
@beef_process_id = IO.popen("ruby ./beef -x 2> /dev/null", "w+")
|
||||||
delays = [2, 2, 1, 1, 1, 0.5, 0.5 , 0.5, 0.3, 0.2, 0.1, 0.1, 0.1, 0.05, 0.05]
|
delays = [3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||||
delays.each do |i| # delay for 10 seconds
|
delays.each do |i| # delay for a few seconds
|
||||||
printf '.'
|
printf '.'
|
||||||
sleep (i)
|
sleep (i)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class TC_DebugModules < Test::Unit::TestCase
|
|||||||
data = JSON.parse(result['0']['data'])['data']
|
data = JSON.parse(result['0']['data'])['data']
|
||||||
assert_not_nil data
|
assert_not_nil data
|
||||||
assert_equal 200, JSON.parse(data)["status_code"]
|
assert_equal 200, JSON.parse(data)["status_code"]
|
||||||
assert JSON.parse(data)["response_body"].include?("However you should still be capable of accessing it\n\t\tusing the Requester")
|
assert JSON.parse(data)["port_status"].include?("open")
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user