use CI_COMMIT_SHORT_SHA for selenium test mock
This commit is contained in:
parent
8d3f570ee9
commit
752c692170
|
@ -1,7 +1,14 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
|
|
||||||
|
CI_COMMIT_SHORT_SHA = os.getenv("CI_COMMIT_SHORT_SHA")
|
||||||
|
|
||||||
|
if not CI_COMMIT_SHORT_SHA:
|
||||||
|
print("CI_COMMIT_SHORT_SHA env var should be defined")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
options = webdriver.ChromeOptions()
|
options = webdriver.ChromeOptions()
|
||||||
|
|
||||||
driver = webdriver.Remote(
|
driver = webdriver.Remote(
|
||||||
|
@ -9,7 +16,10 @@ driver = webdriver.Remote(
|
||||||
options=options
|
options=options
|
||||||
)
|
)
|
||||||
|
|
||||||
driver.get("http://tt-rss-latest-app.gitlab-fakecake.svc.cluster.local/tt-rss")
|
app_url = f"http://tt-rss-{CI_COMMIT_SHORT_SHA}-app.gitlab-fakecake.svc.cluster.local/tt-rss"
|
||||||
|
|
||||||
|
print(f"base url = {app_url}")
|
||||||
|
|
||||||
|
driver.get(app_url)
|
||||||
print(driver.page_source)
|
print(driver.page_source)
|
||||||
driver.quit()
|
driver.quit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue