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>
Mon, 17 Jun 2024 14:21:30 +0000 (16:21 +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 dfdd3147d68118dae9cc6edda79a2e3dfdf3487b..06eaaf84b09bcdd5697fad3c647c4f7f5df62f0c 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