Commit bfa8caf7 authored by frankiejol's avatar frankiejol
Browse files

Merge branch 'develop' of https://github.com/UPC/ravada into develop

parents 5b3d9d5b 7c19ce88
......@@ -3,7 +3,7 @@ package Ravada;
use warnings;
use strict;
our $VERSION = '0.10.0';
our $VERSION = '0.11.0';
use Carp qw(carp croak);
use Data::Dumper;
......
......@@ -584,8 +584,10 @@ Removes the user
=cut
sub remove($self) {
confess if $self->name eq 'f';
my $sth = $$CON->dbh->prepare("DELETE FROM users where id=?");
my $sth = $$CON->dbh->prepare("DELETE FROM grants_user where id_user=?");
$sth->execute($self->id);
$sth = $$CON->dbh->prepare("DELETE FROM users where id=?");
$sth->execute($self->id);
$sth->finish;
}
......
use warnings;
use strict;
use Carp qw(confess);
use Test::More;
use lib 't/lib';
use Test::Ravada;
no warnings "experimental::signatures";
use feature qw(signatures);
init();
clean();
my $base = "zz-test-base";
sub _set_no_password() {
my $sth = connector->dbh->prepare("UPDATE networks set requires_password=0");
}
for my $vm_name ( 'KVM' ) {
_set_no_password();
my $domain = import_domain($vm_name);
is($domain->is_base,1);
my $clone = $domain->clone(
user => user_admin
,name => new_domain_name
);
is($clone->id_base,$domain->id);
$clone->start(user_admin);
}
end();
done_testing();
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