diff options
author | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-07-12 23:57:55 +0300 |
---|---|---|
committer | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-07-12 23:57:55 +0300 |
commit | 85a4c7e0e28e03264a2bada2ac81012a612ff3ae (patch) | |
tree | d9fa616dd34df72414bb451ce6e6f9f8bb2e695e | |
parent | 7207a22e3e84ce03a6f3bb4d1359275ffd690d1f (diff) |
build-docker.yml: Fix docker release missing latest tagsv1.48.1
test: Fix usage of deprecated selenium API functions
-rw-r--r-- | .github/workflows/build-docker.yml | 2 | ||||
-rw-r--r-- | changelog.md | 1 | ||||
-rwxr-xr-x | tests/activation_tests.py | 8 | ||||
-rwxr-xr-x | tests/nextcloud_tests.py | 25 |
4 files changed, 20 insertions, 16 deletions
diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index df219512..316863a1 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -137,7 +137,9 @@ jobs: do docker pull "thecalcaholic/ncp-internal-${arch}:${{ github.run_id }}" docker tag "thecalcaholic/ncp-internal-${arch}:${{ github.run_id }}" "ownyourbits/nextcloudpi-${arch}:${version?}" + docker tag "ownyourbits/nextcloudpi-${arch}:${version?}" "ownyourbits/nextcloudpi-${arch}:latest" docker push "ownyourbits/nextcloudpi-${arch}:${version?}" + docker push "ownyourbits/nextcloudpi-${arch}:latest" done docker manifest create ownyourbits/nextcloudpi:${version?} \ diff --git a/changelog.md b/changelog.md index af07c2e5..b014b3a1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,4 @@ +[v1.48.1](https://github.com/nextcloud/nextcloudpi/tree/v1.48.1) (2022-06-12) Fix docker release missing latest tags [v1.48.0](https://github.com/nextcloud/nextcloudpi/tree/v1.48.0) (2022-06-12) Update Nextcloud to version 23.0.6 [v1.47.2](https://github.com/nextcloud/nextcloudpi/commit/b66ce17) (2022-05-05) docker-build.yml: Add CI/CD integration tests for docker images diff --git a/tests/activation_tests.py b/tests/activation_tests.py index 1def55c9..1d34cba5 100755 --- a/tests/activation_tests.py +++ b/tests/activation_tests.py @@ -101,8 +101,8 @@ def test_activation(IP, nc_port, admin_port, options): driver.get(f"https://{IP}:{nc_port}") test.check("NextCloudPi Activation" in driver.title) try: - ncp_pass = driver.find_element_by_id("ncp-pwd").get_attribute("value") - nc_pass = driver.find_element_by_id("nc-pwd").get_attribute("value") + ncp_pass = driver.find_element(By.ID, "ncp-pwd").get_attribute("value") + nc_pass = driver.find_element(By.ID, "nc-pwd").get_attribute("value") config = configparser.ConfigParser() if not config.has_section('credentials'): @@ -114,7 +114,7 @@ def test_activation(IP, nc_port, admin_port, options): with open(test_cfg, 'w') as configfile: config.write(configfile) - driver.find_element_by_id("activate-ncp").click() + driver.find_element(By.ID, "activate-ncp").click() test.report("activation click", True) except: ncp_pass = "" @@ -123,7 +123,7 @@ def test_activation(IP, nc_port, admin_port, options): test.new("activation ends") try: wait = WebDriverWait(driver, wait_timeout) - wait.until(EC.text_to_be_present_in_element((By.ID,'error-box'), "ACTIVATION SUCCESSFUL")) + wait.until(EC.text_to_be_present_in_element((By.ID, 'error-box'), "ACTIVATION SUCCESSFUL")) test.check(True) except TimeoutException: test.check(False) diff --git a/tests/nextcloud_tests.py b/tests/nextcloud_tests.py index d4b4dea8..1712e67a 100755 --- a/tests/nextcloud_tests.py +++ b/tests/nextcloud_tests.py @@ -24,6 +24,8 @@ from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.service import Service +from selenium.webdriver.firefox.webdriver import WebDriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.firefox.options import Options from selenium.common.exceptions import NoSuchElementException, WebDriverException, TimeoutException @@ -104,10 +106,9 @@ class ConfigTestFailure(Exception): pass -def test_nextcloud(IP, nc_port, driver): +def test_nextcloud(IP: str, nc_port: str, driver: WebDriver): """ Login and assert admin page checks""" test = Test() - print(driver.desired_capabilities['timeouts']) test.new("nextcloud page") try: driver.get(f"https://{IP}:{nc_port}/index.php/settings/admin/overview") @@ -119,12 +120,12 @@ def test_nextcloud(IP, nc_port, driver): trusted_domain_str = "You are accessing the server from an untrusted domain" test.report("trusted domain", trusted_domain_str not in driver.page_source) try: - driver.find_element_by_id("user").send_keys(nc_user) - driver.find_element_by_id("password").send_keys(nc_pass) - driver.find_element_by_id("submit-form").click() + driver.find_element(By.ID, "user").send_keys(nc_user) + driver.find_element(By.ID, "password").send_keys(nc_pass) + driver.find_element(By.ID, "submit-form").click() except NoSuchElementException: try: - driver.find_element_by_id("submit").click() + driver.find_element(By.ID, "submit").click() except NoSuchElementException: pass @@ -137,22 +138,22 @@ def test_nextcloud(IP, nc_port, driver): (By.CSS_SELECTOR, "#security-warning-state-warning"), (By.CSS_SELECTOR, "#security-warning-state-error")])) - element_ok = driver.find_element_by_id("security-warning-state-ok") - element_warn = driver.find_element_by_id("security-warning-state-warning") + element_ok = driver.find_element(By.ID, "security-warning-state-ok") + element_warn = driver.find_element(By.ID, "security-warning-state-warning") if element_warn.is_displayed(): - if driver.find_element_by_css_selector("#postsetupchecks > .errors").is_displayed() \ - or driver.find_element_by_css_selector("#postsetupchecks > .warnings").is_displayed(): + if driver.find_element(By.CSS_SELECTOR, "#postsetupchecks > .errors").is_displayed() \ + or driver.find_element(By.CSS_SELECTOR, "#postsetupchecks > .warnings").is_displayed(): raise ConfigTestFailure("There have been errors or warnings") - infos = driver.find_elements_by_css_selector("#postsetupchecks > .info > li") + infos = driver.find_elements(By.CSS_SELECTOR, "#postsetupchecks > .info > li") for info in infos: if re.match(r'.*Your installation has no default phone region set.*', info.text): continue else: - php_modules = info.find_elements_by_css_selector("li") + php_modules = info.find_elements(By.CSS_SELECTOR, "li") if len(php_modules) != 1: raise ConfigTestFailure(f"Could not find the list of php modules within the info message " f"'{infos[0].text}'") |