This commit is contained in:
Clay Gerrard 2011-02-24 16:21:14 -06:00
parent 92a5414f25
commit bdba519e02
4 changed files with 9 additions and 7 deletions

View File

@ -11,7 +11,11 @@ from swift.common.utils import readconf
setattr(__builtin__, '_', lambda x: x)
def get_config():
"""
Attempt to get a functional config dictionary.
"""
config_file = os.environ.get('SWIFT_TEST_CONFIG_FILE',
'/etc/swift/func_test.conf')
config = {}
@ -24,4 +28,3 @@ def get_config():
except SystemExit:
print >>sys.stderr, 'UNABLE TO READ FUNCTIONAL TESTS CONFIG FILE'
return config

View File

@ -29,7 +29,6 @@ import unittest
import urllib
from test import get_config
from swift import Account, AuthenticationFailed, Connection, Container, \
File, ResponseError

View File

@ -28,7 +28,7 @@ if conf:
swift_test_auth += \
'://%(auth_host)s:%(auth_port)s%(auth_prefix)sv1.0' % conf
except KeyError:
pass # skip
pass # skip
if 'account' in conf:
swift_test_user[0] = '%(account)s:%(username)s' % conf
else:
@ -39,13 +39,13 @@ if conf:
in conf else '', conf['username2'])
swift_test_key[1] = conf['password2']
except KeyError, err:
pass # old conf, no second account tests can be run
pass # old conf, no second account tests can be run
try:
swift_test_user[2] = '%s%s' % ('%s:' % conf['account'] if 'account'
in conf else '', conf['username3'])
swift_test_key[2] = conf['password3']
except KeyError, err:
pass # old conf, no third account tests can be run
pass # old conf, no third account tests can be run
skip = not all([swift_test_auth, swift_test_user[0], swift_test_key[0]])
if skip:
@ -73,7 +73,8 @@ class InternalServerError(Exception):
url = [None, None, None]
token = [None, None, None]
parsed = [None, None, None]
conn = [None, None, None]
conn = [None, None, None]
def retry(func, *args, **kwargs):
"""

View File

@ -667,7 +667,6 @@ log_name = yarr'''
# make sure its accurate to 10th of a second
self.assertTrue(abs(100 - (time.time() - start) * 100) < 10)
def test_search_tree(self):
# file match & ext miss
with temptree(['asdf.conf', 'blarg.conf', 'asdf.cfg']) as t: