Merge "Ensure reverting test env if the env is temporarily changed"

This commit is contained in:
Zuul 2018-03-15 02:19:40 +00:00 committed by Gerrit Code Review
commit f2e8565bb6

View File

@ -588,8 +588,11 @@ 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:
self.env.container.conn.storage_token = \
self.env.conn2.storage_token
metadata = self.env.container.info() metadata = self.env.container.info()
finally:
self.env.container.conn.storage_token = original_token self.env.container.conn.storage_token = original_token
self.assertNotIn( self.assertNotIn(