1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
summary: Checks for snap whoami
details: |
The snap login command authenticates the calling user to the snap store.
Ensure that after the user is logged in, the snap whoami command can be used
to display the name and email associated with the store account.
# ppc64el disabled because of https://bugs.launchpad.net/snappy/+bug/1655594
systems: [-ubuntu-core-*, -ubuntu-*-ppc64el]
restore: |
snap logout || true
execute: |
echo "whoami before login"
snap whoami | MATCH "email: -"
if [ -n "$SPREAD_STORE_USER" ] && [ -n "$SPREAD_STORE_PASSWORD" ]; then
expect -d -f "$TESTSLIB"/successful_login.exp
echo "whoami after login"
# use -F because the email can contain regexp metachars
snap whoami | grep -qF "email: $SPREAD_STORE_USER"
fi
|