Commit f6423c1a authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(test): login again if timed out

parent ef3c2cb0
...@@ -599,6 +599,7 @@ sub test_new_machine_empty($t, $vm_name) { ...@@ -599,6 +599,7 @@ sub test_new_machine_empty($t, $vm_name) {
for my $iso_name ( 'Empty%32', 'Empty%64') { for my $iso_name ( 'Empty%32', 'Empty%64') {
my $name = new_domain_name(); my $name = new_domain_name();
mojo_check_login($t);
$t->post_ok('/new_machine.html' => form => { $t->post_ok('/new_machine.html' => form => {
backend => $vm_name backend => $vm_name
,id_iso => search_id_iso($iso_name) ,id_iso => search_id_iso($iso_name)
...@@ -747,6 +748,7 @@ sub test_new_machine_change_iso($t, $vm_name) { ...@@ -747,6 +748,7 @@ sub test_new_machine_change_iso($t, $vm_name) {
sub test_create_base($t, $vm_name, $name) { sub test_create_base($t, $vm_name, $name) {
my $iso_name = 'Alpine%'; my $iso_name = 'Alpine%';
_download_iso($iso_name); _download_iso($iso_name);
mojo_check_login($t);
$t->post_ok('/new_machine.html' => form => { $t->post_ok('/new_machine.html' => form => {
backend => $vm_name backend => $vm_name
,id_iso => search_id_iso($iso_name) ,id_iso => search_id_iso($iso_name)
......
...@@ -255,6 +255,7 @@ sub test_missing_routes() { ...@@ -255,6 +255,7 @@ sub test_missing_routes() {
next if $href =~ /anonymous/; next if $href =~ /anonymous/;
my $href2 = _fill_href($href); my $href2 = _fill_href($href);
mojo_check_login($t);
$t->get_ok($href2, "file: $file href='$href'"); $t->get_ok($href2, "file: $file href='$href'");
like($t->tx->res->code(),qr/200|302|40\d+|500/) or die $t->tx->res->to_string(); like($t->tx->res->code(),qr/200|302|40\d+|500/) or die $t->tx->res->to_string();
} }
......
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