From 3cbdcd023453b3fb12b4d5e9cf9c81cd68ae6b31 Mon Sep 17 00:00:00 2001 From: guessi Date: Sat, 16 Jul 2022 17:36:35 +0800 Subject: [PATCH] Update outdated default image for GCP (2022-07-16) --- drivers/google/create_test.go | 6 +++--- drivers/google/provider.go | 2 +- drivers/google/provider_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/google/create_test.go b/drivers/google/create_test.go index fb597a39..8a2670fc 100644 --- a/drivers/google/create_test.go +++ b/drivers/google/create_test.go @@ -56,7 +56,7 @@ func TestCreate(t *testing.T) { if want, got := instance.Address, "1.2.3.4"; got != want { t.Errorf("Want instance IP %q, got %q", want, got) } - if want, got := instance.Image, "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220204"; got != want { + if want, got := instance.Image, "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220712"; got != want { t.Errorf("Want instance ID %q, got %q", want, got) } if want, got := instance.ID, "agent-807jvfwj"; got != want { @@ -145,7 +145,7 @@ var insertInstanceMock = &compute.Instance{ AutoDelete: true, DeviceName: "agent-807jvfwj", InitializeParams: &compute.AttachedDiskInitializeParams{ - SourceImage: "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220204", + SourceImage: "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220712", DiskType: "projects/my-project/zones/us-central1-a/diskTypes/pd-standard", DiskSizeGb: 50, }, @@ -207,7 +207,7 @@ var insertInstanceMockB = &compute.Instance{ AutoDelete: true, DeviceName: "agent-807jvfwj", InitializeParams: &compute.AttachedDiskInitializeParams{ - SourceImage: "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220204", + SourceImage: "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220712", DiskType: "projects/my-project/zones/us-central1-b/diskTypes/pd-standard", DiskSizeGb: 50, }, diff --git a/drivers/google/provider.go b/drivers/google/provider.go index 257dd329..f7017aa6 100644 --- a/drivers/google/provider.go +++ b/drivers/google/provider.go @@ -78,7 +78,7 @@ func New(opts ...Option) (autoscaler.Provider, error) { p.size = "n1-standard-1" } if p.image == "" { - p.image = "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220204" + p.image = "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220712" } if p.network == "" { p.network = "global/networks/default" diff --git a/drivers/google/provider_test.go b/drivers/google/provider_test.go index a55aa2c5..05559c93 100644 --- a/drivers/google/provider_test.go +++ b/drivers/google/provider_test.go @@ -28,7 +28,7 @@ func TestDefaults(t *testing.T) { if got, want := p.diskType, "pd-standard"; got != want { t.Errorf("Want diskType %s, got %s", want, got) } - if got, want := p.image, "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220204"; got != want { + if got, want := p.image, "ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220712"; got != want { t.Errorf("Want image %q, got %q", want, got) } if got, want := p.network, "global/networks/default"; got != want {