Commit 6157dd57 authored by Florent Flament's avatar Florent Flament

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
parent ce6c54de
......@@ -20,3 +20,5 @@ doc/source/api
# Development environment files
# Temporary files created during test, but not removed
\ No newline at end of file
......@@ -269,7 +269,8 @@ class BaseAuthTokenMiddlewareTest(testtools.TestCase):
self.middleware = auth_token.AuthProtocol(fake_app(self.expected_env),
self.middleware._iso8601 = iso8601
self.middleware.revoked_file_name = tempfile.mkstemp()[1]
self.middleware.revoked_file_name = tempfile.mkstemp(
self.middleware.token_revocation_list = jsonutils.dumps(
{"revoked": [], "extra": "success"})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment