From 0187bde4a0e75cf372dc7ebbb6c538cc34dbf615 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 8 Jul 2025 10:55:58 -0400 Subject: [PATCH] Fix nexus endpoint create error message --- temporalcli/commands.operator_nexus.go | 4 ++-- temporalcli/commands.operator_nexus_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/temporalcli/commands.operator_nexus.go b/temporalcli/commands.operator_nexus.go index f00808cf8..aeef936fa 100644 --- a/temporalcli/commands.operator_nexus.go +++ b/temporalcli/commands.operator_nexus.go @@ -24,7 +24,7 @@ func (c *TemporalOperatorNexusEndpointCreateCommand) run(cctx *CommandContext, _ return err } if target == nil { - return fmt.Errorf("either --target-namespace and --target-task queue or --target-url are required") + return fmt.Errorf("either --target-namespace and --target-task-queue or --target-url are required") } cl, err := c.Parent.Parent.Parent.ClientOptions.dialClient(cctx) @@ -253,7 +253,7 @@ func (c *TemporalOperatorNexusEndpointCommand) endpointTargetFromArgs(namespace, }, }, nil } - return nil, fmt.Errorf("either --target-namespace and --target-task queue or --target-url are required") + return nil, fmt.Errorf("either --target-namespace and --target-task-queue or --target-url are required") } func (c *TemporalOperatorNexusEndpointCommand) getEndpointByName(ctx context.Context, cl client.Client, name string) (*nexuspb.Endpoint, error) { diff --git a/temporalcli/commands.operator_nexus_test.go b/temporalcli/commands.operator_nexus_test.go index 0a3f8c92f..16bcfbd28 100644 --- a/temporalcli/commands.operator_nexus_test.go +++ b/temporalcli/commands.operator_nexus_test.go @@ -29,7 +29,7 @@ func (s *SharedServerSuite) TestCreateNexusEndpoint_Target() { s.T().Run("NoTarget_FailsValidation", func(t *testing.T) { res := s.Execute("operator", "nexus", "endpoint", "create", "--name", validEndpointName(t)) - require.ErrorContains(t, res.Err, "either --target-namespace and --target-task queue or --target-url are required") + require.ErrorContains(t, res.Err, "either --target-namespace and --target-task-queue or --target-url are required") }) s.T().Run("NoTaskQueue_FailsValidation", func(t *testing.T) { @@ -45,7 +45,7 @@ func (s *SharedServerSuite) TestCreateNexusEndpoint_Target() { "--name", validEndpointName(t), "--target-task-queue", "tq", ) - require.ErrorContains(t, res.Err, "either --target-namespace and --target-task queue or --target-url are required") + require.ErrorContains(t, res.Err, "either --target-namespace and --target-task-queue or --target-url are required") }) s.T().Run("WorkerTarget_Accepted", func(t *testing.T) {