diff --git a/internal/acctest/provider_factory.go b/internal/acctest/provider_factory.go index 1c92116d..dc1313ae 100644 --- a/internal/acctest/provider_factory.go +++ b/internal/acctest/provider_factory.go @@ -17,7 +17,7 @@ const TestImage = "images:alpine/edge" // TestCachedImage is a constant that specifies the default image used in image caching tests. // NOTE: it must be different from TestImage otherwise tests running in parallel will race to // use and delete that image causing random failures. -const TestCachedImage = "ubuntu-minimal-daily:22.04" +const TestCachedImage = "images:alpine/edge/cloud" var TestCachedImageSourceRemote, TestCachedImageSourceImage, _ = strings.Cut(TestCachedImage, ":") diff --git a/internal/image/resource_cached_image_test.go b/internal/image/resource_cached_image_test.go index c095df69..89668ef6 100644 --- a/internal/image/resource_cached_image_test.go +++ b/internal/image/resource_cached_image_test.go @@ -21,7 +21,7 @@ func TestAccCachedImage_basic(t *testing.T) { resource.TestCheckResourceAttr("lxd_cached_image.img1", "source_remote", acctest.TestCachedImageSourceRemote), resource.TestCheckResourceAttr("lxd_cached_image.img1", "source_image", acctest.TestCachedImageSourceImage), resource.TestCheckResourceAttr("lxd_cached_image.img1", "copy_aliases", "true"), - resource.TestCheckResourceAttr("lxd_cached_image.img1", "copied_aliases.#", "6"), + resource.TestCheckResourceAttr("lxd_cached_image.img1", "copied_aliases.#", "2"), ), }, }, @@ -39,7 +39,7 @@ func TestAccCachedImage_basicVM(t *testing.T) { resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "source_remote", acctest.TestCachedImageSourceRemote), resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "source_image", acctest.TestCachedImageSourceImage), resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "copy_aliases", "true"), - resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "copied_aliases.#", "6"), + resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "copied_aliases.#", "2"), resource.TestCheckResourceAttr("lxd_cached_image.img1vm", "type", "virtual-machine"), ), }, @@ -89,7 +89,7 @@ func TestAccCachedImage_copiedAliases(t *testing.T) { resource.TestCheckTypeSetElemAttr("lxd_cached_image.img3", "aliases.*", acctest.TestCachedImageSourceImage), resource.TestCheckTypeSetElemAttr("lxd_cached_image.img3", "aliases.*", alias1), resource.TestCheckTypeSetElemAttr("lxd_cached_image.img3", "aliases.*", alias2), - resource.TestCheckResourceAttr("lxd_cached_image.img3", "copied_aliases.#", "6"), + resource.TestCheckResourceAttr("lxd_cached_image.img3", "copied_aliases.#", "2"), ), }, }, @@ -109,7 +109,7 @@ func TestAccCachedImage_aliasCollision(t *testing.T) { resource.TestCheckResourceAttr("lxd_cached_image.img4", "copy_aliases", "true"), resource.TestCheckResourceAttr("lxd_cached_image.img4", "aliases.#", "1"), resource.TestCheckResourceAttr("lxd_cached_image.img4", "aliases.0", acctest.TestCachedImageSourceImage+"/amd64"), - resource.TestCheckResourceAttr("lxd_cached_image.img4", "copied_aliases.#", "6"), + resource.TestCheckResourceAttr("lxd_cached_image.img4", "copied_aliases.#", "2"), ), }, },