← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/lpcraft:fix-regression-from-adding-non-lts-support into lpcraft:main

 

Jürgen Gmach has proposed merging ~jugmac00/lpcraft:fix-regression-from-adding-non-lts-support into lpcraft:main.

Commit message:
Fix regression from adding support for support for non-LTS releases

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/438696
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:fix-regression-from-adding-non-lts-support into lpcraft:main.
diff --git a/lpcraft/providers/_lxd.py b/lpcraft/providers/_lxd.py
index bdbb5eb..565acac 100644
--- a/lpcraft/providers/_lxd.py
+++ b/lpcraft/providers/_lxd.py
@@ -267,6 +267,11 @@ class LXDProvider(Provider):
             image_remote = lxd.get_remote_image(alias.value)
         except lxd.LXDError as error:
             raise CommandError(str(error)) from error
+        # XXX 2023-03-10 jugmac00: The following line is not explicitly covered
+        # by our test suite. We probably need to add something like
+        # `mock_lxd.get_remote_image` and then assert on `add_remote` being
+        # called.
+        image_remote.add_remote(lxc=self.lxc)
         base_configuration = LPCraftBuilddBaseConfiguration(
             alias=alias, environment=environment, hostname=instance_name
         )