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
6ebd26c5
Commit
6ebd26c5
authored
May 29, 2019
by
Francesc Guasch
Browse files
test(backend): remove corrupt volumes
issue #1090
parent
71946bd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/kvm/20_domain_kvm.t
View file @
6ebd26c5
...
...
@@ -55,6 +55,30 @@ sub test_remove_domain_by_name {
}
sub
test_remove_corrupt_clone
{
my
$vm
=
shift
;
my
$base
=
create_domain
(
$vm
);
$base
->
add_volume_swap
();
my
$clone
=
$base
->
clone
(
name
=>
new_domain_name
,
user
=>
user_admin
);
for
my
$file
(
$clone
->
list_disks
)
{
warn
$file
;
open
my
$out
,
'
>
',
$file
or
die
"
$!
$file
";
print
$out
"
bogus
\n
";
close
$out
;
}
eval
{
$clone
->
start
(
user_admin
)
};
diag
(
$@
);
$clone
->
shutdown_now
(
user_admin
);
$clone
->
remove
(
user_admin
);
$base
->
remove
(
user_admin
);
}
sub
search_domain_db
{
my
$name
=
shift
;
...
...
@@ -116,7 +140,6 @@ sub test_new_domain_iso {
$domain
=
$RAVADA
->
create_domain
(
name
=>
$name
,
id_iso
=>
search_id_iso
('
alpine
')
,
active
=>
$active
,
id_owner
=>
$USER
->
id
,
iso_file
=>
$iso
->
{
device
}
,
disk
=>
1024
*
1024
,
vm
=>
$BACKEND
);
};
...
...
@@ -306,6 +329,7 @@ test_vm_kvm();
remove_old_domains
();
remove_old_disks
();
test_domain
();
test_remove_corrupt_clone
(
$vm
);
test_domain_with_iso
();
test_domain_missing_in_db
();
test_domain_inactive
();
...
...
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