1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

- follow in test suite the old/new setlinkrev behaviour

This commit is contained in:
Adrian Schröter 2014-05-16 11:58:36 +02:00
parent c7222540e3
commit f29a1b6e79

View File

@ -39,20 +39,21 @@ class TestSetLinkRev(OscTestCase):
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', expand=True)
@GET('http://localhost/source/osctest/simple/_link', file='link_with_rev')
@GET('http://localhost/source/srcprj/srcpkg?rev=latest', file='simple_filesremote')
@PUT('http://localhost/source/osctest/simple/_link',
exp='<link package="srcpkg" project="srcprj" rev="7" />', text='dummytext')
exp='<link package="srcpkg" project="srcprj" rev="42" />', text='dummytext')
def test_existingrev(self):
"""link already has a rev attribute (no expand)"""
"""link already has a rev attribute, update it to current version"""
# we could also avoid the superfluous PUT
osc.core.set_link_rev('http://localhost', 'osctest', 'simple')
@GET('http://localhost/source/osctest/simple/_link', file='link_with_rev')
@GET('http://localhost/source/srcprj/srcpkg?rev=7&expand=1', file='expandedsrc_filesremote')
@GET('http://localhost/source/srcprj/srcpkg?rev=latest&expand=1', file='expandedsrc_filesremote')
@PUT('http://localhost/source/osctest/simple/_link',
exp='<link package="srcpkg" project="srcprj" rev="eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" vrev="1" />',
text='dummytext')
def test_expandexistingrev(self):
"""link already has a rev attribute (expand it)"""
"""link already has a rev attribute, update it to current version"""
osc.core.set_link_rev('http://localhost', 'osctest', 'simple', expand=True)
@GET('http://localhost/source/osctest/simple/_link', file='simple_link')