Skip to content

Commit

Permalink
fix(cdsctl): rename duplicated file arg for template bulk cmd (#3986)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored and sguiheux committed Mar 4, 2019
1 parent 3e86268 commit b6f202c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions cli/cdsctl/template_bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ var templateBulkCmd = cli.Command{
Default: "",
},
{
Name: "file",
ShortHand: "f",
Usage: "Specify path|url of a json|yaml file that contains instances with params",
Name: "instances-file",
Usage: "Specify path|url of a json|yaml file that contains instances with params",
},
{
Type: cli.FlagBool,
Expand Down Expand Up @@ -331,7 +330,7 @@ func templateBulkRun(v cli.Values) error {
}

// validate data from file
filePath := v.GetString("file")
filePath := v.GetString("instances-file")
wtFromFile, fileOperations, err := templateExtractAndValidateFileParams(filePath)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion docs/static/images/workflow_template_bulk.cast
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
[58.884835, "o", "e"]
[59.749469, "o", "\u001b[?1l\u001b>"]
[59.749647, "o", "\u001b[?2004l\r\r\n"]
[59.75067, "o", "\u001b]2;cdsctl template bulk -f instances.yml --track --no-interactive\u0007\u001b]1;cdsctl\u0007"]
[59.75067, "o", "\u001b]2;cdsctl template bulk --instances-file instances.yml --track --no-interactive\u0007\u001b]1;cdsctl\u0007"]
[60.038244, "o", "Bulk request with id 98 successfully created for template shared.infra/example-simple with 2 operations\r\n"]
[60.138665, "o", "\r \rDEMO/demo1 -> \u001b[33mprocessing\u001b[0m \r\nDEMO/demo2 -> \u001b[34mpending\u001b[0m \r\n"]
[60.655449, "o", "\r \u001b[1F\r \u001b[1F\r \rDEMO/demo1 -> \u001b[32mdone\u001b[0m \r\nDEMO/demo2 -> \u001b[32mdone\u001b[0m \r\n"]
Expand Down
2 changes: 1 addition & 1 deletion tests/clictl_template_bulk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ testcases:

- name: sendTemplateBulkRequest
steps:
- script: {{.cds.build.cdsctl}} template bulk --file ./tests/fixtures/template/bulk_request.yml --no-interactive
- script: {{.cds.build.cdsctl}} template bulk --instances-file ./tests/fixtures/template/bulk_request.yml --no-interactive
assertions:
- result.code ShouldEqual 0
extracts:
Expand Down

0 comments on commit b6f202c

Please sign in to comment.