Skip to content

Commit

Permalink
Revert "[backend] improved testing bdep"
Browse files Browse the repository at this point in the history
This reverts commit 9f8f301.
  • Loading branch information
mlschroe committed Mar 20, 2023
1 parent ee16b52 commit 9ae03c1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/backend/t/0160-BSSched-BuildJob-KiwiProduct.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use strict;
use warnings;

use Test::More tests => 1735.; # last test to print
use Test::More tests => 7; # last test to print
use Data::Dumper;
use FindBin;
use BSUtil;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/t/0170-BSSched-BuildJob-Package.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use strict;
use warnings;

use Test::More tests => 114; # last test to print
use Test::More tests => 9; # last test to print
use Data::Dumper;
use FindBin;
use BSUtil;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/t/0360-BSRepServer-BuildInfo-Package.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use Test::OBS::Utils;
use Test::OBS;
use Test::Mock::BSRepServer::Checker;

use Test::More tests => 208; # last test to print
use Test::More tests => 3; # last test to print

use BSUtil;
use BSXML;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/t/0370-BSRepServer-BuildInfo-KiwiImage.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use Test::OBS::Utils;
use Test::OBS;
use Test::Mock::BSRepServer::Checker;

use Test::More tests => 1074; # last test to print
use Test::More tests => 3; # last test to print

use BSUtil;
use BSXML;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/t/0380-BSRepServer-BuildInfo-KiwiProduct.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use Test::OBS::Utils;
use Test::OBS;
use Test::Mock::BSRepServer::Checker;

use Test::More tests => 1576; # last test to print
use Test::More tests => 2; # last test to print

use BSUtil;
use BSXML;
Expand Down
15 changes: 1 addition & 14 deletions src/backend/t/lib/Test/OBS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package Test::OBS;

use strict;
use warnings;
use Data::Dumper;

use Exporter;
@Test::OBS::ISA = ("Exporter");
Expand All @@ -35,25 +34,13 @@ sub bdepkey {

sub cmp_buildinfo {
my ($got, $expected, $comment) = @_;
#print Dumper($got->{bdep});

delete $_->{'hdrmd5'} for @{$got->{'bdep'} || []};
$got->{'bdep'} = [ sort {bdepkey($a) cmp bdepkey($b)} @{$got->{'bdep'} || []} ];
$expected->{'bdep'} = [ sort {bdepkey($a) cmp bdepkey($b)} @{$expected->{'bdep'} || []} ];
$got->{subpack} = [ sort { $a cmp $b } @{ $got->{subpack} || []} ];
$expected->{subpack} = [ sort { $a cmp $b } @{ $expected->{subpack} || []} ];
my $got_bdeps = scalar @{$got->{bdep}};
my $exp_bdeps = scalar @{$expected->{bdep}};
ok($got_bdeps == $exp_bdeps, 'equal number of bdeps');
my $c1=0;
while ($c1<$got_bdeps) {
is_deeply($got->{bdep}->[$c1], $expected->{bdep}->[$c1], "$comment bdep $c1") || print Dumper($got->{bdep}->[$c1], $expected->{bdep}->[$c1]);
$c1++;
}
delete $got->{bdep};
delete $expected->{bdep};

is_deeply($got, $expected, "$comment");
is_deeply($got, $expected, $comment);
}

1;

0 comments on commit 9ae03c1

Please sign in to comment.