Skip to content

Commit

Permalink
Fix cli reuse policy flag type (#473)
Browse files Browse the repository at this point in the history
* Fix cli reuse policy flag type
  • Loading branch information
feedmeapples committed Jun 23, 2020
1 parent 927f01c commit 8d3896d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tools/cli/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ func (s *cliAppSuite) TestStartWorkflow() {
resp := &workflowservice.StartWorkflowExecutionResponse{RunId: uuid.New()}
s.frontendClient.EXPECT().StartWorkflowExecution(gomock.Any(), gomock.Any()).Return(resp, nil).Times(2)
// start with wid
err := s.app.Run([]string{"", "--ns", cliTestNamespace, "workflow", "start", "-tl", "testTaskList", "-wt", "testWorkflowType", "-et", "60", "-w", "wid", "wrp", "2"})
err := s.app.Run([]string{"", "--ns", cliTestNamespace, "workflow", "start", "-tl", "testTaskList", "-wt", "testWorkflowType", "-et", "60", "-w", "wid", "-wrp", "AllowDuplicateFailedOnly"})
s.Nil(err)
// start without wid
err = s.app.Run([]string{"", "--ns", cliTestNamespace, "workflow", "start", "-tl", "testTaskList", "-wt", "testWorkflowType", "-et", "60", "wrp", "2"})
err = s.app.Run([]string{"", "--ns", cliTestNamespace, "workflow", "start", "-tl", "testTaskList", "-wt", "testWorkflowType", "-et", "60", "-wrp", "AllowDuplicateFailedOnly"})
s.Nil(err)
}

Expand Down
6 changes: 3 additions & 3 deletions tools/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ func getFlagsForStart() []cli.Flag {
"\t│ │ │ │ │ \n" +
"\t* * * * *",
},
cli.IntFlag{
cli.StringFlag{
Name: FlagWorkflowIDReusePolicyAlias,
Usage: "Optional input to configure if the same workflow Id is allow to use for new workflow execution. " +
"Available options: 0: AllowDuplicate, 1: AllowDuplicateFailedOnly, 2: RejectDuplicate",
Usage: "Configure if the same workflow Id is allowed for use in new workflow execution. " +
"Options: AllowDuplicate, AllowDuplicateFailedOnly, RejectDuplicate",
},
cli.StringFlag{
Name: FlagInputWithAlias,
Expand Down

0 comments on commit 8d3896d

Please sign in to comment.