diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-02 17:56:18 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-03 01:27:21 +0100 |
commit | cdfa5663044ea683422232ae51613939a3b66044 (patch) | |
tree | 7b20efffb9f32643bc2ed95829db9292a2265f31 /cypress | |
parent | 321ac318c3cbbada96d667f8730c126cf1e4b4b8 (diff) | |
download | nextcloud-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.ts | 10 |
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') } |