mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 04:55:42 +00:00
Merge pull request #2206 from balena-os/revert-os-release-file-path
Revert os release file path
This commit is contained in:
commit
db2046649f
@ -7,14 +7,15 @@ testfs:
|
||||
# in the `testfs` configuration.
|
||||
filesystem:
|
||||
/mnt/boot:
|
||||
os-release:
|
||||
from: test/data/etc/os-release
|
||||
config.json:
|
||||
from: test/data/testconfig.json
|
||||
config.txt:
|
||||
from: test/data/mnt/boot/config.txt
|
||||
device-type.json:
|
||||
from: test/data/mnt/boot/device-type.json
|
||||
/mnt/root/etc:
|
||||
os-release:
|
||||
from: test/data/etc/os-release
|
||||
# The `keep` list defines files that already exist in the
|
||||
# filesystem and need to be backed up before setting up the test environment
|
||||
keep: []
|
||||
|
@ -81,7 +81,7 @@ services:
|
||||
# Required to set mountpoints normally set in entry.sh
|
||||
ROOT_MOUNTPOINT: /mnt/root
|
||||
BOOT_MOUNTPOINT: /mnt/boot
|
||||
HOST_OS_VERSION_PATH: /mnt/boot/os-release
|
||||
HOST_OS_VERSION_PATH: /mnt/root/etc/os-release
|
||||
STATE_MOUNTPOINT: /mnt/state
|
||||
DATA_MOUNTPOINT: /mnt/data
|
||||
DATABASE_PATH: /data/database.sqlite
|
||||
|
@ -103,7 +103,11 @@ setup_then_mount "boot" "${BOOT_MOUNTPOINT}"
|
||||
export BOOT_MOUNTPOINT
|
||||
|
||||
# Read from the os-release of boot partition instead of overlay
|
||||
export HOST_OS_VERSION_PATH="${BOOT_MOUNTPOINT}/os-release"
|
||||
#
|
||||
# TODO: We need to remove the dependence on /mnt/root for this particular file.
|
||||
# Reading from /mnt/boot/os-release is not always accurate, so we need to work
|
||||
# with the OS team to find a better way to get the OS version.
|
||||
export HOST_OS_VERSION_PATH="/mnt/root/etc/os-release"
|
||||
|
||||
# CONFIG_MOUNT_POINT is set to /boot/config.json in Dockerfile.template,
|
||||
# but that's a legacy mount provided by host and we should override it.
|
||||
|
@ -40,8 +40,8 @@
|
||||
"systeminformation": "^5.6.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.18.0",
|
||||
"npm": ">=9.8.1"
|
||||
"node": "^18.18.0",
|
||||
"npm": "^9.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@balena/contrato": "^0.6.0",
|
||||
|
11
test/data/root/etc/os-release
Normal file
11
test/data/root/etc/os-release
Normal file
@ -0,0 +1,11 @@
|
||||
ID="balena-os"
|
||||
NAME="balenaOS"
|
||||
VERSION="4.0.11+rev1"
|
||||
VERSION_ID="4.0.11+rev1"
|
||||
PRETTY_NAME="balenaOS 4.0.11+rev1"
|
||||
DISTRO_CODENAME="kirkstone"
|
||||
MACHINE="genericx86-64"
|
||||
META_BALENA_VERSION="4.0.11"
|
||||
BALENA_BOARD_REV="9c804eb"
|
||||
META_BALENA_REV="2afff0f8"
|
||||
SLUG="intel-nuc"
|
@ -425,7 +425,7 @@ describe('manages application lifecycle', () => {
|
||||
// Versions match semver versioning scheme: major.minor.patch(+rev)?
|
||||
expect(body)
|
||||
.to.have.property('os_version')
|
||||
.that.matches(/balenaOS\s[1-2]\.[0-9]{1,3}\.[0-9]{1,3}(?:\+rev[0-9])?/);
|
||||
.that.matches(/balenaOS\s[1-4]\.[0-9]{1,3}\.[0-9]{1,3}(?:\+rev[0-9])?/);
|
||||
expect(body)
|
||||
.to.have.property('supervisor_version')
|
||||
.that.matches(/(?:[0-9]+\.?){3}/);
|
||||
|
Loading…
x
Reference in New Issue
Block a user