From 24271f675c4c88c020ea6650609ae07175e13545 Mon Sep 17 00:00:00 2001 From: Nikki Dag Date: Tue, 23 Jul 2024 16:31:36 -0500 Subject: [PATCH] Support changing the target namespace of an endpoint --- app/nexus.go | 2 +- app/nexus_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/nexus.go b/app/nexus.go index 8dccdbc..706f818 100644 --- a/app/nexus.go +++ b/app/nexus.go @@ -428,7 +428,7 @@ func NewNexusCommand(getNexusClientFn GetNexusClientFn) (CommandOut, error) { endpointDescriptionOptionalFlag, endpointDescriptionFileOptionalFlag, unsetEndpointDescriptionOptionalFlag, - // targetNamespaceFlagOptional, TODO: Uncomment when we support updating target namespace + targetNamespaceFlagOptional, targetTaskQueueFlagOptional, ResourceVersionFlag, RequestIDFlag, diff --git a/app/nexus_test.go b/app/nexus_test.go index 8858e4b..4921ebb 100644 --- a/app/nexus_test.go +++ b/app/nexus_test.go @@ -230,8 +230,8 @@ func (s *NexusTestSuite) TestEndpointUpdate() { "--request-id", exampleEndpoint.AsyncOperationId, )) - // update target-namespace success TODO: Uncomment when we support updating target namespace - /*s.mockCloudService.EXPECT().GetNexusEndpoints(gomock.Any(), gomock.Any()).Return(&cloudservice.GetNexusEndpointsResponse{Endpoints: []*nexus.Endpoint{getExampleNexusEndpoint()}}, nil).Times(1) + // update target-namespace success + s.mockCloudService.EXPECT().GetNexusEndpoints(gomock.Any(), gomock.Any()).Return(&cloudservice.GetNexusEndpointsResponse{Endpoints: []*nexus.Endpoint{getExampleNexusEndpoint()}}, nil).Times(1) s.mockCloudService.EXPECT().UpdateNexusEndpoint(gomock.Any(), gomock.Any()).Return(&cloudservice.UpdateNexusEndpointResponse{ AsyncOperation: &operation.AsyncOperation{ Id: exampleEndpoint.AsyncOperationId, @@ -241,7 +241,7 @@ func (s *NexusTestSuite) TestEndpointUpdate() { "--name", exampleEndpoint.Spec.Name, "--target-namespace", exampleEndpoint.Spec.TargetSpec.WorkerTargetSpec.NamespaceId+"-updated", "--request-id", exampleEndpoint.AsyncOperationId, - ))*/ + )) // update description file success path := "nexus_endpoint_description_test.md" @@ -295,7 +295,7 @@ func (s *NexusTestSuite) TestEndpointUpdate() { s.NoError(s.RunCmd("nexus", "endpoint", "update", "--name", exampleEndpoint.Spec.Name, "--description", exampleEndpoint.Spec.Description+"-updated", - // "--target-namespace", exampleEndpoint.Spec.TargetSpec.WorkerTargetSpec.NamespaceId+"-updated", + "--target-namespace", exampleEndpoint.Spec.TargetSpec.WorkerTargetSpec.NamespaceId+"-updated", "--target-task-queue", exampleEndpoint.Spec.TargetSpec.WorkerTargetSpec.TaskQueue+"-updated", "--request-id", exampleEndpoint.AsyncOperationId, ))