Unverified Commit bafbe8e7 authored by Francesc Guasch's avatar Francesc Guasch Committed by GitHub
Browse files

Refactor for ubuntu eoan (#1183)

* test(ldap): add config files for eaon tests
* fix(test): remove user just logged in to refrsh

issue #1177
parent 6efbac0f
......@@ -5,7 +5,6 @@ Makefile.old
blib
pm_to_blib
t/.db
t/etc/ravada_ldap*.conf
t/etc/remote_vm*.conf
t/etc/front_ldap*.conf
hypnotoad.pid
......
[general]
config_version = 2
start = True
strict_host_checking = False
[slapd]
root_password = 12345678
[backend-userroot]
sample_entries = yes
suffix = dc=example,dc=com
---
ldap:
admin_group: test.admin.group
admin_user:
dn: cn=Directory Manager
password: 12345678
auth: match
base: 'dc=example,dc=com'
ravada_posix_group: rvd_posix_group
......@@ -54,6 +54,11 @@ sub test_ldap {
is($login_ok->{_auth},'bind',"Expecting bind login with $USER_DATA->{name}")
if $login_ok;
my $user_db = Ravada::Auth::SQL->new( name => $USER_DATA->{name});
$user_db->remove();
create_ldap_user($USER_DATA->{name}, $USER_DATA->{password});
$Ravada::CONFIG->{ldap}->{auth} = 'match';
$login_ok = undef;
eval { $login_ok = Ravada::Auth::LDAP->new( %$USER_DATA ); };
......@@ -77,7 +82,7 @@ sub test_ldap_space {
like($@, qr'.');
ok(!$login_ok,"Expecting no login with $user{name}");
eval { $login_ok = Ravada::Auth::login($user{name}, $user{password}) };
eval { $login_ok = Ravada::Auth::login($user{name}, $user{password} , 1) };
like($@, qr'.');
ok(!$login_ok,"Expecting no login with $user{name}");
......@@ -87,7 +92,7 @@ sub test_ldap_space {
like($@, qr'.');
ok(!$login_ok,"Expecting no login with $user{name}");
eval { $login_ok = Ravada::Auth::login($user{name}, $user{password}) };
eval { $login_ok = Ravada::Auth::login($user{name}, $user{password}, 1) };
like($@, qr'.');
ok(!$login_ok,"Expecting no login with $user{name}");
}
......
......@@ -51,7 +51,6 @@ create_domain
add_ubuntu_minimal_iso
create_ldap_user
connector
create_ldap_user
init_ldap_config
create_storage_pool
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment