mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-24 22:06:14 +01:00
- added new testcase
This commit is contained in:
parent
31f14c7abe
commit
0502e81b26
@ -191,10 +191,7 @@ class TestUpdate(OscTestCase):
|
||||
@GET('http://localhost/source/osctest/services/_service%3Afoo?rev=2', file='testUpdateServiceFilesAddDelete__service:foo')
|
||||
@GET('http://localhost/source/osctest/services/_meta', file='meta.xml')
|
||||
def testUpdateAddDeleteServiceFiles(self):
|
||||
"""
|
||||
a new file was added to the remote package but isn't checked out because
|
||||
of the size constraint
|
||||
"""
|
||||
"""update package with _service:* files"""
|
||||
self._change_to_pkg('services')
|
||||
osc.core.Package('.').update(service_files=True)
|
||||
exp = 'A bigfile\nD _service:exists\nA _service:bar\nA _service:foo\nAt revision 2.\n'
|
||||
@ -208,6 +205,22 @@ class TestUpdate(OscTestCase):
|
||||
self.assertTrue(os.path.exists('_service:exists'))
|
||||
self._check_digests('testUpdateServiceFilesAddDelete_files', '_service:foo', '_service:bar')
|
||||
|
||||
@GET('http://localhost/source/osctest/services?rev=latest', file='testUpdateServiceFilesAddDelete_filesremote')
|
||||
@GET('http://localhost/source/osctest/services/bigfile?rev=2', file='testUpdateServiceFilesAddDelete_bigfile')
|
||||
@GET('http://localhost/source/osctest/services/_meta', file='meta.xml')
|
||||
def testUpdateDisableAddDeleteServiceFiles(self):
|
||||
"""update package with _service:* files (with service_files=False)"""
|
||||
self._change_to_pkg('services')
|
||||
osc.core.Package('.').update()
|
||||
exp = 'A bigfile\nD _service:exists\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertFalse(os.path.exists(os.path.join('.osc', '_service:bar')))
|
||||
self.assertFalse(os.path.exists('_service:bar'))
|
||||
self.assertFalse(os.path.exists(os.path.join('.osc', '_service:foo')))
|
||||
self.assertFalse(os.path.exists('_service:foo'))
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user