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:
parent
1043bc8145
commit
acbf2dabd5
@ -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')
|
||||
|
1
tests/update_fixtures/osctest/new/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/new/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
1
tests/update_fixtures/osctest/new/.osc/_files
Normal file
1
tests/update_fixtures/osctest/new/.osc/_files
Normal file
@ -0,0 +1 @@
|
||||
<directory name="new" />
|
1
tests/update_fixtures/osctest/new/.osc/_osclib_version
Normal file
1
tests/update_fixtures/osctest/new/.osc/_osclib_version
Normal file
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/new/.osc/_package
Normal file
1
tests/update_fixtures/osctest/new/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
new
|
1
tests/update_fixtures/osctest/new/.osc/_project
Normal file
1
tests/update_fixtures/osctest/new/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
2
tests/update_fixtures/testUpdateNew_filesremote
Normal file
2
tests/update_fixtures/testUpdateNew_filesremote
Normal file
@ -0,0 +1,2 @@
|
||||
<directory name="new">
|
||||
</directory>
|
Loading…
Reference in New Issue
Block a user