aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-08-28 22:56:34 +0100
committerPascal Terjan <pterjan@mageia.org>2017-08-28 22:56:45 +0100
commitd94fefb095565cdbda9fdf68bad5d19508ff6cd6 (patch)
tree71453ac3621cf74ca8ac02267e2dd73aed533f31
parentd906550f69732c205217cc16e48f3e2e9d667361 (diff)
downloadiurt-d94fefb095565cdbda9fdf68bad5d19508ff6cd6.tar
iurt-d94fefb095565cdbda9fdf68bad5d19508ff6cd6.tar.gz
iurt-d94fefb095565cdbda9fdf68bad5d19508ff6cd6.tar.bz2
iurt-d94fefb095565cdbda9fdf68bad5d19508ff6cd6.tar.xz
iurt-d94fefb095565cdbda9fdf68bad5d19508ff6cd6.zip
Add one more test for emi
-rw-r--r--t/emi_finisher.t49
1 files changed, 49 insertions, 0 deletions
diff --git a/t/emi_finisher.t b/t/emi_finisher.t
index c34ce2a..e710732 100644
--- a/t/emi_finisher.t
+++ b/t/emi_finisher.t
@@ -68,6 +68,36 @@ my %pkg_tree = (
'@922855:iurt-test-package-1.4.0-2.mga6.src.rpm',
],
},
+ '20160113183432.nobody.valstar.23516' => {
+ 'target' => 'cauldron',
+ 'media' => {
+ 'core/release' => {
+ 'uploaded' => 1,
+ 'done_arch' => {
+ 'armv5tl' => 1,
+ 'i586' => 1,
+ 'x86_64' => 1,
+ 'src' => 1
+ },
+ 'rpms' => [
+ 'iurt-test-package-debuginfo-1.4.0-2.mga6.armv5tl.rpm',
+ 'iurt-test-package-1.4.0-2.mga6.armv5tl.rpm',
+ 'iurt-test-package-doc-1.4.0-2.mga6.noarch.rpm',
+ '@922855:iurt-test-package-1.4.0-2.mga6.src.rpm',
+ ],
+ 'path' => '/cauldron/core/release',
+ }
+ },
+ 'rpms' => [
+ '@922855:iurt-test-package-1.4.0-2.mga6.src.rpm',
+ 'iurt-test-package-debuginfo-1.4.0-2.mga6.armv5tl.rpm',
+ 'iurt-test-package-1.4.0-2.mga6.armv5tl.rpm',
+ 'iurt-test-package-doc-1.4.0-2.mga6.noarch.rpm',
+ ],
+ 'srpms' => [
+ '@922855:iurt-test-package-1.4.0-2.mga6.src.rpm',
+ ],
+ },
);
my %targets = find_prefixes_ready_to_upload($config, %pkg_tree);
@@ -77,4 +107,23 @@ is($targets{cauldron}{'core/release'}{arch_finisher}{x86_64}, '20160113183431.no
is($targets{cauldron}{'core/release'}{arch_finisher}{armv5tl}, '20160113183432.nobody.valstar.23515');
ok(!$targets{cauldron}{'core/release'}{arch_finisher}{noarch});
+foreach my $target (keys %targets) {
+ foreach my $media (keys %{$targets{$target}}) {
+ my %is_finisher;
+
+ foreach (values %{$targets{$target}{$media}{arch_finisher}}) {
+ $is_finisher{$_} = 1;
+ }
+
+ foreach my $prefix (@{$targets{$target}{$media}{to_upload}}) {
+ next if $is_finisher{$prefix};
+ is($prefix, '20160113183432.nobody.valstar.23516');
+ }
+
+ foreach my $prefix (keys %is_finisher) {
+ isnt($prefix, '20160113183432.nobody.valstar.23516');
+ }
+ }
+}
+
done_testing();