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 (37 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
summary: Verify AppStream ID integration

details: |
    Verify the AppStream ID is included in the search API response and also validate
    that the AppStream ID is included in the installed snaps and apps API response.

# TODO we have gojq, so try enabling on ubuntu-core
systems:
    # ubuntu-core: no jq
    - -ubuntu-core*
    # TODO: test fails on PS7, timeout when making a request from snapd to snap
    # store, possibly network proxy misconfiguration
    - -amazon-linux-*

debug: |
    cat response || true

execute: |
    echo "Verify that search results contain common-ids"
    timeout 5 snap debug api /v2/find?name=test-snapd-appstreamid > response
    # shellcheck disable=SC2002
    cat response | gojq -r ' .result[0]["common-ids"] | sort | join (",")' | \
        MATCH 'io.snapcraft.test-snapd-appstreamid.bar,io.snapcraft.test-snapd-appstreamid.foo'

    snap install --edge test-snapd-appstreamid

    echo "Verify that installed snap info contains common-ids"
    timeout 5 snap debug api /v2/snaps/test-snapd-appstreamid > response
    # shellcheck disable=SC2002
    cat response | gojq -r ' .result["common-ids"] | sort | join(",")' | \
        MATCH 'io.snapcraft.test-snapd-appstreamid.bar,io.snapcraft.test-snapd-appstreamid.foo'

    echo "Verify that apps have their common-id set"
    timeout 5 snap debug api /v2/apps?names=test-snapd-appstreamid > response
    # shellcheck disable=SC2002
    cat response | gojq -r ' .result | sort_by(.name) | [.[]."common-id"] | join(",")' | \
        MATCH 'io.snapcraft.test-snapd-appstreamid.bar,,io.snapcraft.test-snapd-appstreamid.foo'