Skip to content

Commit 95fbfb0

Browse files
bboozzoopedronis
authored andcommitted
tests/main/debs: tweak session-agent.socket unit check, run only during deb verification
Update the spread test to skip when testing against the archive deb (where the CI-built deb artifact is not available) and verify the symlink is present on the filesystem after install. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
1 parent b4904ce commit 95fbfb0

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/main/debs/task.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ details: |
1111
1212
systems: [-ubuntu-core-*, -fedora-*, -opensuse-*, -arch-*, -amazon-*, -centos-*]
1313

14+
skip:
15+
- reason: This test checks the locally-built deb content, which is not available when snapd is from the archive
16+
if: tests.info is-snapd-from-archive
17+
1418
execute: |
1519
echo "Ensure that our debs have the 'built-using' header"
1620
out=$(dpkg -I "$GOHOME"/snapd_*.deb)
@@ -23,6 +27,9 @@ execute: |
2327
2428
# not running on 14.04 because we don't have user sessions there
2529
if not os.query is-trusty; then
26-
echo "Ensure that the snapd.session-agent.socket symlinks is part of the deb and that it has the right (relative) target"
27-
dpkg -c "$GOHOME"/snapd_*.deb |MATCH -- '-> \.\./snapd.session-agent.socket'
30+
echo "Ensure that the snapd.session-agent.socket symlink is part of the deb and has the right (relative) target"
31+
dpkg -c "$GOHOME"/snapd_*.deb | MATCH -- '-> \.\./snapd.session-agent.socket'
32+
33+
echo "Ensure that the snapd.session-agent.socket symlink exists on the filesystem"
34+
test -L /usr/lib/systemd/user/sockets.target.wants/snapd.session-agent.socket
2835
fi

0 commit comments

Comments
 (0)