2023-10-22 07:57:58 +00:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
2023-10-22 09:46:39 +00:00
|
|
|
import os
|
2023-10-22 07:57:58 +00:00
|
|
|
from selenium import webdriver
|
|
|
|
|
2023-10-22 09:46:39 +00:00
|
|
|
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)
|
|
|
|
|
2023-10-22 07:57:58 +00:00
|
|
|
options = webdriver.ChromeOptions()
|
|
|
|
|
|
|
|
driver = webdriver.Remote(
|
2023-10-22 08:19:56 +00:00
|
|
|
command_executor='http://selenium-hub.selenium-grid.svc.cluster.local:4444/wd/hub',
|
2023-10-22 07:57:58 +00:00
|
|
|
options=options
|
|
|
|
)
|
|
|
|
|
2023-10-22 09:46:39 +00:00
|
|
|
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)
|
2023-10-22 07:57:58 +00:00
|
|
|
print(driver.page_source)
|
|
|
|
driver.quit()
|