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
d1a3259d
Commit
d1a3259d
authored
Nov 22, 2018
by
Francesc Guasch
Browse files
refactor(test); make it work in non-root
issue #933
parent
0bd73ff1
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/front/70_ldap_access.t
View file @
d1a3259d
...
...
@@ -463,16 +463,15 @@ for my $vm_name ('KVM', 'Void') {
}
my
$ldap
;
eval
{
$ldap
=
Ravada::Auth::LDAP::
_init_ldap_admin
()
};
eval
{
$ldap
=
Ravada::Auth::LDAP::
_init_ldap_admin
()
}
if
$vm
;
if
(
$@
=~
/Bad credentials/
)
{
diag
(
"
$@
\n
Fix admin credentials in t/etc/ravada_ldap.conf
"
)
;
}
els
e
{
diag
(
"
Skipped LDAP tests
"
.
(
$@
or
'')
)
if
!
$ldap
;
$msg
=
"
$@
\n
Fix admin credentials in t/etc/ravada_ldap.conf
";
}
els
if
(
$vm
)
{
$msg
=
"
Skipped LDAP tests
"
.
(
$@
or
'');
}
$msg
=
"
SKIPPEd: No LDAP server found
"
if
!
$ldap
&&
$@
!~
/Bad credentials/
;
skip
(
$msg
,
10
)
if
!
$vm
||
!
$ldap
;
skip
(
$msg
,
10
)
if
!
$ldap
;
diag
("
Testing LDAP access for
$vm_name
");
test_external_auth
();
...
...
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