Skip to content

Commit

Permalink
Support changing the target namespace of an endpoint (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-dag authored Jul 25, 2024
1 parent 6ef98a5 commit 23343d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/nexus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions app/nexus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"
Expand Down Expand Up @@ -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,
))
Expand Down

0 comments on commit 23343d2

Please sign in to comment.