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>
Thu, 19 Sep 2024 12:43:40 +0000 (14:43 +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 5015ed7add5793f142778d8d9424de52f94812b6..34fdeaae968641ed4f798e4643f14ca166e96919 100755 (executable)
@@ -270,6 +270,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