From 0107bc494e984fc348afe03296d5fb0fd622724a Mon Sep 17 00:00:00 2001 From: Ahmad Ibrahim Date: Mon, 18 Dec 2023 14:50:16 -0800 Subject: [PATCH] fix: use http to make request to gRPC server --- internal/controller/validatorconfig_controller.go | 2 +- internal/controller/validatorconfig_controller_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/validatorconfig_controller.go b/internal/controller/validatorconfig_controller.go index d48188b8..c77d3fe0 100644 --- a/internal/controller/validatorconfig_controller.go +++ b/internal/controller/validatorconfig_controller.go @@ -406,7 +406,7 @@ func (r *ValidatorConfigReconciler) emitFinalizeCleanup() error { return fmt.Errorf("CLEANUP_GRPC_SERVER_PORT is invalid: %w", err) } - url := fmt.Sprintf("https://%s:%s", host, port) + url := fmt.Sprintf("http://%s:%s", host, port) client := cleanupv1connect.NewCleanupServiceClient( http.DefaultClient, url, diff --git a/internal/controller/validatorconfig_controller_test.go b/internal/controller/validatorconfig_controller_test.go index d854fb8d..55bed45b 100644 --- a/internal/controller/validatorconfig_controller_test.go +++ b/internal/controller/validatorconfig_controller_test.go @@ -266,7 +266,7 @@ func TestEmitFinalizeCleanup(t *testing.T) { "CLEANUP_GRPC_SERVER_HOST": "localhost", "CLEANUP_GRPC_SERVER_PORT": "1234", }, - expected: errors.New(`FinalizeCleanup request to https://localhost:1234 failed: unavailable: dial tcp [::1]:1234: connect: connection refused`), + expected: errors.New(`FinalizeCleanup request to http://localhost:1234 failed: unavailable: dial tcp [::1]:1234: connect: connection refused`), }, } for _, c := range cs {