mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
nextcloud_tests.py: Fix error state detection for NC 28.0.5
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
f49d710dea
commit
c7ff30c618
50
.github/workflows/build-lxd.yml
vendored
50
.github/workflows/build-lxd.yml
vendored
@ -242,10 +242,6 @@ jobs:
|
||||
"$LXC" exec ncp -- "tail -n20 /var/log/ncp.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -259,6 +255,10 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Update ncp
|
||||
run: |
|
||||
@ -303,10 +303,6 @@ jobs:
|
||||
working-directory: ./tests
|
||||
run: |
|
||||
"$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -320,6 +316,10 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
test-dist-upgrade:
|
||||
needs:
|
||||
@ -385,10 +385,6 @@ jobs:
|
||||
"$LXC" exec ncp -- "tail -n20 /var/log/ncp.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive --skip-update-test || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -402,6 +398,10 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive --skip-update-test || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Update ncp
|
||||
run: |
|
||||
@ -445,11 +445,6 @@ jobs:
|
||||
- name: Test LXD Image
|
||||
working-directory: ./tests
|
||||
run: |
|
||||
"$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
|
||||
python system_tests.py --non-interactive --skip-update-test || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -463,6 +458,11 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
"$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
|
||||
python system_tests.py --non-interactive --skip-update-test || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
- name: NCP distupgrade
|
||||
id: distupgrade
|
||||
run: |
|
||||
@ -489,10 +489,6 @@ jobs:
|
||||
working-directory: ./tests
|
||||
run: |
|
||||
"$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -506,6 +502,10 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
"$LXC" stop ncp
|
||||
|
||||
test-fresh-install:
|
||||
@ -586,10 +586,6 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
|
||||
echo "Nextcloud test failed!"
|
||||
echo "Geckodriver logs:"
|
||||
@ -603,6 +599,10 @@ jobs:
|
||||
"$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
|
||||
exit 1
|
||||
}
|
||||
python system_tests.py --non-interactive || {
|
||||
echo "System test failed!"
|
||||
exit 1
|
||||
}
|
||||
lxc stop ncp
|
||||
|
||||
convert-to-lxc-image:
|
||||
|
||||
@ -171,7 +171,8 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check:
|
||||
try:
|
||||
wait.until(VisibilityOfElementLocatedByAnyLocator([(By.CSS_SELECTOR, "#security-warning-state-ok"),
|
||||
(By.CSS_SELECTOR, "#security-warning-state-warning"),
|
||||
(By.CSS_SELECTOR, "#security-warning-state-error")]))
|
||||
(By.CSS_SELECTOR, "#security-warning-state-error"),
|
||||
(By.CSS_SELECTOR, "#security-warning-state-failure")]))
|
||||
|
||||
element_ok = driver.find_element(By.ID, "security-warning-state-ok")
|
||||
element_warn = driver.find_element(By.ID, "security-warning-state-warning")
|
||||
@ -212,6 +213,9 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check:
|
||||
raise ConfigTestFailure("The list of php_modules does not equal [imagick]")
|
||||
|
||||
elif not element_ok.is_displayed():
|
||||
errors = driver.find_elements(By.CSS_SELECTOR, "#postsetupchecks > .errors > li")
|
||||
for error in errors:
|
||||
print(f'ERROR: {error.text}')
|
||||
raise ConfigTestFailure("Neither the warnings nor the ok status is displayed "
|
||||
"(so there are probably errors or the page is broken)")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user