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
e254de89
Commit
e254de89
authored
Oct 26, 2016
by
Francesc Guasch
Browse files
[#8] fixed tests now require a minimun disk space
parent
fc3c32a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/VM/KVM.pm
View file @
e254de89
...
...
@@ -246,7 +246,6 @@ sub create_volume {
if
(
$size
)
{
my
(
$prev_size
)
=
$doc
->
findnodes
('
/volume/capacity/text()
')
->
[
0
]
->
getData
();
confess
"
Size '
$size
' too small
"
if
$size
<
1024
*
512
;
warn
"
Creating a disk
"
.
int
(
$prev_size
/(1024*1024*1024))." -> ".int($size/
(
1024
*
1024
*
1024
));
$doc
->
findnodes
('
/volume/allocation/text()
')
->
[
0
]
->
setData
(
int
(
$size
*
0.9
));
$doc
->
findnodes
('
/volume/capacity/text()
')
->
[
0
]
->
setData
(
$size
);
}
...
...
t/vm/40_volumes.t
View file @
e254de89
...
...
@@ -68,7 +68,7 @@ sub test_add_volume {
# diag("[".$domain->vm."] adding volume $volume_name to domain ".$domain->name);
$domain
->
add_volume
(
name
=>
$domain
->
name
.
"
.
$volume_name
",
size
=>
1024
,
vm
=>
$vm
);
$domain
->
add_volume
(
name
=>
$domain
->
name
.
"
.
$volume_name
",
size
=>
512
*
1024
,
vm
=>
$vm
);
my
@volumes2
=
$domain
->
list_volumes
();
...
...
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