Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
95d1ac0e
Commit
95d1ac0e
authored
Mar 18, 2017
by
anonym
Browse files
Test suite: make chutney_onionservice_redir deal with cleanup of previous instances.
Instead of the caller having to deal with it in each instance.
parent
839ae92c
Changes
2
Hide whitespace changes
Inline
Side-by-side
features/step_definitions/chutney.rb
View file @
95d1ac0e
...
...
@@ -147,18 +147,22 @@ def chutney_onionservice_info
end
def
chutney_onionservice_redir
(
remote_address
,
remote_port
)
local_address
,
local_port
,
_
=
chutney_onionservice_info
job
=
IO
.
popen
(
[
'/usr/bin/redir'
,
"
#{
local_address
}
:
#{
local_port
}
"
,
"
#{
remote_address
}
:
#{
remote_port
}
"
]
)
add_after_scenario_hook
do
kill_redir
=
Proc
.
new
do
begin
Process
.
kill
(
"TERM"
,
job
.
pid
)
Process
.
kill
(
"TERM"
,
$chutney_onionservice_
job
.
pid
)
rescue
# noop
end
end
return
job
if
$chutney_onionservice_job
kill_redir
.
call
end
local_address
,
local_port
,
_
=
chutney_onionservice_info
$chutney_onionservice_job
=
IO
.
popen
(
[
'/usr/bin/redir'
,
"
#{
local_address
}
:
#{
local_port
}
"
,
"
#{
remote_address
}
:
#{
remote_port
}
"
]
)
add_after_scenario_hook
{
kill_redir
.
call
}
return
$chutney_onionservice_job
end
features/step_definitions/torified_gnupg.rb
View file @
95d1ac0e
...
...
@@ -46,13 +46,6 @@ When /^the "([^"]+)" OpenPGP key is not in the live user's public keyring$/ do |
end
def
setup_onion_keyserver
if
@onion_keyserver_job
begin
Process
.
kill
(
"TERM"
,
@onion_keyserver_job
.
pid
)
rescue
# noop
end
end
resolver
=
Resolv
::
DNS
.
new
keyservers
=
resolver
.
getaddresses
(
'pool.sks-keyservers.net'
).
select
do
|
addr
|
addr
.
class
==
Resolv
::
IPv4
...
...
anonym
@anonym
mentioned in issue
#12211 (closed)
·
May 14, 2020
mentioned in issue
#12211 (closed)
mentioned in issue #12211
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment