Add remodel tests for Ubuntu Core 20 => 22 and 22 => 24 (New) #1858
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OPENED IN DRAFT FOR INPUT
Description
Introduce two new tests, one specifically for Ubuntu Core 20 that verifies the possibility of remodeling to Ubuntu Core 22, and one identical one for Ubuntu Core 22 that remodels to 24.
The tests are implemented with the assumption that the Ubuntu Core images used by certifications use the official models sourced from either cdimage (which use models from https://github.com/canonical/models) or they are built by certifications themself from the mentioned models.
There are currently a lot of limitations on how remodel works, which means that the models must match brand / model if done offline or the device must have a serial assertion (as offline remodels cannot be done from model to a new model, only upgrades and we do not have official models for that currently).
If we end in a situation where the remodeling has to be done offline, we must discuss how we solve this for certification testing. Because if things don't line up currently, then we simply cannot test remodelling in certifications without either a new set of models specifically for this, or we have to lax some of the requirements for remodeling (i.e. implement/support some missing cases).
It's important to be aware of the fact that these test cause the device to reboot multiple times.
Resolved issues
I don't know if there is a issue for covering this specific area of testing.
Documentation
Depending on the test-plan they get added to, we may have to update the coverage in https://certification.canonical.com/docs/programmes/iot/ ?
Tests
These tests have been tested in qemu for amd64 platform and on a Raspberry Pi4 for pi-arm64 platform, by installing my own custom checkbox frontend containing the two added tests, then run with the following commands:
and
The python script was tested before it was tested in a snapped checkbox context by running it from the users home directory with the parameters in the tests.