add an integration test to install core and some fixes

Note that it may not be possible to create an fsimage to use as a core
installation source (haven't tried, tbh) but I have upcoming changes to
use a disk image as installation source.
This commit is contained in:
Michael Hudson-Doyle 2023-07-19 15:15:23 +12:00
parent 0b3a1c2c6a
commit 55c68b5855
5 changed files with 44 additions and 4 deletions

View File

@ -0,0 +1,24 @@
#source-catalog: examples/sources/core.yaml
Source:
source: ubuntu-core
Welcome:
lang: en_US
Refresh:
update: no
Keyboard:
layout: us
Zdev:
accept-default: yes
Network:
accept-default: yes
Proxy:
proxy: ""
Filesystem:
guided: yes
guided-index: 0
UbuntuPro:
token: ""
InstallProgress:
reboot: yes
Drivers:
install: yes

View File

@ -0,0 +1,10 @@
- description:
en: This test source provides a "Ubuntu Core" base install
id: ubuntu-core
locale_support: none
name:
en: Ubuntu Server
path: ubuntu-core.squashfs
size: 530485248
type: fsimage
variant: core

View File

@ -49,7 +49,9 @@ validate () {
if [ "$opt" = reset-only ]; then
return
fi
python3 scripts/validate-autoinstall-user-data.py < $tmpdir/var/log/installer/autoinstall-user-data
if [ $answers != examples/answers/core.yaml ]; then
python3 scripts/validate-autoinstall-user-data.py < $tmpdir/var/log/installer/autoinstall-user-data
fi
netplan generate --root $tmpdir
elif [ "${mode}" = "system_setup" ]; then
setup_mode="$2"
@ -194,7 +196,9 @@ for answers in examples/answers/*.yaml; do
--snaps-from-examples \
--source-catalog $catalog
validate install
grep -q 'finish: subiquity/Install/install/postinstall/run_unattended_upgrades: SUCCESS: downloading and installing security updates' $tmpdir/subiquity-server-debug.log
if [ $answers != examples/answers/core.yaml ]; then
grep -q 'finish: subiquity/Install/install/postinstall/run_unattended_upgrades: SUCCESS: downloading and installing security updates' $tmpdir/subiquity-server-debug.log
fi
else
# The OOBE doesn't exist in WSL < 20.04
if [ "${RELEASE%.*}" -ge 20 ]; then

View File

@ -39,6 +39,7 @@ class OEMModel:
self.install_on = {
"server": False,
"desktop": True,
"core": False,
}
def make_autoinstall(self) -> Dict[str, Union[str, bool]]:

View File

@ -214,11 +214,12 @@ INSTALL_MODEL_NAMES = ModelNames({
"filesystem",
"kernel",
"keyboard",
"mirror",
"network",
"proxy",
"source",
})
},
desktop={'mirror'},
server={'mirror'})
POSTINSTALL_MODEL_NAMES = ModelNames({
"drivers",