File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (24 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (3)
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