Commit 7e90aad6 authored by eskumon's avatar eskumon
Browse files

fix(frontend): save screenshot in database

    Modifies the test with the new functions

    fixes #1180
parent f8fd524f
...@@ -153,6 +153,23 @@ sub test_start { ...@@ -153,6 +153,23 @@ sub test_start {
} }
sub test_screenshot_db {
my $vm_name = shift;
my $domain_name = shift;
my $domain = $RAVADA->search_domain($domain_name);
$domain->start($USER) if !$domain->is_active();
return if !$domain->can_screenshot();
sleep 2;
$domain->screenshot();
$domain->shutdown(user => $USER, timeout => 1);
my $sth = connector->dbh->prepare("SELECT screenshot FROM domains WHERE id=?");
$sth->execute($domain->id);
my @fields = $sth->fetchrow;
ok($fields[0]);
}
sub test_screenshot { sub test_screenshot {
my $vm_name = shift; my $vm_name = shift;
my $domain_name = shift; my $domain_name = shift;
...@@ -247,8 +264,7 @@ for my $vm_name (qw(KVM Void)) { ...@@ -247,8 +264,7 @@ for my $vm_name (qw(KVM Void)) {
my $domain_name = $domain->name; my $domain_name = $domain->name;
$domain = undef; $domain = undef;
test_screenshot($vm_name, $domain_name); test_screenshot_db($vm_name, $domain_name);
test_screenshot_file($vm_name, $domain_name);
}; };
} }
clean(); clean();
......
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