aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();