Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: hup: rollback-altboot: replace while loop over SSH to speed up… #3562

Merged
merged 1 commit into from
Jan 15, 2025
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
28 changes: 20 additions & 8 deletions tests/suites/hup/tests/rollbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,26 @@ module.exports = {

await this.worker.rebootDut(this.link);

// system.waitForServiceState times out here for some reason, so just use shell
await this.worker.executeCommandInHostOS(
['while [ "$(systemctl is-active rollback-altboot)" != "inactive" ]',
'|| [ "$(systemctl is-active rollback-health)" != "inactive" ]; do sleep 1; done'
],
this.link,
);

await this.utils.waitUntil(async () => {
console.log(`Waiting for rollback-altboot service to be inactive...`)
let state = await this.worker.executeCommandInHostOS(
`systemctl is-active rollback-altboot || true`,
this.link
)
console.log(state)
return (state === "inactive");
})

await this.utils.waitUntil(async () => {
console.log(`Waiting for rollback-health service to be inactive...`)
let state = await this.worker.executeCommandInHostOS(
`systemctl is-active rollback-health || true`,
this.link
)
console.log(state)
return (state === "inactive");
})

await test.resolves(
this.utils.waitUntil(async () => {
return this.worker.executeCommandInHostOS(
Expand Down
Loading