add test of mount options being propagated

This commit is contained in:
Michael Hudson-Doyle 2021-04-06 09:16:55 +12:00
parent a3623e6051
commit 5dbd872919
3 changed files with 10 additions and 1 deletions

View File

@ -51,5 +51,5 @@ storage:
- {type: raid, name: md1, raidlevel: raid1, devices: [partition-system-1, partition-system-2], preserve: false, id: raid-system}
- {type: format, fstype: ext4, volume: raid-boot, preserve: false, id: format-boot}
- {type: format, fstype: ext4, volume: raid-system, preserve: false, id: format-system}
- {type: mount, device: format-boot, path: /boot, id: mount-boot}
- {type: mount, device: format-system, path: /, id: mount-system}
- {type: mount, device: format-boot, path: /boot, id: mount-boot, options: 'errors=remount-ro'}

View File

@ -17,7 +17,14 @@ def main():
k, expected = arg, None
v = config
for part in k.split('.'):
if '[' in part:
part, index = part.split('[')
index = int(index[:-1])
else:
index = None
v = v[part]
if index is not None:
v = v[index]
if expected is None:
print(v)
else:

View File

@ -45,6 +45,8 @@ timeout --foreground 60 sh -c "LANG=C.UTF-8 python3 -m subiquity.cmd.tui --autoi
validate
python3 scripts/check-yaml-fields.py .subiquity/subiquity-curtin-install.conf \
debconf_selections.subiquity='"eek"'
python3 scripts/check-yaml-fields.py .subiquity/subiquity-curtin-install.conf \
storage.config[-1].options='"errors=remount-ro"'
python3 scripts/check-yaml-fields.py <(python3 scripts/check-yaml-fields.py .subiquity/etc/cloud/cloud.cfg.d/99-installer.cfg datasource.None.userdata_raw) \
locale='"en_GB.UTF-8"'
grep -q 'finish: subiquity/Install/install/postinstall/install_package1: SUCCESS: installing package1' \