summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml10
-rw-r--r--tests/selenium/test.py15
2 files changed, 23 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57c285b6d..0c9bd93a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -64,11 +64,17 @@ integration-test:
TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
extends: .integration-test
script:
- - sleep 5
- - curl -fs http://tt-rss-${CI_COMMIT_SHORT_SHA}-app/tt-rss/index.php | grep -q Login
+ - apk add py3-pip
+ - pip3 install selenium
+ - python3 tests/selenium/test.py
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+integration-test:branch:
+ extends: integration-test
+ rules:
+ - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_REGISTRY_USER != null
+
ttrss-web-nginx:publish:
stage: publish
extends: .build-master
diff --git a/tests/selenium/test.py b/tests/selenium/test.py
new file mode 100644
index 000000000..b1576cac1
--- /dev/null
+++ b/tests/selenium/test.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python3
+
+from selenium import webdriver
+
+options = webdriver.ChromeOptions()
+
+driver = webdriver.Remote(
+ command_executor='http://selenium-hub.selenium-grid.svc.cluster.local:4444/wd/hub',
+ options=options
+)
+
+driver.get("http://tt-rss-latest-app.gitlab-fakecake.svc.cluster.local/tt-rss")
+print(driver.page_source)
+driver.quit()
+