summaryrefslogtreecommitdiff
path: root/tempest_lib/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'tempest_lib/auth.py')
-rw-r--r--tempest_lib/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tempest_lib/auth.py b/tempest_lib/auth.py
index 0a05445..c16d6dd 100644
--- a/tempest_lib/auth.py
+++ b/tempest_lib/auth.py
@@ -148,9 +148,15 @@ class AuthProvider(object):
auth_data=self.alt_auth_data)
alt_auth_req = dict(url=alt_url, headers=alt_headers,
body=alt_body)
+ if auth_req[self.alt_part] == alt_auth_req[self.alt_part]:
+ raise exceptions.BadAltAuth(part=self.alt_part)
auth_req[self.alt_part] = alt_auth_req[self.alt_part]
else:
+ # If the requested part is not affected by auth, we are
+ # not altering auth as expected, raise an exception
+ if auth_req[self.alt_part] == orig_req[self.alt_part]:
+ raise exceptions.BadAltAuth(part=self.alt_part)
# If alt auth data is None, skip auth in the requested part
auth_req[self.alt_part] = orig_req[self.alt_part]