Merge "Ensure reverting test env if the env is temporarily changed"
This commit is contained in:
commit
f2e8565bb6
@ -588,9 +588,12 @@ class TestContainerTempurl(Base):
|
|||||||
if not tf.cluster_info.get('tempauth'):
|
if not tf.cluster_info.get('tempauth'):
|
||||||
raise SkipTest('TEMP AUTH SPECIFIC TEST')
|
raise SkipTest('TEMP AUTH SPECIFIC TEST')
|
||||||
original_token = self.env.container.conn.storage_token
|
original_token = self.env.container.conn.storage_token
|
||||||
self.env.container.conn.storage_token = self.env.conn2.storage_token
|
try:
|
||||||
metadata = self.env.container.info()
|
self.env.container.conn.storage_token = \
|
||||||
self.env.container.conn.storage_token = original_token
|
self.env.conn2.storage_token
|
||||||
|
metadata = self.env.container.info()
|
||||||
|
finally:
|
||||||
|
self.env.container.conn.storage_token = original_token
|
||||||
|
|
||||||
self.assertNotIn(
|
self.assertNotIn(
|
||||||
'tempurl_key', metadata,
|
'tempurl_key', metadata,
|
||||||
|
Loading…
Reference in New Issue
Block a user