commit 18bca97c60ae78d5f7c5d2defa50c5a925a62f2d
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed Jun 10 15:24:01 2015 +0200
[test] Add test for rhbz#1230193
test/maven_depmap_test.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/test/maven_depmap_test.py b/test/maven_depmap_test.py
index 399ac10..5185069 100644
--- a/test/maven_depmap_test.py
+++ b/test/maven_depmap_test.py
@@ -5,11 +5,12 @@ import os
import unittest
import shutil
from test_common import DIRPATH, mvn_depmap, call_script, prepare_metadata
-
+from test_rpmbuild import Package
from lxml import etree
from xml_compare import compare_lxml_etree
+
class TestMavenDepmap(unittest.TestCase):
maxDiff = 2048
@@ -328,5 +329,12 @@ class TestMavenDepmap(unittest.TestCase):
depmap)
self.assertEqual(report, '', report)
+ def test_missing_jar(self):
+ p = Package('test')
+ p.append_to_prep("%add_maven_depmap g:a:1 this/file/doesnt/exist.jar")
+ _, stderr, return_value = p.run_prep()
+ self.assertEqual(1, return_value, 'bad return value')
+ self.assertIn('file not found', stderr)
+
if __name__ == '__main__':
unittest.main()
Show replies by date