Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
b2b88419
Commit
b2b88419
authored
Nov 19, 2019
by
Francesc Guasch
Browse files
test(ports): check refresh won't remove open ports
issue #1200
parent
7feb97af
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/vm/92_ports.t
View file @
b2b88419
...
...
@@ -214,6 +214,31 @@ sub test_one_port($vm) {
ok
(
$n_rule
,"
Expecting rule for ->
$local_ip
:
$public_port
")
or
exit
;
#####################################################################3
#
# Check rule won't disapear refreshing
my
$req1
=
Ravada::
Request
->
refresh_vms
();
my
$req2
=
Ravada::
Request
->
refresh_machine
(
id_domain
=>
$domain
->
id
,
uid
=>
user_admin
->
id
);
wait_request
();
is
(
$req1
->
status
,'
done
');
is
(
$req1
->
error
,'');
is
(
$req2
->
status
,'
done
');
is
(
$req2
->
error
,'');
(
$n_rule
)
=
search_iptable_remote
(
local_ip
=>
"
$local_ip
/32
"
,
local_port
=>
$public_port
,
table
=>
'
nat
'
,
chain
=>
'
PREROUTING
'
,
node
=>
$vm
,
jump
=>
'
DNAT
'
,
'
to-destination
'
=>
$domain
->
ip
.
"
:
"
.
$internal_port
);
ok
(
$n_rule
,"
Expecting rule for ->
$local_ip
:
$public_port
")
or
exit
;
#################################################################
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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