tests/OBSLocal: tearDown(): ensure user is Admin before cleanup.
Without this all cleanup fails which can cause leakage between test runs that utilize the same entity names.
This commit is contained in:
parent
65e23771b6
commit
3c1b01695e
@ -55,6 +55,10 @@ class TestCase(unittest.TestCase):
|
|||||||
self.apiurl = conf.config['apiurl']
|
self.apiurl = conf.config['apiurl']
|
||||||
self.assertOBS()
|
self.assertOBS()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
# Ensure admin user so that tearDown cleanup succeeds.
|
||||||
|
self.osc_user('Admin')
|
||||||
|
|
||||||
def assertOBS(self):
|
def assertOBS(self):
|
||||||
url = makeurl(self.apiurl, ['about'])
|
url = makeurl(self.apiurl, ['about'])
|
||||||
root = ET.parse(http_GET(url)).getroot()
|
root = ET.parse(http_GET(url)).getroot()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user