1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

- new testcase for a package without a revision

This commit is contained in:
Marcus Huewe 2010-09-06 18:11:12 +02:00
parent 1043bc8145
commit acbf2dabd5
7 changed files with 18 additions and 0 deletions

View File

@ -236,6 +236,17 @@ class TestUpdate(OscTestCase):
self._check_digests('testUpdateMetaMode_filesremote')
self._check_status(p, '_meta', ' ')
@GET('http://localhost/source/osctest/new?rev=latest', file='testUpdateNew_filesremote')
@GET('http://localhost/source/osctest/new/_meta', file='meta.xml')
def testUpdateNew(self):
"""update a new (empty) package. The package has no revision."""
self._change_to_pkg('new')
p = osc.core.Package('.')
p.update()
exp = 'At revision None.\n'
self.assertEqual(sys.stdout.getvalue(), exp)
self._check_digests('testUpdateNew_filesremote')
# tests to recover from an aborted/broken update
@GET('http://localhost/source/osctest/simple/foo?rev=2', file='testUpdateResume_foo')

View File

@ -0,0 +1 @@
http://localhost

View File

@ -0,0 +1 @@
<directory name="new" />

View File

@ -0,0 +1 @@
1.0

View File

@ -0,0 +1 @@
new

View File

@ -0,0 +1 @@
osctest

View File

@ -0,0 +1,2 @@
<directory name="new">
</directory>