Make sure to unset all variable starting with OS_
Some OS_ variables are conflicting with the tests, make sure to unset them before starting the CLI tests. Change-Id: Ie4ef467571137a685976d36026866889f7a2a1a8 Closes-Bug: 1278144
This commit is contained in:
@@ -62,6 +62,10 @@ class ShellTest(utils.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
||||||
super(ShellTest, self).setUp()
|
super(ShellTest, self).setUp()
|
||||||
|
for var in os.environ:
|
||||||
|
if var.startswith("OS_"):
|
||||||
|
self.useFixture(fixtures.EnvironmentVariable(var, ""))
|
||||||
|
|
||||||
for var in self.FAKE_ENV:
|
for var in self.FAKE_ENV:
|
||||||
self.useFixture(fixtures.EnvironmentVariable(var,
|
self.useFixture(fixtures.EnvironmentVariable(var,
|
||||||
self.FAKE_ENV[var]))
|
self.FAKE_ENV[var]))
|
||||||
|
Reference in New Issue
Block a user