fix(cypress): Add timeout for waiting on Nextcloud server

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/41250/head
Ferdinand Thiessen 7 months ago
parent 321ac318c3
commit cdfa566304
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400

@ -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')
}

10
package-lock.json generated

@ -106,6 +106,7 @@
"@testing-library/vue": "^5.8.3",
"@types/dockerode": "^3.3.21",
"@types/jest": "^29.5.2",
"@types/wait-on": "^5.3.3",
"@vue/test-utils": "^1.3.5",
"@vue/tsconfig": "^0.4.0",
"@vue/vue2-jest": "^29.2.6",
@ -6160,6 +6161,15 @@
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz",
"integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g=="
},
"node_modules/@types/wait-on": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/@types/wait-on/-/wait-on-5.3.3.tgz",
"integrity": "sha512-I8EnhU/DuvV2LODzBcLw85FPFFZ9mBvtgqfsgXbhkbo5IZYfIne5qxPTv4PGbD8d5uDQJG5g/pGwGdpM8lQ6Lg==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/web-bluetooth": {
"version": "0.0.17",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz",

@ -133,6 +133,7 @@
"@testing-library/vue": "^5.8.3",
"@types/dockerode": "^3.3.21",
"@types/jest": "^29.5.2",
"@types/wait-on": "^5.3.3",
"@vue/test-utils": "^1.3.5",
"@vue/tsconfig": "^0.4.0",
"@vue/vue2-jest": "^29.2.6",

Loading…
Cancel
Save