Commit bba3a056 authored by Fernando Verdugo's avatar Fernando Verdugo
Browse files

fix(database): upgrade table

issue #1603
parent 31f10073
...@@ -2227,7 +2227,7 @@ sub _upgrade_tables { ...@@ -2227,7 +2227,7 @@ sub _upgrade_tables {
$self->_upgrade_table('requests','at_time','int(11) DEFAULT NULL'); $self->_upgrade_table('requests','at_time','int(11) DEFAULT NULL');
$self->_upgrade_table('requests','run_time','float DEFAULT NULL'); $self->_upgrade_table('requests','run_time','float DEFAULT NULL');
$self->_upgrade_table('requests','retry','int(11) DEFAULT NULL'); $self->_upgrade_table('requests','retry','int(11) DEFAULT NULL');
$self->_upgrade_table('requests','args','char(255)'); $self->_upgrade_table('requests','args','TEXT');
$self->_upgrade_table('iso_images','rename_file','varchar(80) DEFAULT NULL'); $self->_upgrade_table('iso_images','rename_file','varchar(80) DEFAULT NULL');
$self->_clean_iso_mini(); $self->_clean_iso_mini();
......
...@@ -1812,6 +1812,27 @@ sub test_removed_leftover($vm) { ...@@ -1812,6 +1812,27 @@ sub test_removed_leftover($vm) {
Test::Ravada::_check_leftovers(); Test::Ravada::_check_leftovers();
} }
sub test_long_iso($vm) {
my $iso_file = '/var/lib/libvirt/'.('a' x 1250);
my $req;
eval { $req = Ravada::Request->create_domain( name => 'a', id_template => 1
, iso_file => $iso_file
, id_owner => user_admin->id
, vm => $vm->type
);
};
is($@,'');
if ($req) {
is($req->args('iso_file'), $iso_file);
my $req2 = Ravada::Request->open($req->id);
is($req2->args('iso_file'), $iso_file);
}
}
#######################################################################33 #######################################################################33
for my $db ( 'mysql', 'sqlite' ) { for my $db ( 'mysql', 'sqlite' ) {
...@@ -1819,7 +1840,7 @@ for my $db ( 'mysql', 'sqlite' ) { ...@@ -1819,7 +1840,7 @@ for my $db ( 'mysql', 'sqlite' ) {
if ($db eq 'mysql') { if ($db eq 'mysql') {
init('/etc/ravada.conf',0, 1); init('/etc/ravada.conf',0, 1);
if ( !ping_backend() ) { if ( !ping_backend() ) {
diag("no backend"); diag("SKIPPED: no backend running");
next; next;
} }
$Test::Ravada::BACKGROUND=1; $Test::Ravada::BACKGROUND=1;
...@@ -1866,6 +1887,7 @@ for my $vm_name ( vm_names() ) { ...@@ -1866,6 +1887,7 @@ for my $vm_name ( vm_names() ) {
} }
flush_rules() if !$<; flush_rules() if !$<;
test_long_iso($vm);
test_change_display_settings($vm); test_change_display_settings($vm);
test_display_drivers($vm,0); test_display_drivers($vm,0);
test_display_drivers($vm,1); #remove after testing display type test_display_drivers($vm,1); #remove after testing display type
......
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