add an imsm integration test

This commit is contained in:
Michael Hudson-Doyle 2021-06-25 15:54:16 +12:00
parent f5e8359226
commit 916ee7516e
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,35 @@
#machine-config: examples/imsm.json
Welcome:
lang: en_US
Refresh:
update: no
Keyboard:
layout: us
Network:
accept-default: yes
Proxy:
proxy: ""
Mirror:
mirror: "http://us.archive.ubuntu.com"
Filesystem:
guided: yes
guided-label: "md126"
Identity:
realname: Ubuntu
username: ubuntu
hostname: ubuntu-server
# ubuntu
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
SSH:
install_server: true
pwauth: false
authorized_keys:
- |
ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAA # ssh-import-id lp:subiquity
SnapList:
snaps:
hello:
channel: stable
is_classic: false
InstallProgress:
reboot: yes

View File

@ -85,7 +85,12 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
await asyncio.sleep(0.1)
if self.answers['guided']:
if 'guided-index' in self.answers:
disk = self.ui.body.form.disks[self.answers['guided-index']]
elif 'guided-label' in self.answers:
label = self.answers['guided-label']
[disk] = [d for d in self.ui.body.form.disks
if d.label == label]
method = self.answers.get('guided-method')
self.ui.body.form.guided_choice.value = {
'disk': disk,