summaryrefslogtreecommitdiff
path: root/tests
diff options
authorSamuele Pedroni <pedronis@lucediurna.net>2016-08-31 09:04:51 +0200
committerSamuele Pedroni <pedronis@lucediurna.net>2016-08-31 09:04:51 +0200
commit79354f2cf375559f329260f1bbb7db553cd0be70 (patch)
tree011d217cb1f40959838b872a6ed56b09505ec74e /tests
parent9f038c1ef944d66db4d7774f2c0510f7429f0999 (diff)
parent961a1dcdd6a57f552aa724801d4e501f880e3595 (diff)
Merge remote-tracking branch 'upstream/master' into asserts-derive-sideinfo-for-install-path
Diffstat (limited to 'tests')
-rw-r--r--tests/main/firstboot-assertions/task.yaml8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/main/firstboot-assertions/task.yaml b/tests/main/firstboot-assertions/task.yaml
index 630b047f9a..525ccb46a3 100644
--- a/tests/main/firstboot-assertions/task.yaml
+++ b/tests/main/firstboot-assertions/task.yaml
@@ -8,7 +8,10 @@ prepare: |
rm -f /var/lib/snapd/state.json
mkdir -p $SEED_DIR/assertions
touch $SEED_DIR/seed.yaml
+ # pretend to be not classic :)
+ mv /var/lib/dpkg/status /var/lib/dpkg/status.save
restore: |
+ mv /var/lib/dpkg/status.save /var/lib/dpkg/status
systemctl start snapd.service
execute: |
echo Copy the needed assertions to /var/lib/snapd/
@@ -21,8 +24,7 @@ execute: |
snap firstboot
echo Verifying the result
- output=$(find /var/lib/snapd/assertions/ -type f|wc -l)
- if [ "$output" -lt "4" ]; then
- echo "Expected at least 4 assertions, found $output"
+ if [ $(snap known model|grep "type: model"|wc -l) != "1" ]; then
+ echo "Model assertion was not imported on firstboot"
exit 1
fi