02_import_base.t 644 Bytes
Newer Older
Francesc Guasch's avatar
Francesc Guasch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();