tests: enable the snapd socket in autopkgtest
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>
Wed, 5 Jun 2024 08:13:14 +0000 (10:13 +0200)
committerZygmunt Krynicki <me@zygoon.pl>
Wed, 5 Jun 2024 08:16:06 +0000 (10:16 +0200)
For reasons I don't quite understand, and cannot reproduce when running
autopkgtest locally, when the system is tested on the Debian infrastructure
snapd ends up installed but not enabled.

Enable the socket to at least have a chance to run something.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Gbp-Pq: Name 0022-tests-enable-the-snapd-socket-in-autopkgtest.patch

tests/lib/prepare-restore.sh

index 850037ac5cf5005bbedffe53244ca3f960feb921..81c8f4f258e2cc3b566dd0a1d09b5761694eb858 100755 (executable)
@@ -266,6 +266,7 @@ prepare_project() {
     # we want to run as pristine as possible
     if [ "$SPREAD_BACKEND" = autopkgtest ]; then
         create_test_user
+        systemctl enable --now snapd.socket
         exit 0
     fi