mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 09:26:14 +01:00
- adjusted testsuite for the latest setlinkrev changes
This commit is contained in:
parent
e1080aa476
commit
e247cf358c
@ -1,4 +1,4 @@
|
||||
<directory name="srcpkg" rev="42" srcmd5="ffffffffffffffffffffffffffffffff" vrev="1">
|
||||
<directory name="srcpkg" rev="abcdeeeeeeeeeeeeeeeeeeeeeeeeeeee" srcmd5="abcdeeeeeeeeeeeeeeeeeeeeeeeeeeee" vrev="1">
|
||||
<linkinfo project="srcsrcprj" package="srcsrcpkg" srcmd5="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" baserev="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" xsrcmd5="abcdeeeeeeeeeeeeeeeeeeeeeeeeeeee" lsrcmd5="cccccccccccccccccccccccccccccccc" />
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="_link" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<directory name="srcpkg" rev="42" srcmd5="ffffffffffffffffffffffffffffffff" vrev="1">
|
||||
<directory name="srcpkg" rev="eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" srcmd5="eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" vrev="1">
|
||||
<linkinfo project="srcsrcprj" package="srcsrcpkg" srcmd5="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" baserev="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" xsrcmd5="eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" lsrcmd5="cccccccccccccccccccccccccccccccc" />
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="_link" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
|
@ -1,5 +0,0 @@
|
||||
<directory name="srcpkg" rev="42" srcmd5="ffffffffffffffffffffffffffffffff" vrev="1">
|
||||
<linkinfo project="srcsrcprj" package="srcsrcpkg" baserev="704450154e7f9ae6c27f0f8317a69781" xsrcmd5="b484571d7189720a5dc8e81bd1ca58ca" error="conflict in file merge" />
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="_link" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
</directory>
|
@ -31,15 +31,15 @@ class TestSetLinkRev(OscTestCase):
|
||||
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', '42')
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/_link', file='noproject_link')
|
||||
@GET('http://localhost/source/osctest/srcpkg?rev=latest', file='expandedsrc_filesremote')
|
||||
@GET('http://localhost/source/osctest/srcpkg?rev=latest&expand=1', file='expandedsrc_filesremote')
|
||||
@PUT('http://localhost/source/osctest/simple/_link',
|
||||
exp='<link package="srcpkg" rev="eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" />', text='dummytext')
|
||||
def test_expandedsrc(self):
|
||||
"""expand src package"""
|
||||
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', xsrcmd5=True)
|
||||
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', expand=True)
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/_link', file='simple_link')
|
||||
@GET('http://localhost/source/srcprj/srcpkg?linkrev=base&rev=latest', file='baserev_filesremote')
|
||||
@GET('http://localhost/source/srcprj/srcpkg?linkrev=base&rev=latest&expand=1', file='baserev_filesremote')
|
||||
@PUT('http://localhost/source/osctest/simple/_link',
|
||||
exp='<link package="srcpkg" project="srcprj" rev="abcdeeeeeeeeeeeeeeeeeeeeeeeeeeee" />', text='dummytext')
|
||||
def test_baserev(self):
|
||||
@ -47,10 +47,12 @@ class TestSetLinkRev(OscTestCase):
|
||||
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', baserev=True)
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/_link', file='simple_link')
|
||||
@GET('http://localhost/source/srcprj/srcpkg?rev=latest', file='linkerror_filesremote')
|
||||
@GET('http://localhost/source/srcprj/srcpkg?rev=latest&expand=1', text='conflict in file merge', code=404)
|
||||
def test_linkerror(self):
|
||||
"""link is broken"""
|
||||
self.assertRaises(osc.oscerr.LinkExpandError, osc.core.set_link_rev, 'http://localhost', 'osctest', 'simple', xsrcmd5=True)
|
||||
import urllib2
|
||||
# the backend returns status 404 if we try to expand a broken _link
|
||||
self.assertRaises(urllib2.HTTPError, osc.core.set_link_rev, 'http://localhost', 'osctest', 'simple', expand=True)
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/_link', file='rev_link')
|
||||
@PUT('http://localhost/source/osctest/simple/_link',
|
||||
|
Loading…
Reference in New Issue
Block a user