diff options
-rw-r--r-- | units/snapd/snapd.pxu | 74 | ||||
-rw-r--r-- | units/snapd/test-plan.pxu | 4 | ||||
-rw-r--r-- | units/ubuntucore/jobs.pxu | 80 | ||||
-rw-r--r-- | units/ubuntucore/test-plan.pxu | 2 |
4 files changed, 90 insertions, 70 deletions
diff --git a/units/snapd/snapd.pxu b/units/snapd/snapd.pxu index 1375749..65cf5a8 100644 --- a/units/snapd/snapd.pxu +++ b/units/snapd/snapd.pxu @@ -188,7 +188,7 @@ _summary: Rollback system update using the snap tool _purpose: Check core can be reverted by snap revert _steps: - 1. Check version number + 1. Check version number (Note the version number) snap list core 2. Revert snap revert core @@ -196,8 +196,10 @@ _steps: sudo reboot 4. Check version number snap list core + 5. Remove reverted version (and associated data) to make system clean + snap remove core --revision=<edge_revision> _verification: - Check core version is back to its stable version + Check core version at step 4 is back to its stable version plugin: manual depends: snappy/os-refresh category_id: snapd @@ -208,7 +210,7 @@ _summary: Rollback system update using the snap tool _purpose: Check core can be reverted by snap revert _steps: - 1. Check version number + 1. Check version number (Note the version number) snap list core 2. Revert snap revert core @@ -216,75 +218,15 @@ _steps: sudo reboot 4. Check version number snap list core + 5. Remove reverted version (and associated data) to make system clean + snap remove core --revision=<edge_revision> _verification: - Check core version is back to its stable version + Check core version at step 4 is back to its stable version plugin: manual depends: snappy/os-refresh-with-refresh-control category_id: snapd estimated_duration: 400 -id: snappy/os-fail-boot -_summary: Automatically rollback after failed boot after upgrade -_purpose: - Check system will rollback to original core snap if failed to boot the updated one -_steps: - 1. Remove reverted version (and associated data) - snap remove core --revision=<edge_revision> - 2. Check that the edge revision is back in the refresh list - snap refresh --list core - 3. Update - snap refresh core --edge - 4. Modify the GRUB Environment Block to simulate a failed boot - sudo /usr/bin/grub-editenv /boot/grub/grubenv set snap_mode=trying - 5. Reboot the system and log in - sudo reboot - 6. Check version number - snap list core -_verification: - Check system is currently booting the stable core version -plugin: manual -category_id: snapd -depends: snappy/os-revert -estimated_duration: 500 - -id: snappy/os-fail-boot-with-refresh-control -_summary: Automatically rollback after failed boot after upgrade -_purpose: - Check system will rollback to original core snap if failed to boot the updated one -_steps: - 1. Remove reverted version (and associated data) - snap remove core --revision=<edge_revision> - 2. Check that the edge revision is back in the refresh list - snap refresh --list core - 3. Update - snap refresh core --edge --ignore-validation - 4. Modify the GRUB Environment Block to simulate a failed boot - sudo /usr/bin/grub-editenv /boot/grub/grubenv set snap_mode=trying - 5. Reboot the system and log in - sudo reboot - 6. Check version number - snap list core -_verification: - Check system is currently booting the stable core version -plugin: manual -category_id: snapd -depends: snappy/os-revert-with-refresh-control -estimated_duration: 500 - -id: snappy/sshd -_summary: SSH is enabled and operational -_purpose: - Check if user can access the system through ssh from other machine -_steps: - 1. Execute following command on other machine in same network - ssh [user id]@[ip address of the testing system] - 2. Enter password to login -_verification: - Can log into system through ssh from other machine -plugin: manual -category_id: snapd -estimated_duration: 120 - id: snappy/test-store-install-beta _summary: Snappy install command - beta channel store _purpose: diff --git a/units/snapd/test-plan.pxu b/units/snapd/test-plan.pxu index b476809..041bdb3 100644 --- a/units/snapd/test-plan.pxu +++ b/units/snapd/test-plan.pxu @@ -31,8 +31,6 @@ _description: include: snappy/os-refresh snappy/os-revert - snappy/os-fail-boot - snappy/sshd mandatory_include: snap bootstrap_include: @@ -47,8 +45,6 @@ _description: include: snappy/os-refresh-with-refresh-control snappy/os-revert-with-refresh-control - snappy/os-fail-boot-with-refresh-control - snappy/sshd mandatory_include: snap bootstrap_include: diff --git a/units/ubuntucore/jobs.pxu b/units/ubuntucore/jobs.pxu index 9dbf44f..8cae699 100644 --- a/units/ubuntucore/jobs.pxu +++ b/units/ubuntucore/jobs.pxu @@ -49,3 +49,83 @@ _verification: Check if a new serial-assertion device-key got generated after reinstallation completes plugin: manual category_id: ubuntucore + +unit: template +template-resource: lsb +template-filter: lsb.distributor_id == 'Ubuntu Core' +template-engine: jinja2 +template-unit: job +id: ubuntucore/os-fail-boot-{{description}} +_summary: Automatically rollback after failed boot after upgrade +_purpose: + Check system will rollback to original core snap if failed to boot the updated one +_steps: + {% if release == '16' -%} + {% set release = '' -%} + {% endif -%} + 1. Check the current revision of core{{release}} + $ snap list core{{release}} + 2. Update to edge. + Note that system will automatically reboot in 1 minute after doing this command. + Please execute the command in step 3 in 1 minute to stop the automatic reboot. + $ sudo snap refresh core{{release}} --edge + 3. Cancel the automatic shutdown + $ sudo shutdown -c + 4. Simulate a failed boot by the following command + $ sudo sed -i 's/base_status=try/base_status=trying/' /var/lib/snapd/modeenv + 5. Reboot the system and log in + $ sudo reboot + 6. Check the revision of core{{release}} again + $ snap list core{{release}} +_verification: + Check system is still booting the stable core version (original revision) +plugin: manual +category_id: ubuntucore +estimated_duration: 500 + +unit: template +template-resource: lsb +template-filter: lsb.distributor_id == 'Ubuntu Core' +template-engine: jinja2 +template-unit: job +id: ubuntucore/os-fail-boot-with-refresh-control-{{description}} +_summary: Automatically rollback after failed boot after upgrade +_purpose: + Check system will rollback to original core snap if failed to boot the updated one +_steps: + {% if release == '16' -%} + {% set release = '' -%} + {% endif -%} + 1. Check the current revision of core{{release}} + $ snap list core{{release}} + 2. Update to edge. + Note that system will automatically reboot in 1 minute after doing this command. + Please execute the command in step 3 in 1 minute to stop the automatic reboot. + $ sudo snap refresh core{{release}} --edge --ignore-validation + 3. Cancel the automatic shutdown + $ sudo shutdown -c + 4. Simulate a failed boot by the following command + $ sudo sed -i 's/base_status=try/base_status=trying/' /var/lib/snapd/modeenv + 5. Reboot the system and log in + $ sudo reboot + 6. Check the revision of core{{release}} again + $ snap list core{{release}} +_verification: + Check system is still booting the stable core version (original revision) +plugin: manual +category_id: ubuntucore +estimated_duration: 500 + +id: ubuntucore/sshd +_summary: SSH is enabled and operational +_purpose: + Check if user can access the system through ssh from other machine +_steps: + 1. Execute following command on other machine in same network + $ ssh [user id]@[ip address of the testing system] + 2. Enter password to login +_verification: + Can log into system through ssh from other machine +plugin: manual +category_id: ubuntucore +estimated_duration: 120 diff --git a/units/ubuntucore/test-plan.pxu b/units/ubuntucore/test-plan.pxu index cdc03d7..3b980db 100644 --- a/units/ubuntucore/test-plan.pxu +++ b/units/ubuntucore/test-plan.pxu @@ -20,3 +20,5 @@ _description: Manual OS feature tests for Ubuntu Core devices include: ubuntucore/os-reinstall-mode ubuntucore/os-recovery-mode + ubuntucore/os-fail-boot-(?!with-refresh-control).* + ubuntucore/sshd |