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
This commit is contained in:
Chuck Thier 2010-07-19 03:00:28 +00:00
parent b2ba61b7ee
commit 63538345f2
8 changed files with 31 additions and 30 deletions

View File

@ -1,3 +1,4 @@
*.py[co]
*.sw?
doc/build/*
swift.egg-info

View File

@ -443,13 +443,13 @@ good idea what to do on other environments.
collate = C
#. `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?!):
#. `sudo apt-get install python-sphinx`
#. `cd ~/swift/doc`
#. `make html`
#. `python setup.py build_sphinx`
----------------
Debugging Issues

View File

@ -35,15 +35,15 @@ def reset_environment():
call(['resetswift'])
pids = {}
try:
pids['auth'] = Popen(['/usr/bin/swift-auth-server',
pids['auth'] = Popen(['swift-auth-server',
'/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
port2server = {}
for s, p in (('account', 6002), ('container', 6001), ('object', 6000)):
for n in xrange(1, 5):
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
port2server[p + (n * 10)] = '%s%d' % (s, n)
account_ring = Ring('/etc/swift/account.ring.gz')
@ -69,7 +69,7 @@ def get_to_final_state():
for job in ('account-replicator', 'container-replicator',
'object-replicator'):
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' %
(job.split('-')[0], n),
'once']))
@ -78,7 +78,7 @@ def get_to_final_state():
ps = []
for job in ('container-updater', 'object-updater'):
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' %
(job.split('-')[0], n),
'once']))
@ -88,7 +88,7 @@ def get_to_final_state():
for job in ('account-replicator', 'container-replicator',
'object-replicator'):
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' %
(job.split('-')[0], n),
'once']))

View File

@ -110,7 +110,7 @@ class TestAccountFailures(unittest.TestCase):
ps = []
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,
'once']))
for p in ps:
@ -130,7 +130,7 @@ class TestAccountFailures(unittest.TestCase):
self.assert_(found2)
self.pids[self.port2server[anodes[0]['port']]] = \
Popen(['/usr/bin/swift-account-server',
Popen(['swift-account-server',
'/etc/swift/account-server/%d.conf' %
((anodes[0]['port'] - 6002) / 10)]).pid
sleep(2)

View File

@ -59,7 +59,7 @@ class TestContainerFailures(unittest.TestCase):
client.get_container(self.url, self.token, container)])
self.pids[self.port2server[cnodes[0]['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnodes[0]['port'] - 6001) / 10)]).pid
sleep(2)
@ -135,7 +135,7 @@ class TestContainerFailures(unittest.TestCase):
client.get_container(self.url, self.token, container)])
self.pids[self.port2server[cnodes[1]['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnodes[1]['port'] - 6001) / 10)]).pid
sleep(2)
@ -210,7 +210,7 @@ class TestContainerFailures(unittest.TestCase):
for x in xrange(2):
self.pids[self.port2server[cnodes[x]['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnodes[x]['port'] - 6001) / 10)]).pid
sleep(2)
@ -288,7 +288,7 @@ class TestContainerFailures(unittest.TestCase):
for x in (1, 2):
self.pids[self.port2server[cnodes[x]['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnodes[x]['port'] - 6001) / 10)]).pid
sleep(2)

View File

@ -47,7 +47,7 @@ class TestObjectAsyncUpdate(unittest.TestCase):
obj = 'object-%s' % uuid4()
client.put_object(self.url, self.token, container, obj, '')
self.pids[self.port2server[cnode['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnode['port'] - 6001) / 10)]).pid
sleep(2)
@ -55,7 +55,7 @@ class TestObjectAsyncUpdate(unittest.TestCase):
self.account, container))
ps = []
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']))
for p in ps:
p.wait()

View File

@ -61,7 +61,7 @@ class TestObjectHandoff(unittest.TestCase):
'returned: %s' % repr(odata))
for node in onodes[1:]:
self.pids[self.port2server[node['port']]] = Popen([
'/usr/bin/swift-object-server',
'swift-object-server',
'/etc/swift/object-server/%d.conf' %
((node['port'] - 6000) / 10)]).pid
sleep(2)
@ -86,7 +86,7 @@ class TestObjectHandoff(unittest.TestCase):
'Container server %s:%s did not know about object' %
(cnode['ip'], cnode['port']))
self.pids[self.port2server[onode['port']]] = Popen([
'/usr/bin/swift-object-server',
'swift-object-server',
'/etc/swift/object-server/%d.conf' %
((onode['port'] - 6000) / 10)]).pid
sleep(2)
@ -101,12 +101,12 @@ class TestObjectHandoff(unittest.TestCase):
# Run the extra server last so it'll remove it's extra partition
ps = []
for n in onodes:
ps.append(Popen(['/usr/bin/swift-object-replicator',
ps.append(Popen(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((n['port'] - 6000) / 10), 'once']))
for p in ps:
p.wait()
call(['/usr/bin/swift-object-replicator',
call(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((another_onode['port'] - 6000) / 10), 'once'])
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 '
'it should not have it')
self.pids[self.port2server[onode['port']]] = Popen([
'/usr/bin/swift-object-server',
'swift-object-server',
'/etc/swift/object-server/%d.conf' %
((onode['port'] - 6000) / 10)]).pid
sleep(2)
@ -151,12 +151,12 @@ class TestObjectHandoff(unittest.TestCase):
# Run the extra server last so it'll remove it's extra partition
ps = []
for n in onodes:
ps.append(Popen(['/usr/bin/swift-object-replicator',
ps.append(Popen(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((n['port'] - 6000) / 10), 'once']))
for p in ps:
p.wait()
call(['/usr/bin/swift-object-replicator',
call(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((another_onode['port'] - 6000) / 10), 'once'])
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' %
(cnode['ip'], cnode['port']))
self.pids[self.port2server[onode['port']]] = Popen([
'/usr/bin/swift-object-server',
'swift-object-server',
'/etc/swift/object-server/%d.conf' %
((onode['port'] - 6000) / 10)]).pid
sleep(2)
@ -196,12 +196,12 @@ class TestObjectHandoff(unittest.TestCase):
# Run the extra server last so it'll remove it's extra partition
ps = []
for n in onodes:
ps.append(Popen(['/usr/bin/swift-object-replicator',
ps.append(Popen(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((n['port'] - 6000) / 10), 'once']))
for p in ps:
p.wait()
call(['/usr/bin/swift-object-replicator',
call(['swift-object-replicator',
'/etc/swift/object-server/%d.conf' %
((another_onode['port'] - 6000) / 10), 'once'])
exc = False

View File

@ -72,15 +72,15 @@ class TestRunningWithEachTypeDown(unittest.TestCase):
self.assert_(found1)
self.pids[self.port2server[anodes[0]['port']]] = \
Popen(['/usr/bin/swift-account-server',
Popen(['swift-account-server',
'/etc/swift/account-server/%d.conf' %
((anodes[0]['port'] - 6002) / 10)]).pid
self.pids[self.port2server[cnodes[0]['port']]] = \
Popen(['/usr/bin/swift-container-server',
Popen(['swift-container-server',
'/etc/swift/container-server/%d.conf' %
((cnodes[0]['port'] - 6001) / 10)]).pid
self.pids[self.port2server[onodes[0]['port']]] = \
Popen(['/usr/bin/swift-object-server',
Popen(['swift-object-server',
'/etc/swift/object-server/%d.conf' %
((onodes[0]['port'] - 6000) / 10)]).pid
sleep(2)