snap: add support for `snap watch --last={revert,enable,disable,switch}`
While looking at our code I noticed that we are a bit inconsistent
in our changeIDMixin about where we accept the "short" form for
a change and where we don't. E.g. for the change type `install-snap`
we support the short form `install` but for others like `revert-snap`
we do not.
This commit unifies this some more and by doing this fixes a bug in
our testsuite along the way where we use `snap watch --last=revert?`
which did not work but will now work with this commit.
tests/core/kernel-and-base-single-reboot-failover, tests/lib/fakestore: verify failover scenario
* tests/lib/fakestore: allow passing a snap blob file or dir to make-refreshable
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/core/kernel-and-base-single-reboot-failover: verify failover handling
Verify failover handling when executing simultaneous refresh of kernel and base
with a single reboot.
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/lib/fakestore/refresh: strip quoting when faking a new version
Sometimes a snap version can be quoted, eg. version: '2021112' in core18 to
avoid ambiguity whether the value is a string or a number. However, when adding
+fake1 suffix, it's clearly a string, thus the quoting should be stripped,
otherwise we produce invalid yaml.
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/lib/fakestore: allow dots in original version
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/core/kernel-and-base-single-reboot-failover: comments update
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/lib/fakestore: provide help message for new make-refreshable options
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/lib/fakestore: more improvements to make-refreshable command
Signed-off-by: Maciej Borzecki <email address hidden>
* tests/core/kernel-and-base-single-reboot-failover: tweak comments
Signed-off-by: Maciej Borzecki <email address hidden>