mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 01:16:14 +01:00
- initial testcases for the new update mechanism
some generic stuff from test_update.py will be moved into a new module later
This commit is contained in:
parent
5447dfbf12
commit
b6a2266a5e
256
tests/test_update.py
Normal file
256
tests/test_update.py
Normal file
@ -0,0 +1,256 @@
|
||||
import unittest
|
||||
import urllib2
|
||||
import osc.core
|
||||
import osc.oscerr
|
||||
import StringIO
|
||||
import shutil
|
||||
import tempfile
|
||||
import os
|
||||
import sys
|
||||
from xml.etree import cElementTree as ET
|
||||
FIXTURES_DIR = os.path.join(os.getcwd(), 'update_fixtures')
|
||||
EXPECTED_REQUESTS = []
|
||||
|
||||
class RequestWrongOrder(Exception):
|
||||
"""issued if an unexpected request is issued to urllib2"""
|
||||
def __init__(self, url, exp_url, method, exp_method):
|
||||
Exception.__init__(self)
|
||||
self.url = url
|
||||
self.exp_url = exp_url
|
||||
self.method = method
|
||||
self.exp_method = exp_method
|
||||
|
||||
def __str__(self):
|
||||
return '%s, %s, %s, %s' % (self.url, self.exp_url, self.method, self.exp_method)
|
||||
|
||||
def get_response(url, **kwargs):
|
||||
f = None
|
||||
if not kwargs.has_key('text') and kwargs.has_key('file'):
|
||||
f = StringIO.StringIO(open(os.path.join(FIXTURES_DIR, kwargs['file']), 'r').read())
|
||||
elif kwargs.has_key('text') and not kwargs.has_key('file'):
|
||||
f = StringIO.StringIO(kwargs['text'])
|
||||
else:
|
||||
raise RuntimeError('either specify text or file')
|
||||
resp = urllib2.addinfourl(f, '', url)
|
||||
resp.code = 200
|
||||
resp.msg = ''
|
||||
return resp
|
||||
|
||||
def mock_GET(fullurl, **kwargs):
|
||||
return get_response(fullurl, **kwargs)
|
||||
|
||||
class MyHTTPHandler(urllib2.HTTPHandler):
|
||||
def __init__(self, exp_requests):
|
||||
self.exp_requests = exp_requests
|
||||
|
||||
def http_open(self, req):
|
||||
r = self.exp_requests.pop(0)
|
||||
if req.get_full_url() != r[1] and req.get_method() == r[0]:
|
||||
raise RequestWrongOrder(req.get_full_url(), r[1], req.get_method(), r[0])
|
||||
if req.get_method() == 'GET':
|
||||
return mock_GET(r[1], **r[2])
|
||||
|
||||
def GET(fullurl, **kwargs):
|
||||
def decorate(test_method):
|
||||
def wrapped_test_method(*args):
|
||||
addExpectedRequest('GET', fullurl, **kwargs)
|
||||
test_method(*args)
|
||||
return wrapped_test_method
|
||||
return decorate
|
||||
|
||||
def addExpectedRequest(method, url, **kwargs):
|
||||
global EXPECTED_REQUESTS
|
||||
EXPECTED_REQUESTS.append((method, url, kwargs))
|
||||
|
||||
class TestUpdate(unittest.TestCase):
|
||||
def setUp(self):
|
||||
osc.core.conf.get_config(override_conffile=os.path.join(FIXTURES_DIR, 'oscrc'))
|
||||
self.tmpdir = tempfile.mkdtemp(prefix='osc_test')
|
||||
shutil.copytree(os.path.join(FIXTURES_DIR, 'osctest'), os.path.join(self.tmpdir, 'osctest'))
|
||||
global EXPECTED_REQUESTS
|
||||
EXPECTED_REQUESTS = []
|
||||
urllib2.install_opener(urllib2.build_opener(MyHTTPHandler(EXPECTED_REQUESTS)))
|
||||
self.stdout = sys.stdout
|
||||
sys.stdout = StringIO.StringIO()
|
||||
|
||||
def tearDown(self):
|
||||
sys.stdout = self.stdout
|
||||
try:
|
||||
shutil.rmtree(self.tmpdir)
|
||||
except:
|
||||
pass
|
||||
|
||||
@GET('http://localhost/source/osctest/simple?rev=latest', file='testUpdateNoChanges_files')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateNoChanges(self):
|
||||
"""update without any changes (the wc is the most recent version)"""
|
||||
self.__change_to_pkg('simple')
|
||||
osc.core.Package('.').update()
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
self.assertEqual(sys.stdout.getvalue(), 'At revision 1.\n')
|
||||
|
||||
@GET('http://localhost/source/osctest/simple?rev=2', file='testUpdateNewFile_files')
|
||||
@GET('http://localhost/source/osctest/simple/upstream_added?rev=2', file='testUpdateNewFile_upstream_added')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateNewFile(self):
|
||||
"""a new file was added to the remote package"""
|
||||
self.__change_to_pkg('simple')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'A upstream_added\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.__check_digests('testUpdateNewFile_files')
|
||||
|
||||
@GET('http://localhost/source/osctest/simple?rev=2', file='testUpdateNewFileLocalExists_files')
|
||||
def testUpdateNewFileLocalExists(self):
|
||||
"""
|
||||
a new file was added to the remote package but the same (unversioned)
|
||||
file exists locally
|
||||
"""
|
||||
self.__change_to_pkg('simple')
|
||||
self.assertRaises(osc.oscerr.PackageFileConflict, osc.core.Package('.').update, rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
|
||||
@GET('http://localhost/source/osctest/simple?rev=2', file='testUpdateDeletedFile_files')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateDeletedFile(self):
|
||||
"""a file was deleted from the remote package"""
|
||||
self.__change_to_pkg('simple')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'D foo\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.__check_digests('testUpdateDeletedFile_files')
|
||||
self.assertFalse(os.path.exists('foo'))
|
||||
self.assertFalse(os.path.exists(os.path.join('.osc', 'foo')))
|
||||
|
||||
@GET('http://localhost/source/osctest/simple?rev=2', file='testUpdateUpstreamModifiedFile_files')
|
||||
@GET('http://localhost/source/osctest/simple/foo?rev=2', file='testUpdateUpstreamModifiedFile_foo')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateUpstreamModifiedFile(self):
|
||||
"""a file was modified in the remote package (local file isn't modified)"""
|
||||
|
||||
self.__change_to_pkg('simple')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'U foo\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.__check_digests('testUpdateUpstreamModifiedFile_files')
|
||||
|
||||
@GET('http://localhost/source/osctest/conflict?rev=2', file='testUpdateConflict_files')
|
||||
@GET('http://localhost/source/osctest/conflict/merge?rev=2', file='testUpdateConflict_merge')
|
||||
@GET('http://localhost/source/osctest/conflict/_meta', file='meta.xml')
|
||||
def testUpdateConflict(self):
|
||||
"""
|
||||
a file was modified in the remote package (local file is also modified
|
||||
and a merge isn't possible)
|
||||
"""
|
||||
self.__change_to_pkg('conflict')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'C merge\nAt revision 2.\n'
|
||||
self.__check_digests('testUpdateConflict_files')
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertEqual(open(os.path.join('.osc', '_in_conflict'), 'r').read(), 'merge\n')
|
||||
|
||||
@GET('http://localhost/source/osctest/already_in_conflict?rev=2', file='testUpdateAlreadyInConflict_files')
|
||||
@GET('http://localhost/source/osctest/already_in_conflict/merge?rev=2', file='testUpdateAlreadyInConflict_merge')
|
||||
@GET('http://localhost/source/osctest/already_in_conflict/_meta', file='meta.xml')
|
||||
def testUpdateAlreadyInConflict(self):
|
||||
"""
|
||||
a file was modified in the remote package (the local file is already in conflict)
|
||||
"""
|
||||
self.__change_to_pkg('already_in_conflict')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'skipping \'merge\' (this is due to conflicts)\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.__check_digests('testUpdateAlreadyInConflict_files')
|
||||
|
||||
@GET('http://localhost/source/osctest/deleted?rev=2', file='testUpdateLocalDeletions_files')
|
||||
@GET('http://localhost/source/osctest/deleted/foo?rev=2', file='testUpdateLocalDeletions_foo')
|
||||
@GET('http://localhost/source/osctest/deleted/merge?rev=2', file='testUpdateLocalDeletions_merge')
|
||||
@GET('http://localhost/source/osctest/deleted/_meta', file='meta.xml')
|
||||
def testUpdateLocalDeletions(self):
|
||||
"""
|
||||
the files 'foo' and 'merge' were modified in the remote package
|
||||
and marked for deletion in the local wc. Additionally the file
|
||||
'merge' was modified in the wc before deletion so the local file
|
||||
still exists (and a merge with the remote file is not possible)
|
||||
"""
|
||||
self.__change_to_pkg('deleted')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'U foo\nC merge\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertEqual(open(os.path.join('.osc', '_to_be_deleted'), 'r').read(), 'foo\n')
|
||||
self.assertEqual(open(os.path.join('.osc', '_in_conflict'), 'r').read(), 'merge\n')
|
||||
self.assertEqual(open('foo', 'r').read(), open(os.path.join('.osc', 'foo'), 'r').read())
|
||||
self.__check_digests('testUpdateLocalDeletions_files')
|
||||
|
||||
@GET('http://localhost/source/osctest/restore?rev=latest', file='testUpdateRestore_files')
|
||||
@GET('http://localhost/source/osctest/restore/foo', file='testUpdateRestore_foo')
|
||||
@GET('http://localhost/source/osctest/restore/_meta', file='meta.xml')
|
||||
def testUpdateRestore(self):
|
||||
"""local file 'foo' was deleted with a non osc command and will be restored"""
|
||||
self.__change_to_pkg('restore')
|
||||
osc.core.Package('.').update()
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'Restored \'foo\'\nAt revision 1.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.__check_digests('testUpdateRestore_files')
|
||||
|
||||
# tests to recover from an aborted/broken update
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/foo?rev=2', file='testUpdateResume_foo')
|
||||
@GET('http://localhost/source/osctest/simple/merge?rev=2', file='testUpdateResume_merge')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
@GET('http://localhost/source/osctest/simple?rev=2', file='testUpdateResume_files')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateResume(self):
|
||||
"""resume an aborted update"""
|
||||
self.__change_to_pkg('resume')
|
||||
osc.core.Package('.').update(rev=2)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'resuming broken update...\nU foo\nU merge\nAt revision 2.\nAt revision 2.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertFalse(os.path.exists(os.path.join('.osc', '_in_update')))
|
||||
self.__check_digests('testUpdateResume_files')
|
||||
|
||||
@GET('http://localhost/source/osctest/simple/foo?rev=1', file='testUpdateResumeDeletedFile_foo')
|
||||
@GET('http://localhost/source/osctest/simple/merge?rev=1', file='testUpdateResumeDeletedFile_merge')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
@GET('http://localhost/source/osctest/simple?rev=1', file='testUpdateResumeDeletedFile_files')
|
||||
@GET('http://localhost/source/osctest/simple/_meta', file='meta.xml')
|
||||
def testUpdateResumeDeletedFile(self):
|
||||
"""
|
||||
resume an aborted update (the file 'added' was already deleted in the first update
|
||||
run). It's marked as deleted again (this is due to an expected issue with the update
|
||||
code)
|
||||
"""
|
||||
self.__change_to_pkg('resume_deleted')
|
||||
osc.core.Package('.').update(rev=1)
|
||||
self.assertTrue(len(EXPECTED_REQUESTS) == 0)
|
||||
exp = 'resuming broken update...\nD added\nU foo\nU merge\nAt revision 1.\nAt revision 1.\n'
|
||||
self.assertEqual(sys.stdout.getvalue(), exp)
|
||||
self.assertFalse(os.path.exists(os.path.join('.osc', '_in_update')))
|
||||
self.__check_digests('testUpdateResumeDeletedFile_files')
|
||||
|
||||
def __expected_requests(self, *args):
|
||||
self.assertTrue(len(self.exp_requests) == 0)
|
||||
for i in args:
|
||||
self.exp_requests.append(i)
|
||||
|
||||
def __change_to_pkg(self, name):
|
||||
os.chdir(os.path.join(self.tmpdir, 'osctest', name))
|
||||
|
||||
def __check_digests(self, fname):
|
||||
fname = os.path.join(FIXTURES_DIR, fname)
|
||||
self.assertEqual(open(os.path.join('.osc', '_files'), 'r').read(), open(fname, 'r').read())
|
||||
root = ET.parse(fname).getroot()
|
||||
for i in root.findall('entry'):
|
||||
self.assertTrue(os.path.exists(os.path.join('.osc', i.get('name'))))
|
||||
self.assertEqual(osc.core.dgst(os.path.join('.osc', i.get('name'))), i.get('md5'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
8
tests/update_fixtures/meta.xml
Normal file
8
tests/update_fixtures/meta.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<package project="osctest" name="simple">
|
||||
<title/>
|
||||
<description>
|
||||
|
||||
</description>
|
||||
<person userid="Admin" role="maintainer"/>
|
||||
<person userid="Admin" role="bugowner"/>
|
||||
</package>
|
104
tests/update_fixtures/oscrc
Normal file
104
tests/update_fixtures/oscrc
Normal file
@ -0,0 +1,104 @@
|
||||
[general]
|
||||
# URL to access API server, e.g. https://api.opensuse.org
|
||||
# you also need a section [https://api.opensuse.org] with the credentials
|
||||
apiurl = http://localhost
|
||||
# Downloaded packages are cached here. Must be writable by you.
|
||||
#packagecachedir = /var/tmp/osbuild-packagecache
|
||||
# Wrapper to call build as root (sudo, su -, ...)
|
||||
#su-wrapper = su -c
|
||||
# rootdir to setup the chroot environment
|
||||
# can contain %(repo)s, %(arch)s, %(project)s and %(package)s for replacement, e.g.
|
||||
# /srv/oscbuild/%(repo)s-%(arch)s or
|
||||
# /srv/oscbuild/%(repo)s-%(arch)s-%(project)s-%(package)s
|
||||
#build-root = /var/tmp/build-root
|
||||
# compile with N jobs (default: "getconf _NPROCESSORS_ONLN")
|
||||
#build-jobs = N
|
||||
# build-type to use - values can be (depending on the capabilities of the 'build' script)
|
||||
# empty - chroot build
|
||||
# kvm - kvm VM build (needs build-device, build-swap, build-memory)
|
||||
# xen - xen VM build (needs build-device, build-swap, build-memory)
|
||||
# experimental:
|
||||
# qemu - qemu VM build
|
||||
# lxc - lxc build
|
||||
#build-type =
|
||||
# build-device is the disk-image file to use as root for VM builds
|
||||
# e.g. /var/tmp/FILE.root
|
||||
#build-device = /var/tmp/FILE.root
|
||||
# build-swap is the disk-image to use as swap for VM builds
|
||||
# e.g. /var/tmp/FILE.swap
|
||||
#build-swap = /var/tmp/FILE.swap
|
||||
# build-memory is the amount of memory used in the VM
|
||||
# value in MB - e.g. 512
|
||||
#build-memory = 512
|
||||
# build-vmdisk-rootsize is the size of the disk-image used as root in a VM build
|
||||
# values in MB - e.g. 4096
|
||||
#build-vmdisk-rootsize = 4096
|
||||
# build-vmdisk-swapsize is the size of the disk-image used as swap in a VM build
|
||||
# values in MB - e.g. 1024
|
||||
#build-vmdisk-swapsize = 1024
|
||||
# Numeric uid:gid to assign to the "abuild" user in the build-root
|
||||
# or "caller" to use the current users uid:gid
|
||||
# This is convenient when sharing the buildroot with ordinary userids
|
||||
# on the host.
|
||||
# This should not be 0
|
||||
# build-uid =
|
||||
# extra packages to install when building packages locally (osc build)
|
||||
# this corresponds to osc build's -x option and can be overridden with that
|
||||
# -x '' can also be given on the command line to override this setting, or
|
||||
# you can have an empty setting here.
|
||||
#extra-pkgs = vim gdb strace
|
||||
# build platform is used if the platform argument is omitted to osc build
|
||||
#build_repository = openSUSE_Factory
|
||||
# default project for getpac or bco
|
||||
#getpac_default_project = openSUSE:Factory
|
||||
# alternate filesystem layout: have multiple subdirs, where colons were.
|
||||
#checkout_no_colon = 0
|
||||
# local files to ignore with status, addremove, ....
|
||||
#exclude_glob = .osc CVS .svn .* _linkerror *~ #*# *.orig *.bak *.changes.*
|
||||
# keep passwords in plaintext. If you see this comment, your osc
|
||||
# already uses the encrypted password, and only keeps them in plain text
|
||||
# for backwards compatibility. Default will change to 0 in future releases.
|
||||
# You can remove the plaintext password without harm, if you do not need
|
||||
# backwards compatibility.
|
||||
#plaintext_passwd = 1
|
||||
# limit the age of requests shown with 'osc req list'.
|
||||
# this is a default only, can be overridden by 'osc req list -D NNN'
|
||||
# Use 0 for unlimted.
|
||||
#request_list_days = 0
|
||||
# show info useful for debugging
|
||||
#debug = 1
|
||||
# show HTTP traffic useful for debugging
|
||||
#http_debug = 1
|
||||
# Skip signature verification of packages used for build.
|
||||
#no_verify = 1
|
||||
# jump into the debugger in case of errors
|
||||
#post_mortem = 1
|
||||
# print call traces in case of errors
|
||||
#traceback = 1
|
||||
# use KDE/Gnome/MacOS/Windows keyring for credentials if available
|
||||
#use_keyring = 1
|
||||
# check for unversioned/removed files before commit
|
||||
#check_filelist = 1
|
||||
# check for pending requests after executing an action (e.g. checkout, update, commit)
|
||||
#check_for_request_on_action = 0
|
||||
# what to do with the source package if the submitrequest has been accepted. If
|
||||
# nothing is specified the API default is used
|
||||
#submitrequest_on_accept_action = cleanup|update|noupdate
|
||||
#review requests interactively (default: off)
|
||||
#request_show_review = 1
|
||||
# Directory with executables to validate sources, esp before committing
|
||||
#source_validator_directory = /usr/lib/osc/source_validators
|
||||
|
||||
[http://localhost]
|
||||
user = Admin
|
||||
pass = opensuse
|
||||
passx = QlpoOTFBWSZTWeTSblkAAAGBgAIBygAgADDACGNEHxaYXckU4UJDk0m5ZA==
|
||||
# set aliases for this apiurl
|
||||
# aliases = foo, bar
|
||||
# email used in .changes, unless the one from osc meta prj <user> will be used
|
||||
# email =
|
||||
# additional headers to pass to a request, e.g. for special authentication
|
||||
#http_headers = Host: foofoobar,
|
||||
# User: mumblegack
|
||||
# Force using of keyring for this API
|
||||
#keyring = 1
|
1
tests/update_fixtures/osctest/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
1
tests/update_fixtures/osctest/.osc/_packages
Normal file
1
tests/update_fixtures/osctest/.osc/_packages
Normal file
@ -0,0 +1 @@
|
||||
<project name="osctest" />
|
1
tests/update_fixtures/osctest/.osc/_project
Normal file
1
tests/update_fixtures/osctest/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
@ -0,0 +1 @@
|
||||
http://localhost
|
@ -0,0 +1,5 @@
|
||||
<directory name="already_in_conflict" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282133912" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282133912" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282133912" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
merge
|
@ -0,0 +1,8 @@
|
||||
<package project="osctest" name="already_in_conflict">
|
||||
<title/>
|
||||
<description>
|
||||
|
||||
</description>
|
||||
<person userid="Admin" role="maintainer"/>
|
||||
<person userid="Admin" role="bugowner"/>
|
||||
</package>
|
@ -0,0 +1 @@
|
||||
1.0
|
@ -0,0 +1 @@
|
||||
already_in_conflict
|
@ -0,0 +1 @@
|
||||
osctest
|
@ -0,0 +1 @@
|
||||
This is a simple test.
|
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/already_in_conflict/foo
Normal file
1
tests/update_fixtures/osctest/already_in_conflict/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
2
tests/update_fixtures/osctest/already_in_conflict/merge
Normal file
2
tests/update_fixtures/osctest/already_in_conflict/merge
Normal file
@ -0,0 +1,2 @@
|
||||
Is it
|
||||
I hope so...
|
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/conflict/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/conflict/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
5
tests/update_fixtures/osctest/conflict/.osc/_files
Normal file
5
tests/update_fixtures/osctest/conflict/.osc/_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="conflict" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282130148" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282130148" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282130148" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/conflict/.osc/_package
Normal file
1
tests/update_fixtures/osctest/conflict/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
conflict
|
1
tests/update_fixtures/osctest/conflict/.osc/_project
Normal file
1
tests/update_fixtures/osctest/conflict/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
1
tests/update_fixtures/osctest/conflict/.osc/foo
Normal file
1
tests/update_fixtures/osctest/conflict/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/conflict/.osc/merge
Normal file
4
tests/update_fixtures/osctest/conflict/.osc/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/conflict/.osc/nochange
Normal file
1
tests/update_fixtures/osctest/conflict/.osc/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/conflict/foo
Normal file
1
tests/update_fixtures/osctest/conflict/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/conflict/merge
Normal file
4
tests/update_fixtures/osctest/conflict/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it possible
|
||||
to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/conflict/nochange
Normal file
1
tests/update_fixtures/osctest/conflict/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/deleted/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/deleted/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
5
tests/update_fixtures/osctest/deleted/.osc/_files
Normal file
5
tests/update_fixtures/osctest/deleted/.osc/_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="deleted" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282134731" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282134731" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282134731" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/deleted/.osc/_package
Normal file
1
tests/update_fixtures/osctest/deleted/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
deleted
|
1
tests/update_fixtures/osctest/deleted/.osc/_project
Normal file
1
tests/update_fixtures/osctest/deleted/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
@ -0,0 +1,2 @@
|
||||
merge
|
||||
foo
|
1
tests/update_fixtures/osctest/deleted/.osc/foo
Normal file
1
tests/update_fixtures/osctest/deleted/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/deleted/.osc/merge
Normal file
4
tests/update_fixtures/osctest/deleted/.osc/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/deleted/.osc/nochange
Normal file
1
tests/update_fixtures/osctest/deleted/.osc/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
3
tests/update_fixtures/osctest/deleted/merge
Normal file
3
tests/update_fixtures/osctest/deleted/merge
Normal file
@ -0,0 +1,3 @@
|
||||
Is it possible to,
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/deleted/nochange
Normal file
1
tests/update_fixtures/osctest/deleted/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/restore/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/restore/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
5
tests/update_fixtures/osctest/restore/.osc/_files
Normal file
5
tests/update_fixtures/osctest/restore/.osc/_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="restore" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/restore/.osc/_package
Normal file
1
tests/update_fixtures/osctest/restore/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
restore
|
1
tests/update_fixtures/osctest/restore/.osc/_project
Normal file
1
tests/update_fixtures/osctest/restore/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
1
tests/update_fixtures/osctest/restore/.osc/foo
Normal file
1
tests/update_fixtures/osctest/restore/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/restore/.osc/merge
Normal file
4
tests/update_fixtures/osctest/restore/.osc/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/restore/.osc/nochange
Normal file
1
tests/update_fixtures/osctest/restore/.osc/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
0
tests/update_fixtures/osctest/restore/exists
Normal file
0
tests/update_fixtures/osctest/restore/exists
Normal file
4
tests/update_fixtures/osctest/restore/merge
Normal file
4
tests/update_fixtures/osctest/restore/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/restore/nochange
Normal file
1
tests/update_fixtures/osctest/restore/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/resume/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/resume/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
5
tests/update_fixtures/osctest/resume/.osc/_files
Normal file
5
tests/update_fixtures/osctest/resume/.osc/_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="simple" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1,6 @@
|
||||
<directory name="simple" rev="2" srcmd5="3ac41c59a5ed169d5ffef4d824700f7d" vrev="2">
|
||||
<entry md5="ff22941336956098ae9a564289d1bf1b" mtime="1282137256" name="added" size="15" />
|
||||
<entry md5="14758f1afd44c09b7992073ccf00b43d" mtime="1282137220" name="foo" size="7" />
|
||||
<entry md5="256d8f76ba7a0a231fb46a84866f25d8" mtime="1282137238" name="merge" size="20" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
1
tests/update_fixtures/osctest/resume/.osc/_in_update/foo
Normal file
1
tests/update_fixtures/osctest/resume/.osc/_in_update/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
8
tests/update_fixtures/osctest/resume/.osc/_meta
Normal file
8
tests/update_fixtures/osctest/resume/.osc/_meta
Normal file
@ -0,0 +1,8 @@
|
||||
<package project="osctest" name="simple">
|
||||
<title/>
|
||||
<description>
|
||||
|
||||
</description>
|
||||
<person userid="Admin" role="maintainer"/>
|
||||
<person userid="Admin" role="bugowner"/>
|
||||
</package>
|
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/resume/.osc/_package
Normal file
1
tests/update_fixtures/osctest/resume/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
simple
|
1
tests/update_fixtures/osctest/resume/.osc/_project
Normal file
1
tests/update_fixtures/osctest/resume/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
1
tests/update_fixtures/osctest/resume/.osc/added
Normal file
1
tests/update_fixtures/osctest/resume/.osc/added
Normal file
@ -0,0 +1 @@
|
||||
This is a test
|
1
tests/update_fixtures/osctest/resume/.osc/foo
Normal file
1
tests/update_fixtures/osctest/resume/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/resume/.osc/merge
Normal file
4
tests/update_fixtures/osctest/resume/.osc/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/resume/.osc/nochange
Normal file
1
tests/update_fixtures/osctest/resume/.osc/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/resume/added
Normal file
1
tests/update_fixtures/osctest/resume/added
Normal file
@ -0,0 +1 @@
|
||||
This is a test
|
0
tests/update_fixtures/osctest/resume/exists
Normal file
0
tests/update_fixtures/osctest/resume/exists
Normal file
1
tests/update_fixtures/osctest/resume/foo
Normal file
1
tests/update_fixtures/osctest/resume/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/resume/merge
Normal file
4
tests/update_fixtures/osctest/resume/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/resume/nochange
Normal file
1
tests/update_fixtures/osctest/resume/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
@ -0,0 +1 @@
|
||||
http://localhost
|
6
tests/update_fixtures/osctest/resume_deleted/.osc/_files
Normal file
6
tests/update_fixtures/osctest/resume_deleted/.osc/_files
Normal file
@ -0,0 +1,6 @@
|
||||
<directory name="simple" rev="5" srcmd5="3ac41c59a5ed169d5ffef4d824700f7d" vrev="5">
|
||||
<entry md5="ff22941336956098ae9a564289d1bf1b" mtime="1282137256" name="added" size="15" />
|
||||
<entry md5="14758f1afd44c09b7992073ccf00b43d" mtime="1282137220" name="foo" size="7" />
|
||||
<entry md5="256d8f76ba7a0a231fb46a84866f25d8" mtime="1282137238" name="merge" size="20" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1,5 @@
|
||||
<directory name="simple" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
foobar
|
8
tests/update_fixtures/osctest/resume_deleted/.osc/_meta
Normal file
8
tests/update_fixtures/osctest/resume_deleted/.osc/_meta
Normal file
@ -0,0 +1,8 @@
|
||||
<package project="osctest" name="simple">
|
||||
<title/>
|
||||
<description>
|
||||
|
||||
</description>
|
||||
<person userid="Admin" role="maintainer"/>
|
||||
<person userid="Admin" role="bugowner"/>
|
||||
</package>
|
@ -0,0 +1 @@
|
||||
1.0
|
@ -0,0 +1 @@
|
||||
simple
|
@ -0,0 +1 @@
|
||||
osctest
|
1
tests/update_fixtures/osctest/resume_deleted/.osc/foo
Normal file
1
tests/update_fixtures/osctest/resume_deleted/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
foobar
|
5
tests/update_fixtures/osctest/resume_deleted/.osc/merge
Normal file
5
tests/update_fixtures/osctest/resume_deleted/.osc/merge
Normal file
@ -0,0 +1,5 @@
|
||||
xxx
|
||||
xxx
|
||||
yyy
|
||||
zzz
|
||||
zzz
|
@ -0,0 +1 @@
|
||||
This file didn't change.
|
0
tests/update_fixtures/osctest/resume_deleted/exists
Normal file
0
tests/update_fixtures/osctest/resume_deleted/exists
Normal file
1
tests/update_fixtures/osctest/resume_deleted/f
Normal file
1
tests/update_fixtures/osctest/resume_deleted/f
Normal file
@ -0,0 +1 @@
|
||||
This is a test
|
1
tests/update_fixtures/osctest/resume_deleted/foo
Normal file
1
tests/update_fixtures/osctest/resume_deleted/foo
Normal file
@ -0,0 +1 @@
|
||||
foobar
|
5
tests/update_fixtures/osctest/resume_deleted/merge
Normal file
5
tests/update_fixtures/osctest/resume_deleted/merge
Normal file
@ -0,0 +1,5 @@
|
||||
xxx
|
||||
xxx
|
||||
yyy
|
||||
zzz
|
||||
zzz
|
1
tests/update_fixtures/osctest/resume_deleted/nochange
Normal file
1
tests/update_fixtures/osctest/resume_deleted/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
1
tests/update_fixtures/osctest/simple/.osc/_apiurl
Normal file
1
tests/update_fixtures/osctest/simple/.osc/_apiurl
Normal file
@ -0,0 +1 @@
|
||||
http://localhost
|
5
tests/update_fixtures/osctest/simple/.osc/_files
Normal file
5
tests/update_fixtures/osctest/simple/.osc/_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="simple" rev="1" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="1">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
|
||||
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
|
||||
</directory>
|
@ -0,0 +1 @@
|
||||
1.0
|
1
tests/update_fixtures/osctest/simple/.osc/_package
Normal file
1
tests/update_fixtures/osctest/simple/.osc/_package
Normal file
@ -0,0 +1 @@
|
||||
simple
|
1
tests/update_fixtures/osctest/simple/.osc/_project
Normal file
1
tests/update_fixtures/osctest/simple/.osc/_project
Normal file
@ -0,0 +1 @@
|
||||
osctest
|
1
tests/update_fixtures/osctest/simple/.osc/foo
Normal file
1
tests/update_fixtures/osctest/simple/.osc/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/simple/.osc/merge
Normal file
4
tests/update_fixtures/osctest/simple/.osc/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
1
tests/update_fixtures/osctest/simple/.osc/nochange
Normal file
1
tests/update_fixtures/osctest/simple/.osc/nochange
Normal file
@ -0,0 +1 @@
|
||||
This file didn't change.
|
0
tests/update_fixtures/osctest/simple/exists
Normal file
0
tests/update_fixtures/osctest/simple/exists
Normal file
1
tests/update_fixtures/osctest/simple/foo
Normal file
1
tests/update_fixtures/osctest/simple/foo
Normal file
@ -0,0 +1 @@
|
||||
This is a simple test.
|
4
tests/update_fixtures/osctest/simple/merge
Normal file
4
tests/update_fixtures/osctest/simple/merge
Normal file
@ -0,0 +1,4 @@
|
||||
Is it
|
||||
possible to
|
||||
merge this file?
|
||||
I hope so...
|
2
tests/update_fixtures/osctest/simple/nochange
Normal file
2
tests/update_fixtures/osctest/simple/nochange
Normal file
@ -0,0 +1,2 @@
|
||||
This file didn't change but
|
||||
is modified.
|
5
tests/update_fixtures/testUpdateAlreadyInConflict_files
Normal file
5
tests/update_fixtures/testUpdateAlreadyInConflict_files
Normal file
@ -0,0 +1,5 @@
|
||||
<directory name="already_in_conflict" rev="2" srcmd5="686b725018c89978678e15daa666ff85" vrev="2">
|
||||
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282133912" name="foo" size="23" />
|
||||
<entry md5="14758f1afd44c09b7992073ccf00b43d" mtime="1282134056" name="merge" size="7" />
|
||||
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282133912" name="nochange" size="25" />
|
||||
</directory>
|
1
tests/update_fixtures/testUpdateAlreadyInConflict_merge
Normal file
1
tests/update_fixtures/testUpdateAlreadyInConflict_merge
Normal file
@ -0,0 +1 @@
|
||||
foobar
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user