Skip to content

Commit

Permalink
tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Sedlák committed May 16, 2016
1 parent aabed41 commit 403ce25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/api/02-iso.t
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ $ret = $t->get_ok("/api/v1/jobs/$newid")->status_is(200);
is($ret->tx->res->json->{job}->{settings}->{KERNEL}, 'vmlinuz', "parameter KERNEL is correctly set from KERNEL_URL");

# Having parameter without _URL and the same with _URL will not overwrite it
my $expected_missing = qr/asset name '.*' invalid or does not exist/; # posting both KERNEL and KERNEL_URL results in warning about missing file from KERNEL parameter
my $expected_missing = qr/asset name '.*' invalid or does not exist/; # posting both KERNEL and KERNEL_URL results in warning about missing file from KERNEL parameter
@warnings = warnings { $rsp = $t->post_ok('/api/v1/isos', form => {ISO => $iso, KERNEL => 'vmlinuz.img.20160516', KERNEL_URL => 'http://localhost/vmlinuz', DISTRI => 'opensuse', VERSION => '13.1', FLAVOR => 'DVD', ARCH => 'i586', BUILD => '0091'})->status_is(200) };
map { ok($_ =~ $expected || $_ =~ $expected_missing , 'expected warning') } @warnings;
map { ok($_ =~ $expected || $_ =~ $expected_missing, 'expected warning') } @warnings;

$newid = @{$ret->tx->res->json->{ids}}[0];
$ret = $t->get_ok("/api/v1/jobs/$newid")->status_is(200);
Expand Down

0 comments on commit 403ce25

Please sign in to comment.