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
92269fc6
Commit
92269fc6
authored
Dec 04, 2019
by
Francesc Guasch
Browse files
test(ports): check ports removed on remove
issue #1197
parent
687ef626
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/vm/30_remove.t
View file @
92269fc6
...
...
@@ -49,6 +49,9 @@ sub test_remove_domain {
my
$vm_name
=
shift
;
my
$domain
=
test_create_domain
(
$vm_name
);
my
$id_domain
=
$domain
->
id
;
$domain
->
expose
(
22
);
is
(
scalar
(
$domain
->
list_ports
),
1
);
my
@volumes
=
$domain
->
list_volumes
();
$domain
->
remove
(
$USER
);
...
...
@@ -63,6 +66,18 @@ sub test_remove_domain {
ok
(
!-
e
$vol
,"
[
$vm_name
] volume
$vol
should be removed
");
}
}
test_ports_remove
(
$id_domain
);
}
sub
test_ports_remove
{
my
$id_domain
=
shift
;
my
$sth
=
connector
->
dbh
->
prepare
(
"
SELECT count(*) FROM domain_ports
"
.
"
WHERE id_domain = ?
"
);
my
(
$count
)
=
$sth
->
fetchrow
;
is
(
$count
,
undef
);
}
sub
test_remove_domain_base
{
...
...
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