Modified probe tests to work with setup.py develop installs
Updated SAIO instructions to note that probe tests will reset your environment Added the swift.egg-info directory to .bzrignore Updated setup.py to correctly ignore the test directory when installing
This commit is contained in:
commit
2ee5d7ee9c
@ -1,3 +1,4 @@
|
|||||||
*.py[co]
|
*.py[co]
|
||||||
*.sw?
|
*.sw?
|
||||||
doc/build/*
|
doc/build/*
|
||||||
|
swift.egg-info
|
||||||
|
@ -443,13 +443,13 @@ good idea what to do on other environments.
|
|||||||
collate = C
|
collate = C
|
||||||
|
|
||||||
#. `cd ~/swift/trunk; ./.functests`
|
#. `cd ~/swift/trunk; ./.functests`
|
||||||
#. `cd ~/swift/trunk; ./.probetests`
|
#. `cd ~/swift/trunk; ./.probetests` (Note for future reference: probe tests
|
||||||
|
will reset your environment)
|
||||||
|
|
||||||
If you plan to work on documentation (and who doesn't?!):
|
If you plan to work on documentation (and who doesn't?!):
|
||||||
|
|
||||||
#. `sudo apt-get install python-sphinx`
|
#. `sudo apt-get install python-sphinx`
|
||||||
#. `cd ~/swift/doc`
|
#. `python setup.py build_sphinx`
|
||||||
#. `make html`
|
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
Debugging Issues
|
Debugging Issues
|
||||||
|
2
setup.py
2
setup.py
@ -26,7 +26,7 @@ setup(
|
|||||||
license='Apache License (2.0)',
|
license='Apache License (2.0)',
|
||||||
author='OpenStack, LLC.',
|
author='OpenStack, LLC.',
|
||||||
url='https://launchpad.net/swift',
|
url='https://launchpad.net/swift',
|
||||||
packages=find_packages(exclude=['tests','bin']),
|
packages=find_packages(exclude=['test','bin']),
|
||||||
test_suite = 'nose.collector',
|
test_suite = 'nose.collector',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
|
@ -35,15 +35,15 @@ def reset_environment():
|
|||||||
call(['resetswift'])
|
call(['resetswift'])
|
||||||
pids = {}
|
pids = {}
|
||||||
try:
|
try:
|
||||||
pids['auth'] = Popen(['/usr/bin/swift-auth-server',
|
pids['auth'] = Popen(['swift-auth-server',
|
||||||
'/etc/swift/auth-server.conf']).pid
|
'/etc/swift/auth-server.conf']).pid
|
||||||
pids['proxy'] = Popen(['/usr/bin/swift-proxy-server',
|
pids['proxy'] = Popen(['swift-proxy-server',
|
||||||
'/etc/swift/proxy-server.conf']).pid
|
'/etc/swift/proxy-server.conf']).pid
|
||||||
port2server = {}
|
port2server = {}
|
||||||
for s, p in (('account', 6002), ('container', 6001), ('object', 6000)):
|
for s, p in (('account', 6002), ('container', 6001), ('object', 6000)):
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
pids['%s%d' % (s, n)] = \
|
pids['%s%d' % (s, n)] = \
|
||||||
Popen(['/usr/bin/swift-%s-server' % s,
|
Popen(['swift-%s-server' % s,
|
||||||
'/etc/swift/%s-server/%d.conf' % (s, n)]).pid
|
'/etc/swift/%s-server/%d.conf' % (s, n)]).pid
|
||||||
port2server[p + (n * 10)] = '%s%d' % (s, n)
|
port2server[p + (n * 10)] = '%s%d' % (s, n)
|
||||||
account_ring = Ring('/etc/swift/account.ring.gz')
|
account_ring = Ring('/etc/swift/account.ring.gz')
|
||||||
@ -69,7 +69,7 @@ def get_to_final_state():
|
|||||||
for job in ('account-replicator', 'container-replicator',
|
for job in ('account-replicator', 'container-replicator',
|
||||||
'object-replicator'):
|
'object-replicator'):
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
ps.append(Popen(['/usr/bin/swift-%s' % job,
|
ps.append(Popen(['swift-%s' % job,
|
||||||
'/etc/swift/%s-server/%d.conf' %
|
'/etc/swift/%s-server/%d.conf' %
|
||||||
(job.split('-')[0], n),
|
(job.split('-')[0], n),
|
||||||
'once']))
|
'once']))
|
||||||
@ -78,7 +78,7 @@ def get_to_final_state():
|
|||||||
ps = []
|
ps = []
|
||||||
for job in ('container-updater', 'object-updater'):
|
for job in ('container-updater', 'object-updater'):
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
ps.append(Popen(['/usr/bin/swift-%s' % job,
|
ps.append(Popen(['swift-%s' % job,
|
||||||
'/etc/swift/%s-server/%d.conf' %
|
'/etc/swift/%s-server/%d.conf' %
|
||||||
(job.split('-')[0], n),
|
(job.split('-')[0], n),
|
||||||
'once']))
|
'once']))
|
||||||
@ -88,7 +88,7 @@ def get_to_final_state():
|
|||||||
for job in ('account-replicator', 'container-replicator',
|
for job in ('account-replicator', 'container-replicator',
|
||||||
'object-replicator'):
|
'object-replicator'):
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
ps.append(Popen(['/usr/bin/swift-%s' % job,
|
ps.append(Popen(['swift-%s' % job,
|
||||||
'/etc/swift/%s-server/%d.conf' %
|
'/etc/swift/%s-server/%d.conf' %
|
||||||
(job.split('-')[0], n),
|
(job.split('-')[0], n),
|
||||||
'once']))
|
'once']))
|
||||||
|
@ -110,7 +110,7 @@ class TestAccountFailures(unittest.TestCase):
|
|||||||
|
|
||||||
ps = []
|
ps = []
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
ps.append(Popen(['/usr/bin/swift-container-updater',
|
ps.append(Popen(['swift-container-updater',
|
||||||
'/etc/swift/container-server/%d.conf' % n,
|
'/etc/swift/container-server/%d.conf' % n,
|
||||||
'once']))
|
'once']))
|
||||||
for p in ps:
|
for p in ps:
|
||||||
@ -130,7 +130,7 @@ class TestAccountFailures(unittest.TestCase):
|
|||||||
self.assert_(found2)
|
self.assert_(found2)
|
||||||
|
|
||||||
self.pids[self.port2server[anodes[0]['port']]] = \
|
self.pids[self.port2server[anodes[0]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-account-server',
|
Popen(['swift-account-server',
|
||||||
'/etc/swift/account-server/%d.conf' %
|
'/etc/swift/account-server/%d.conf' %
|
||||||
((anodes[0]['port'] - 6002) / 10)]).pid
|
((anodes[0]['port'] - 6002) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
@ -59,7 +59,7 @@ class TestContainerFailures(unittest.TestCase):
|
|||||||
client.get_container(self.url, self.token, container)])
|
client.get_container(self.url, self.token, container)])
|
||||||
|
|
||||||
self.pids[self.port2server[cnodes[0]['port']]] = \
|
self.pids[self.port2server[cnodes[0]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnodes[0]['port'] - 6001) / 10)]).pid
|
((cnodes[0]['port'] - 6001) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -135,7 +135,7 @@ class TestContainerFailures(unittest.TestCase):
|
|||||||
client.get_container(self.url, self.token, container)])
|
client.get_container(self.url, self.token, container)])
|
||||||
|
|
||||||
self.pids[self.port2server[cnodes[1]['port']]] = \
|
self.pids[self.port2server[cnodes[1]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnodes[1]['port'] - 6001) / 10)]).pid
|
((cnodes[1]['port'] - 6001) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -210,7 +210,7 @@ class TestContainerFailures(unittest.TestCase):
|
|||||||
|
|
||||||
for x in xrange(2):
|
for x in xrange(2):
|
||||||
self.pids[self.port2server[cnodes[x]['port']]] = \
|
self.pids[self.port2server[cnodes[x]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnodes[x]['port'] - 6001) / 10)]).pid
|
((cnodes[x]['port'] - 6001) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -288,7 +288,7 @@ class TestContainerFailures(unittest.TestCase):
|
|||||||
|
|
||||||
for x in (1, 2):
|
for x in (1, 2):
|
||||||
self.pids[self.port2server[cnodes[x]['port']]] = \
|
self.pids[self.port2server[cnodes[x]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnodes[x]['port'] - 6001) / 10)]).pid
|
((cnodes[x]['port'] - 6001) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
@ -47,7 +47,7 @@ class TestObjectAsyncUpdate(unittest.TestCase):
|
|||||||
obj = 'object-%s' % uuid4()
|
obj = 'object-%s' % uuid4()
|
||||||
client.put_object(self.url, self.token, container, obj, '')
|
client.put_object(self.url, self.token, container, obj, '')
|
||||||
self.pids[self.port2server[cnode['port']]] = \
|
self.pids[self.port2server[cnode['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnode['port'] - 6001) / 10)]).pid
|
((cnode['port'] - 6001) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -55,7 +55,7 @@ class TestObjectAsyncUpdate(unittest.TestCase):
|
|||||||
self.account, container))
|
self.account, container))
|
||||||
ps = []
|
ps = []
|
||||||
for n in xrange(1, 5):
|
for n in xrange(1, 5):
|
||||||
ps.append(Popen(['/usr/bin/swift-object-updater',
|
ps.append(Popen(['swift-object-updater',
|
||||||
'/etc/swift/object-server/%d.conf' % n, 'once']))
|
'/etc/swift/object-server/%d.conf' % n, 'once']))
|
||||||
for p in ps:
|
for p in ps:
|
||||||
p.wait()
|
p.wait()
|
||||||
|
@ -61,7 +61,7 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
'returned: %s' % repr(odata))
|
'returned: %s' % repr(odata))
|
||||||
for node in onodes[1:]:
|
for node in onodes[1:]:
|
||||||
self.pids[self.port2server[node['port']]] = Popen([
|
self.pids[self.port2server[node['port']]] = Popen([
|
||||||
'/usr/bin/swift-object-server',
|
'swift-object-server',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((node['port'] - 6000) / 10)]).pid
|
((node['port'] - 6000) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -86,7 +86,7 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
'Container server %s:%s did not know about object' %
|
'Container server %s:%s did not know about object' %
|
||||||
(cnode['ip'], cnode['port']))
|
(cnode['ip'], cnode['port']))
|
||||||
self.pids[self.port2server[onode['port']]] = Popen([
|
self.pids[self.port2server[onode['port']]] = Popen([
|
||||||
'/usr/bin/swift-object-server',
|
'swift-object-server',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((onode['port'] - 6000) / 10)]).pid
|
((onode['port'] - 6000) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -101,12 +101,12 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
# Run the extra server last so it'll remove it's extra partition
|
# Run the extra server last so it'll remove it's extra partition
|
||||||
ps = []
|
ps = []
|
||||||
for n in onodes:
|
for n in onodes:
|
||||||
ps.append(Popen(['/usr/bin/swift-object-replicator',
|
ps.append(Popen(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((n['port'] - 6000) / 10), 'once']))
|
((n['port'] - 6000) / 10), 'once']))
|
||||||
for p in ps:
|
for p in ps:
|
||||||
p.wait()
|
p.wait()
|
||||||
call(['/usr/bin/swift-object-replicator',
|
call(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((another_onode['port'] - 6000) / 10), 'once'])
|
((another_onode['port'] - 6000) / 10), 'once'])
|
||||||
odata = direct_client.direct_get_object(onode, opart, self.account,
|
odata = direct_client.direct_get_object(onode, opart, self.account,
|
||||||
@ -139,7 +139,7 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
raise Exception('Handoff server claimed it had the object when '
|
raise Exception('Handoff server claimed it had the object when '
|
||||||
'it should not have it')
|
'it should not have it')
|
||||||
self.pids[self.port2server[onode['port']]] = Popen([
|
self.pids[self.port2server[onode['port']]] = Popen([
|
||||||
'/usr/bin/swift-object-server',
|
'swift-object-server',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((onode['port'] - 6000) / 10)]).pid
|
((onode['port'] - 6000) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -151,12 +151,12 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
# Run the extra server last so it'll remove it's extra partition
|
# Run the extra server last so it'll remove it's extra partition
|
||||||
ps = []
|
ps = []
|
||||||
for n in onodes:
|
for n in onodes:
|
||||||
ps.append(Popen(['/usr/bin/swift-object-replicator',
|
ps.append(Popen(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((n['port'] - 6000) / 10), 'once']))
|
((n['port'] - 6000) / 10), 'once']))
|
||||||
for p in ps:
|
for p in ps:
|
||||||
p.wait()
|
p.wait()
|
||||||
call(['/usr/bin/swift-object-replicator',
|
call(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((another_onode['port'] - 6000) / 10), 'once'])
|
((another_onode['port'] - 6000) / 10), 'once'])
|
||||||
ometadata = direct_client.direct_get_object(onode, opart, self.account,
|
ometadata = direct_client.direct_get_object(onode, opart, self.account,
|
||||||
@ -187,7 +187,7 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
'Container server %s:%s still knew about object' %
|
'Container server %s:%s still knew about object' %
|
||||||
(cnode['ip'], cnode['port']))
|
(cnode['ip'], cnode['port']))
|
||||||
self.pids[self.port2server[onode['port']]] = Popen([
|
self.pids[self.port2server[onode['port']]] = Popen([
|
||||||
'/usr/bin/swift-object-server',
|
'swift-object-server',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((onode['port'] - 6000) / 10)]).pid
|
((onode['port'] - 6000) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
@ -196,12 +196,12 @@ class TestObjectHandoff(unittest.TestCase):
|
|||||||
# Run the extra server last so it'll remove it's extra partition
|
# Run the extra server last so it'll remove it's extra partition
|
||||||
ps = []
|
ps = []
|
||||||
for n in onodes:
|
for n in onodes:
|
||||||
ps.append(Popen(['/usr/bin/swift-object-replicator',
|
ps.append(Popen(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((n['port'] - 6000) / 10), 'once']))
|
((n['port'] - 6000) / 10), 'once']))
|
||||||
for p in ps:
|
for p in ps:
|
||||||
p.wait()
|
p.wait()
|
||||||
call(['/usr/bin/swift-object-replicator',
|
call(['swift-object-replicator',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((another_onode['port'] - 6000) / 10), 'once'])
|
((another_onode['port'] - 6000) / 10), 'once'])
|
||||||
exc = False
|
exc = False
|
||||||
|
@ -72,15 +72,15 @@ class TestRunningWithEachTypeDown(unittest.TestCase):
|
|||||||
self.assert_(found1)
|
self.assert_(found1)
|
||||||
|
|
||||||
self.pids[self.port2server[anodes[0]['port']]] = \
|
self.pids[self.port2server[anodes[0]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-account-server',
|
Popen(['swift-account-server',
|
||||||
'/etc/swift/account-server/%d.conf' %
|
'/etc/swift/account-server/%d.conf' %
|
||||||
((anodes[0]['port'] - 6002) / 10)]).pid
|
((anodes[0]['port'] - 6002) / 10)]).pid
|
||||||
self.pids[self.port2server[cnodes[0]['port']]] = \
|
self.pids[self.port2server[cnodes[0]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-container-server',
|
Popen(['swift-container-server',
|
||||||
'/etc/swift/container-server/%d.conf' %
|
'/etc/swift/container-server/%d.conf' %
|
||||||
((cnodes[0]['port'] - 6001) / 10)]).pid
|
((cnodes[0]['port'] - 6001) / 10)]).pid
|
||||||
self.pids[self.port2server[onodes[0]['port']]] = \
|
self.pids[self.port2server[onodes[0]['port']]] = \
|
||||||
Popen(['/usr/bin/swift-object-server',
|
Popen(['swift-object-server',
|
||||||
'/etc/swift/object-server/%d.conf' %
|
'/etc/swift/object-server/%d.conf' %
|
||||||
((onodes[0]['port'] - 6000) / 10)]).pid
|
((onodes[0]['port'] - 6000) / 10)]).pid
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user