From 39543a965ceac9c67ee81530cdfb227471fb1867 Mon Sep 17 00:00:00 2001 From: SRIKUMAR VENUGOPAL Date: Fri, 26 Apr 2024 16:43:33 +0100 Subject: [PATCH] restoring go v1.22 Signed-off-by: SRIKUMAR VENUGOPAL --- src/dataset-operator/Dockerfile | 2 +- .../mutatingwebhook_test.go | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/dataset-operator/Dockerfile b/src/dataset-operator/Dockerfile index 73e5a858..a5ee9bd2 100644 --- a/src/dataset-operator/Dockerfile +++ b/src/dataset-operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder WORKDIR /dataset-operator # Copy the Go Modules manifests diff --git a/src/dataset-operator/admissioncontroller/mutatingwebhook_test.go b/src/dataset-operator/admissioncontroller/mutatingwebhook_test.go index 672ac12c..cb4f106a 100644 --- a/src/dataset-operator/admissioncontroller/mutatingwebhook_test.go +++ b/src/dataset-operator/admissioncontroller/mutatingwebhook_test.go @@ -9,6 +9,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" jsonpatch "gomodules.xyz/jsonpatch/v2" + admissionv1 "k8s.io/api/admission/v1" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/client" @@ -314,6 +315,24 @@ var _ = DescribeTable("Pod is mutated correctly", }), ) +type testAdmissionRequest struct { + inputRequest func() *admissionv1.AdmissionRequest + outResponse func() *admissionv1.AdmissionResponse +} + +var _ = DescribeTable("Mutation operation happens correctly", + func(ts *testAdmissionRequest) { + + }, + Entry("", &testAdmissionRequest{ + inputRequest: func() *admissionv1.AdmissionRequest { + return nil + }, + outResponse: func() *admissionv1.AdmissionResponse { + return nil + }, + })) + var _ = AfterSuite(func() { By("tearing down the test environment") err := testEnv.Stop()