From 953ac8b325661457bdd487a8c3fd1ad0bec0a84e Mon Sep 17 00:00:00 2001 From: Cloud Deploy Team Date: Thu, 8 Oct 2026 12:51:13 -0700 Subject: [PATCH] Prepare tests for fakegcsserver 1.56 PiperOrigin-RevId: 996013659 --- custom-targets/git-ops/git-deployer/Dockerfile | 2 +- custom-targets/helm/helm-deployer/Dockerfile | 2 +- custom-targets/terraform/terraform-deployer/render.go | 3 ++- packages/gcs/gcs_test.go | 3 +-- postdeploy-hooks/k8s-cleanup/Dockerfile | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/custom-targets/git-ops/git-deployer/Dockerfile b/custom-targets/git-ops/git-deployer/Dockerfile index 79acc23..41e2351 100644 --- a/custom-targets/git-ops/git-deployer/Dockerfile +++ b/custom-targets/git-ops/git-deployer/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG GCLOUD_VERSION=456.0.0 +ARG GCLOUD_VERSION=588.0.0 ARG GO_VERSION=1.24 FROM golang:${GO_VERSION} AS go-build diff --git a/custom-targets/helm/helm-deployer/Dockerfile b/custom-targets/helm/helm-deployer/Dockerfile index ba087a5..b2bb452 100644 --- a/custom-targets/helm/helm-deployer/Dockerfile +++ b/custom-targets/helm/helm-deployer/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG GCLOUD_VERSION=456.0.0 +ARG GCLOUD_VERSION=588.0.0 ARG GO_VERSION=1.24 ARG HELM_VERSION=3.13.2 diff --git a/custom-targets/terraform/terraform-deployer/render.go b/custom-targets/terraform/terraform-deployer/render.go index 45295b1..c6810a4 100644 --- a/custom-targets/terraform/terraform-deployer/render.go +++ b/custom-targets/terraform/terraform-deployer/render.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// render provides rendering logic for Terraform configurations in Cloud Deploy. package main import ( @@ -31,7 +32,7 @@ import ( "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/hashicorp/hcl/v2/hclwrite" "github.com/mholt/archiver/v3" - "google3/third_party/golang/github_com/zclconf/go_cty/v/v1/cty/cty" + "github.com/zclconf/go-cty/cty" ) const ( diff --git a/packages/gcs/gcs_test.go b/packages/gcs/gcs_test.go index 0ad14a8..7915bd4 100644 --- a/packages/gcs/gcs_test.go +++ b/packages/gcs/gcs_test.go @@ -155,6 +155,7 @@ func TestUploadGCS(t *testing.T) { fakeContent := "hello world" fakeObj := "obj" fakeGCS := fakestorage.NewServer([]fakestorage.Object{}) + t.Cleanup(fakeGCS.Stop) fakeGCS.CreateBucketWithOpts(fakestorage.CreateBucketOpts{Name: bucket}) fakeContentForFile := "hellooo" @@ -195,8 +196,6 @@ func TestUploadGCS(t *testing.T) { if string(o.Content) != test.wantContent { t.Errorf("uploadGCS failed with wrong content: got %q, want %q", o.Content, test.wantContent) } - - fakeGCS.Stop() }) } diff --git a/postdeploy-hooks/k8s-cleanup/Dockerfile b/postdeploy-hooks/k8s-cleanup/Dockerfile index 7bd5a2b..ec208b1 100644 --- a/postdeploy-hooks/k8s-cleanup/Dockerfile +++ b/postdeploy-hooks/k8s-cleanup/Dockerfile @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -ARG GCLOUD_VERSION=506.0.0 +ARG GCLOUD_VERSION=588.0.0 ARG GO_VERSION=1.24 FROM golang:${GO_VERSION} AS build