The `create-user` test was failing on the testflinger external
pi3 devices. The reason is that the test only looked at
`$MANAGED_DEVICE` which is set in spread.yaml just based on
if the device is external or not. However not all external
devices are already managed (the testflinger pi3 is not).
So this commit fixes this by simply checking directly for
`snap managed` instead.
This is to add extra info when the test fails during beta validation
Error executing external:ubuntu-core-20-64:tests/core/create-user
(external:ubuntu-core-20-64) :
-----
+ '[' true = true ']'
+ snap create-user --sudoer mvo@ubuntu.com
created user "mvo"
+ echo 'Did not get expected error creating user in managed device'
Did not get expected error creating user in managed device
+ exit 1
-----
The idea of this change is to make tests work properly on devices which
are managed by default.
A following change should make those test work idependently is they are
initially managed or not.
This does not enable any new systems for these tests, it just moves them over.
We will work on enabling these tests to run on other systems in a follow-up.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>