From 733549196761fb822aa86ddb1d5c12cc9f6e677a Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Sat, 11 May 2024 14:46:07 +0800 Subject: [PATCH] Fix test --- .ci/tests/integration/e2e_with_tls.yaml | 2 +- api/compute/v1alpha1/common.go | 2 +- controllers/function_mesh.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/tests/integration/e2e_with_tls.yaml b/.ci/tests/integration/e2e_with_tls.yaml index 8ea255a8..f114aa89 100644 --- a/.ci/tests/integration/e2e_with_tls.yaml +++ b/.ci/tests/integration/e2e_with_tls.yaml @@ -131,5 +131,5 @@ verify: expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration/cases/global-and-namespaced-config/verify.sh expected: expected.data.yaml - - query: timeout 5m bash .ci/tests/integration/cases/functionmesh-generic-resources/verify.sh + - query: timeout 5m bash .ci/tests/integration/cases/functionmesh-with-generic-resources/verify.sh expected: expected.data.yaml diff --git a/api/compute/v1alpha1/common.go b/api/compute/v1alpha1/common.go index b85bbadb..8fcd102b 100644 --- a/api/compute/v1alpha1/common.go +++ b/api/compute/v1alpha1/common.go @@ -372,7 +372,7 @@ type ResourceCondition struct { Condition ResourceConditionType `json:"condition,omitempty"` Status metav1.ConditionStatus `json:"status,omitempty"` Action ReconcileAction `json:"action,omitempty"` - ApiVersion string `json:"apiVersion,omitempty"` + APIVersion string `json:"apiVersion,omitempty"` Kind string `json:"kind,omitempty"` } diff --git a/controllers/function_mesh.go b/controllers/function_mesh.go index a6bd11f3..79a498e4 100644 --- a/controllers/function_mesh.go +++ b/controllers/function_mesh.go @@ -254,7 +254,7 @@ func (r *FunctionMeshReconciler) observeGenericResources(ctx context.Context, me Condition: v1alpha1.GenericResourceReady, Status: metav1.ConditionFalse, Action: v1alpha1.Create, - ApiVersion: resource.APIVersion, + APIVersion: resource.APIVersion, Kind: resource.Kind, } continue @@ -508,7 +508,7 @@ func (r *FunctionMeshReconciler) UpdateFunctionMesh(ctx context.Context, req ctr if resourceCondition.Condition == v1alpha1.Orphaned { // clean up the orphaned generic resource obj := &unstructured.Unstructured{} - obj.SetAPIVersion(resourceCondition.ApiVersion) + obj.SetAPIVersion(resourceCondition.APIVersion) obj.SetKind(resourceCondition.Kind) if err := r.Get(ctx, types.NamespacedName{ Namespace: mesh.Namespace,