mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 18:16:17 +01:00
- fixed _meta_mode + added testcase
This commit is contained in:
parent
947971b2a2
commit
3ac330f7cd
@ -1734,7 +1734,8 @@ rev: %s
|
||||
progress_obj=self.progress_obj, mtime=f.mtime, meta=self.meta)
|
||||
print statfrmt('A', os.path.join(pathn, f.name))
|
||||
store_write_string(self.absdir, '_files', fm + '\n')
|
||||
self.update_local_pacmeta()
|
||||
if not self.meta:
|
||||
self.update_local_pacmeta()
|
||||
self.update_datastructs()
|
||||
|
||||
print 'At revision %s.' % self.rev
|
||||
|
@ -189,6 +189,21 @@ class TestUpdate(OscTestCase):
|
||||
self.assertTrue(os.path.exists('_service:exists'))
|
||||
self._check_digests('testUpdateServiceFilesAddDelete_files', '_service:foo', '_service:bar')
|
||||
|
||||
@GET('http://localhost/source/osctest/metamode?meta=1&rev=latest', file='testUpdateMetaMode_filesremote')
|
||||
@GET('http://localhost/source/osctest/metamode/_meta?rev=1', file='testUpdateMetaMode__meta')
|
||||
def testUpdateMetaMode(self):
|
||||
"""update package with metamode enabled"""
|
||||
self._change_to_pkg('metamode')
|
||||
p = osc.core.Package('.')
|
||||
p.update()
|
||||
exp = 'A _meta\nD foo\nD merge\nD nochange\nAt revision 1.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertFalse(os.path.exists('foo'))
|
||||
self.assertFalse(os.path.exists('merge'))
|
||||
self.assertFalse(os.path.exists('nochange'))
|
||||
self._check_digests('testUpdateMetaMode_filesremote')
|
||||
self._check_status(p, '_meta', ' ')
|
||||
|
||||
# tests to recover from an aborted/broken update
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/foo?rev=2', file='testUpdateResume_foo')
|
||||
|
Loading…
Reference in New Issue
Block a user