Files
orca/config/scripts/linux-package-maintainer-scripts.test.mjs
Neil 5104aebaaa fix(linux): move deb/rpm update installation outside Orca (#17318)
* fix(linux): complete deb/rpm package metadata

* fix(linux): preserve CLI link during package upgrades

* docs(linux): document local RPM build prerequisites

* fix(linux): move deb/rpm update installation outside Orca

* fix(updater): preserve Linux recovery across stale events

* fix(updater): fence stale downloaded events by active target

* fix(updater): preserve active Linux package recovery

* test(linux): keep workflow order assertion in scope

* test(updater): assert stale recovery stays silent

* fix(updater): preserve Linux package recovery after checks

* refactor(updater): keep Linux marker message with status

* fix(linux): describe the right manual update path for deb/rpm hosts

A remote host installed from .deb or .rpm now reports
manual-service-update-required, and the guidance told the operator to
"update through the service manager that starts this server" -- which is
correct for unsupported-headless-serve but wrong for a package install,
where nothing about the remedy involves the service manager.

Say both, keyed on how the host was installed.
2026-09-01 23:10:16 -07:00

19 lines
677 B
JavaScript

import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
describe('Linux package maintainer scripts', () => {
it('keeps upgrades from removing the installed CLI', () => {
const script = readFileSync(
new URL('../../resources/linux/packaging/after-remove.sh', import.meta.url),
'utf8'
)
const unlinkStart = script.indexOf('link="/usr/bin/orca-ide"')
const upgradeGuard = script.slice(0, unlinkStart)
expect(unlinkStart).toBeGreaterThan(-1)
expect(upgradeGuard).toContain('case "${1-}" in')
expect(upgradeGuard).toContain('0 | remove | purge) ;;')
expect(upgradeGuard).toContain('*) exit 0 ;;')
})
})