Skip to content
Browse files

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
  • Loading branch information...
2 parents 1c6dc00 + 5e8bc7d commit 2ee5d7ee9c9b63ebe859ebe46fa93270cb465853 @creiht creiht committed with Tarmac
View
1 .bzrignore
@@ -1,3 +1,4 @@
*.py[co]
*.sw?
doc/build/*
+swift.egg-info
View
6 doc/source/development_saio.rst
@@ -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
2 setup.py
@@ -26,7 +26,7 @@
license='Apache License (2.0)',
author='OpenStack, LLC.',
url='https://launchpad.net/swift',
- packages=find_packages(exclude=['tests','bin']),
+ packages=find_packages(exclude=['test','bin']),
test_suite = 'nose.collector',
classifiers=[
'Development Status :: 4 - Beta',
View
12 test/probe/common.py
@@ -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
4 test/probe/test_account_failures.py
@@ -110,7 +110,7 @@ def test_main(self):
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 @@ def test_main(self):
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
8 test/probe/test_container_failures.py
@@ -59,7 +59,7 @@ def test_first_node_fail(self):
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 @@ def test_second_node_fail(self):
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 @@ def test_first_two_nodes_fail(self):
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 @@ def test_last_two_nodes_fail(self):
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
4 test/probe/test_object_async_update.py
@@ -47,7 +47,7 @@ def test_main(self):
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 @@ def test_main(self):
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
20 test/probe/test_object_handoff.py
@@ -61,7 +61,7 @@ def test_main(self):
'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 @@ def test_main(self):
'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 @@ def test_main(self):
# 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 @@ def test_main(self):
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 @@ def test_main(self):
# 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 @@ def test_main(self):
'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 @@ def test_main(self):
# 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
6 test/probe/test_running_with_each_type_down.py
@@ -72,15 +72,15 @@ def test_main(self):
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)

0 comments on commit 2ee5d7e

Please sign in to comment.
Something went wrong with that request. Please try again.