Comment 4 for bug 1936248

Revision history for this message
Dan Bungert (dbungert) wrote :

Note the logs are slightly modified code for debugging purposes, but vanilla main / the imsm merge commit fail also

diff --git a/scripts/runtests.sh b/scripts/runtests.sh
index 6fd8e88a..2f4909f5 100755
--- a/scripts/runtests.sh
+++ b/scripts/runtests.sh
@@ -4,6 +4,7 @@ set -eux
 testschema=.subiquity/test-autoinstall-schema.json

 validate () {
+ cat .subiquity/subiquity-curtin-install.conf
     python3 scripts/validate-yaml.py .subiquity/subiquity-curtin-install.conf
     if [ ! -e .subiquity/subiquity-client-debug.log ] || [ ! -e .subiquity/subiquity-server-debug.log ]; then
         echo "log file not created"
@@ -28,6 +29,9 @@ tty=$(tty) || tty=/dev/console

 export SUBIQUITY_REPLAY_TIMESCALE=100
 for answers in examples/answers*.yaml; do
+ if [ "$answers" != "examples/answers-imsm.yaml" ] ; then
+ continue
+ fi
     clean
     config=$(sed -n 's/^#machine-config: \(.*\)/\1/p' $answers || true)
     if [ -z "$config" ]; then
diff --git a/scripts/validate-yaml.py b/scripts/validate-yaml.py
index 9b53566b..f83de5fc 100644
--- a/scripts/validate-yaml.py
+++ b/scripts/validate-yaml.py
@@ -19,7 +19,9 @@ class StorageChecker:
         assert action['device'] in self.actions
         assert 'ptable' in self.actions[action['device']]
         if action.get('flag') in ('boot', 'bios_grub', 'prep'):
- assert self.actions[action['device']]['type'] == 'disk'
+ action_of_device = self.actions[action['device']]
+ assert action_of_device['type'] == 'disk', \
+ f'{action_of_device}["type"] != "disk"'

     def _check_format(self, action):
         assert 'volume' in action