Przeglądaj źródła

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

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
tags/v28.0.0beta2
Ferdinand Thiessen 7 miesięcy temu
rodzic
commit
cdfa566304
No account linked to committer's email address
3 zmienionych plików z 20 dodań i 1 usunięć
  1. 9
    1
      cypress/dockerNode.ts
  2. 10
    0
      package-lock.json
  3. 1
    0
      package.json

+ 9
- 1
cypress/dockerNode.ts Wyświetl plik

@@ -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
- 0
package-lock.json Wyświetl plik

@@ -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",

+ 1
- 0
package.json Wyświetl plik

@@ -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",

Ładowanie…
Anuluj
Zapisz