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
f461a60a
Commit
f461a60a
authored
Nov 20, 2017
by
Francesc Guasch
Browse files
[
parent
ff4d9a3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
f461a60a
...
...
@@ -770,7 +770,13 @@ sub _init_config {
my
$connector
=
shift
;
confess
"
Deprecated connector
"
if
$connector
;
$CONFIG
=
YAML::
LoadFile
(
$file
);
die
"
ERROR: Missing config file
$file
\n
"
if
!-
e
$file
;
eval
{
$CONFIG
=
YAML::
LoadFile
(
$file
)
};
die
"
ERROR: Format error in config file
$file
\n
$@
"
if
$@
;
$CONFIG
->
{
vm
}
=
[]
if
!
$CONFIG
->
{
vm
};
$LIMIT_PROCESS
=
$CONFIG
->
{
limit_process
}
...
...
t/05_ravada.t
View file @
f461a60a
...
...
@@ -19,4 +19,16 @@ ok($Ravada::CONNECTOR, "Now we should have a DB connector ");
ok
(
$
Ravada::
CONNECTOR
,"
No connector defined
");
eval
{
ok
(
$
Ravada::
CONNECTOR
->
dbh
,"
No dbh defined
")
};
eval
{
my
$config_err
=
"
t/etc/ravada_miss.conf
";
my
$rvd_err
=
Ravada
->
new
(
connector
=>
$test
->
connector
,
config
=>
$config_err
);
};
like
(
$@
,
qr/Missing config file/
);
eval
{
my
$config_err
=
"
t/etc/ravada_err.conf
";
my
$rvd_err
=
Ravada
->
new
(
connector
=>
$test
->
connector
,
config
=>
$config_err
);
};
like
(
$@
,
qr/Format error/
);
done_testing
();
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