Commit 3279136c authored by intrigeri's avatar intrigeri
Browse files

Test suite: refactor to avoid relying on variables whose name<->content relationship is unclear.

refs: #12130
parent 08a5f8c5
......@@ -292,17 +292,16 @@ Then /^I see that (.+) is properly stream isolated$/ do |application|
info = stream_isolation_info(application)
expected_ports = [info[:socksport]]
expected_ports << 9051 if info[:controller]
expected_addrs = { |port| "{port}" }
log_lines = $vm.file_content(@process_monitor_log).split("\n")
assert(log_lines.size > 0,
"Couldn't see any connection made by #{application} so " \
"something is wrong")
log_lines.each do |line|
addr_port = line.split(/\s+/)[4]
"#{application} should only connect to #{expected_addrs} but " \
"was seen connecting to #{addr_port}")
ip_port = line.split(/\s+/)[4]
assert( { |port| "{port}" }.include?(ip_port),
"#{application} should only connect to #{expected_ports} but " \
"was seen connecting to #{ip_port}")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment