Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion suites/e2e/tests/power-cycle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@ module.exports = {
)

// we want to waitUntil here as the supervisor may take some time to come online.
// /ping is unauthenticated and unconditional, so it passes whenever the
// supervisor process is up. /v1/healthy includes a connectivity check
// that requires the device to be actively reporting state to balena-cloud,
// which the DUT in this suite never does (provisioned in local mode and
// not registered to a fleet).
await test.resolves(
this.utils.waitUntil(async () => {
const healthy = await this.worker.executeCommandInHostOS(
`curl --max-time 10 "localhost:48484/v1/healthy"`,
`curl --max-time 10 "localhost:48484/ping"`,
this.link
)
return (healthy === 'OK')
Expand Down
Loading