diff --git a/.github/workflows/vm-tests.yml b/.github/workflows/vm-tests.yml index 74123b4ce..389b3fa9f 100644 --- a/.github/workflows/vm-tests.yml +++ b/.github/workflows/vm-tests.yml @@ -341,7 +341,7 @@ jobs: echo "Run integration tests" ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" "root@${SERVER_ADDRESS}" cat /usr/local/etc/instance.cfg - test-ncp-instance -a -f "$SNAPSHOT_ID" -b "${VERSION}" --systemtest-args "--skip-update-test" --nc-test-args "--skip-release-check" "root@${SERVER_ADDRESS}" "localhost" "8443" "9443" || { + test-ncp-instance -a -f "$SNAPSHOT_ID" -b "v1.54.3" --systemtest-args "--skip-update-test" --nc-test-args "--skip-release-check" "root@${SERVER_ADDRESS}" "localhost" "8443" "9443" || { echo "Integration tests failed" echo "Here are the last lines of ncp-install.log:" @@ -387,7 +387,7 @@ jobs: NC_TEST_ARGS=() ssh "${SSH_OPTIONS[@]}" "root@${SERVER_ADDRESS}" cat /etc/os-release | grep VERSION_ID=12 || NC_TEST_ARGS+=("--skip-release-check") set -x - test-ncp-instance -f "$SNAPSHOT_ID" -b "${VERSION}" --nc-test-args "$NC_TEST_ARGS" --systemtest-args "--skip-update-test" "root@${SERVER_ADDRESS}" "localhost" "8443" "9443" || { + test-ncp-instance -f "$SNAPSHOT_ID" -b "v1.54.3" --nc-test-args "$NC_TEST_ARGS" --systemtest-args "--skip-update-test" "root@${SERVER_ADDRESS}" "localhost" "8443" "9443" || { echo "Integration tests failed" echo "Here are the last lines of ncp-install.log:" diff --git a/ncp-app/lib/Service/SettingsService.php b/ncp-app/lib/Service/SettingsService.php index 444c928ba..daa78d46a 100644 --- a/ncp-app/lib/Service/SettingsService.php +++ b/ncp-app/lib/Service/SettingsService.php @@ -139,7 +139,6 @@ private function runCommand(string $cmd): array { $stderr = stream_get_contents($pipes[2]); fclose($pipes[2]); - $this->logger->error("STDERR: $stderr"); return [proc_close($proc), $stdout, $stderr]; } } diff --git a/tests/nextcloud_tests.py b/tests/nextcloud_tests.py index dffd4041f..35ca2ba41 100755 --- a/tests/nextcloud_tests.py +++ b/tests/nextcloud_tests.py @@ -259,6 +259,7 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check: version_re = re.compile(r'^(v\d+\.\d+\.\d+)$') with (Path(__file__).parent / '../etc/ncp.cfg').open('r') as cfg_file: ncp_cfg = json.load(cfg_file) + actual_php_version = 'unknown' for li in list_items: try: inp = li.find_element(By.TAG_NAME, "input") @@ -275,6 +276,8 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check: expected["notification_accounts"] = True except: divs = li.find_elements(By.TAG_NAME, "div") + if 'php version' in divs[0].text.lower(): + actual_php_version = divs[1].text if 'ncp version' in divs[0].text.lower() and version_re.match(divs[1].text): expected['ncp_version'] = True elif 'php version' in divs[0].text.lower() and divs[1].text == ncp_cfg['php_version']: @@ -284,6 +287,8 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check: expected['debian_release'] = True else: print(f"{tc.yellow}{divs[1].text} != {ncp_cfg['release']}") + if not expected['php_version']: + print(f"php version - expected ({ncp_cfg['php_version']}) :: actual ({actual_php_version})") failed = list(map(lambda item: item[0], filter(lambda item: not item[1], expected.items()))) test.check(len(failed) == 0, f"checks failed for admin section: [{', '.join(failed)}]") except Exception as e: