aboutsummaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-11-02 17:56:18 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-11-03 01:27:21 +0100
commitcdfa5663044ea683422232ae51613939a3b66044 (patch)
tree7b20efffb9f32643bc2ed95829db9292a2265f31 /cypress
parent321ac318c3cbbada96d667f8730c126cf1e4b4b8 (diff)
downloadnextcloud-server-cdfa5663044ea683422232ae51613939a3b66044.tar.gz
nextcloud-server-cdfa5663044ea683422232ae51613939a3b66044.zip
fix(cypress): Add timeout for waiting on Nextcloud server
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/dockerNode.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts
index 790200b9c21..38bc86d9c5f 100644
--- a/cypress/dockerNode.ts
+++ b/cypress/dockerNode.ts
@@ -233,7 +233,15 @@ export const getContainerIP = async function(
// https://github.com/cypress-io/cypress/issues/22676
export const waitOnNextcloud = async function(ip: string) {
console.log('├─ Waiting for Nextcloud to be ready... ⏳')
- await waitOn({ resources: [`http://${ip}/index.php`] })
+ await waitOn({
+ resources: [`http://${ip}/index.php`],
+ // wait for nextcloud to be up and return any non error status
+ validateStatus: (status) => status >= 200 && status < 400,
+ // timout in ms
+ timeout: 5 * 60 * 1000,
+ // timeout for a single HTTP request
+ httpTimeout: 60 * 1000,
+ })
console.log('└─ Done')
}