| |
@@ -132,6 +132,8 @@
|
| |
def tearDown(self):
|
| |
if os.path.exists('bodhi.template'):
|
| |
os.unlink('bodhi.template')
|
| |
+ if os.path.exists('bodhi.template.last'):
|
| |
+ os.unlink('bodhi.template.last')
|
| |
os.unlink(os.path.join(self.cloned_repo_path, 'clog'))
|
| |
self.user_patcher.stop()
|
| |
self.os_environ_patcher.stop()
|
| |
@@ -376,6 +378,17 @@
|
| |
'update', '--bugs', '1000', '1001', '100l'
|
| |
])
|
| |
|
| |
+ def test_reserve_edited_template_on_error(self):
|
| |
+ cli_cmd = ['fedpkg-stage', '--path', self.cloned_repo_path, 'update']
|
| |
+ cli = self.get_cli(cli_cmd)
|
| |
+
|
| |
+ try:
|
| |
+ self.assert_bodhi_update(cli, update_type='xxx')
|
| |
+ except rpkgError:
|
| |
+ pass
|
| |
+
|
| |
+ self.assertTrue(os.path.exists('bodhi.template.last'))
|
| |
+
|
| |
|
| |
@patch.object(BugzillaClient, 'client')
|
| |
class TestRequestRepo(CliTestCase):
|
| |
Edited Bodhi template is reserved on error in case any input by packager
is lost. The file is named
bodhi.template.last
.Resolves: rhbz#1467897
Signed-off-by: Chenxiong Qi cqi@redhat.com
Fixes #157