Fix auth_token middleware test invalid cross-device link issue
Fixes path of temporary files, containing token revocation lists, which weren't in the appropriate directory. File renaming now works properly since source and destination files are in the same directory, and therefore on the same partition. Added to .gitignore temporary files generated during tests, that are not being removed at the end of test. Change-Id: I21ff81419313f4205ebe552556e27b86135fd096 Closes-Bug: #1265190
This commit is contained in:
parent
ce6c54de91
commit
6157dd57e7
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,3 +20,5 @@ doc/source/api
|
||||
# Development environment files
|
||||
.project
|
||||
.pydevproject
|
||||
# Temporary files created during test, but not removed
|
||||
examples/pki/certs/tmp*
|
@ -269,7 +269,8 @@ class BaseAuthTokenMiddlewareTest(testtools.TestCase):
|
||||
self.middleware = auth_token.AuthProtocol(fake_app(self.expected_env),
|
||||
self.conf)
|
||||
self.middleware._iso8601 = iso8601
|
||||
self.middleware.revoked_file_name = tempfile.mkstemp()[1]
|
||||
self.middleware.revoked_file_name = tempfile.mkstemp(
|
||||
dir=self.middleware.signing_dirname)[1]
|
||||
self.middleware.token_revocation_list = jsonutils.dumps(
|
||||
{"revoked": [], "extra": "success"})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user