Skip to content

Commit

Permalink
Add more expected CloudFlare tunnel failed statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Nov 6, 2023
1 parent 98d0142 commit c3934a5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@ module.exports = ({ cloudFlaredPath = 'cloudflared', port }) => {
)
})

// rl.on('close', () => {
// process.kill()
// throw new Error(`Failed to create tunnel. Closed unexpectedly. Full stderr: ${fullStderr}`)
// })
const expectedFailures = [
'failed to sufficiently increase receive buffer size',
'update check failed error',
'failed to parse quick Tunnel ID',
]

rl.on('line', (line) => {
debug(line)
fullStderr += `${line}\n`

if (
line.includes('failed') &&
!line.includes('failed to sufficiently increase receive buffer size')
!expectedFailures.some((expectedFailure) => line.includes(expectedFailure))
) {
process.kill()
throw new Error(
Expand Down

0 comments on commit c3934a5

Please sign in to comment.