mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
chore: renamed coder template edit
flags in coder CLI (#3471)
Use `-` over `_` for cli flags
This commit is contained in:
committed by
GitHub
parent
b3d3b8ba0f
commit
c3fcf7c953
@ -53,8 +53,8 @@ func templateEdit() *cobra.Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().StringVarP(&description, "description", "", "", "Edit the template description")
|
cmd.Flags().StringVarP(&description, "description", "", "", "Edit the template description")
|
||||||
cmd.Flags().DurationVarP(&maxTTL, "max_ttl", "", 0, "Edit the template maximum time before shutdown")
|
cmd.Flags().DurationVarP(&maxTTL, "max-ttl", "", 0, "Edit the template maximum time before shutdown")
|
||||||
cmd.Flags().DurationVarP(&minAutostartInterval, "min_autostart_interval", "", 0, "Edit the template minimum autostart interval")
|
cmd.Flags().DurationVarP(&minAutostartInterval, "min-autostart-interval", "", 0, "Edit the template minimum autostart interval")
|
||||||
cliui.AllowSkipPrompt(cmd)
|
cliui.AllowSkipPrompt(cmd)
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
@ -38,8 +38,8 @@ func TestTemplateEdit(t *testing.T) {
|
|||||||
"edit",
|
"edit",
|
||||||
template.Name,
|
template.Name,
|
||||||
"--description", desc,
|
"--description", desc,
|
||||||
"--max_ttl", maxTTL.String(),
|
"--max-ttl", maxTTL.String(),
|
||||||
"--min_autostart_interval", minAutostartInterval.String(),
|
"--min-autostart-interval", minAutostartInterval.String(),
|
||||||
}
|
}
|
||||||
cmd, root := clitest.New(t, cmdArgs...)
|
cmd, root := clitest.New(t, cmdArgs...)
|
||||||
clitest.SetupConfig(t, client, root)
|
clitest.SetupConfig(t, client, root)
|
||||||
@ -74,8 +74,8 @@ func TestTemplateEdit(t *testing.T) {
|
|||||||
"edit",
|
"edit",
|
||||||
template.Name,
|
template.Name,
|
||||||
"--description", template.Description,
|
"--description", template.Description,
|
||||||
"--max_ttl", (time.Duration(template.MaxTTLMillis) * time.Millisecond).String(),
|
"--max-ttl", (time.Duration(template.MaxTTLMillis) * time.Millisecond).String(),
|
||||||
"--min_autostart_interval", (time.Duration(template.MinAutostartIntervalMillis) * time.Millisecond).String(),
|
"--min-autostart-interval", (time.Duration(template.MinAutostartIntervalMillis) * time.Millisecond).String(),
|
||||||
}
|
}
|
||||||
cmd, root := clitest.New(t, cmdArgs...)
|
cmd, root := clitest.New(t, cmdArgs...)
|
||||||
clitest.SetupConfig(t, client, root)
|
clitest.SetupConfig(t, client, root)
|
||||||
|
Reference in New Issue
Block a user