pytest-based selenium tests add clarification of RC file naming
Change-Id: I22be4b7cda5795effc698ee8853e466324a579d5
This commit is contained in:
parent
47823cce7c
commit
3804e8e21f
@ -44,8 +44,10 @@ def test_download_rc_file_admin(login, driver, config, openstack_admin,
|
|||||||
widgets.select_from_dropdown(openstack_file_dropdown, "OpenStack RC File")
|
widgets.select_from_dropdown(openstack_file_dropdown, "OpenStack RC File")
|
||||||
WebDriverWait(driver, config.selenium.page_timeout).until(
|
WebDriverWait(driver, config.selenium.page_timeout).until(
|
||||||
lambda x: ((len(os.listdir(download_dir)) == 1) and
|
lambda x: ((len(os.listdir(download_dir)) == 1) and
|
||||||
("admin-openrc.sh" in os.listdir(download_dir))))
|
(f"{config.identity.admin_username}-openrc.sh" in
|
||||||
with open(os.path.join(download_dir, "admin-openrc.sh")) as rc_file:
|
os.listdir(download_dir))))
|
||||||
|
with open(os.path.join(download_dir, f"{config.identity.admin_username}-"
|
||||||
|
f"openrc.sh")) as rc_file:
|
||||||
content = rc_file.read()
|
content = rc_file.read()
|
||||||
username = re.search(
|
username = re.search(
|
||||||
r'export OS_USERNAME="([^"]+)"', content).group(1)
|
r'export OS_USERNAME="([^"]+)"', content).group(1)
|
||||||
@ -74,8 +76,10 @@ def test_download_rc_file_demo(login, driver, config, openstack_admin,
|
|||||||
widgets.select_from_dropdown(openstack_file_dropdown, "OpenStack RC File")
|
widgets.select_from_dropdown(openstack_file_dropdown, "OpenStack RC File")
|
||||||
WebDriverWait(driver, config.selenium.page_timeout).until(
|
WebDriverWait(driver, config.selenium.page_timeout).until(
|
||||||
lambda x: ((len(os.listdir(download_dir)) == 1) and
|
lambda x: ((len(os.listdir(download_dir)) == 1) and
|
||||||
("demo-openrc.sh" in os.listdir(download_dir))))
|
(f"{config.identity.username}-openrc.sh" in
|
||||||
with open(os.path.join(download_dir, "demo-openrc.sh")) as rc_file:
|
os.listdir(download_dir))))
|
||||||
|
with open(os.path.join(download_dir, f"{config.identity.username}-"
|
||||||
|
f"openrc.sh")) as rc_file:
|
||||||
content = rc_file.read()
|
content = rc_file.read()
|
||||||
username = re.search(
|
username = re.search(
|
||||||
r'export OS_USERNAME="([^"]+)"', content).group(1)
|
r'export OS_USERNAME="([^"]+)"', content).group(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user