mirror of
https://github.com/coder/coder.git
synced 2026-10-16 14:48:56 +08:00
Fix examples to use correct positional argument syntax instead of non-existent --input flag
Co-authored-by: DanielleMaywood <40153966+DanielleMaywood@users.noreply.github.com>
This commit is contained in:
co-authored by
DanielleMaywood
parent
982d895ae5
commit
f303145703
@@ -32,11 +32,11 @@ func (r *RootCmd) taskCreate() *serpent.Command {
|
||||
Long: FormatExamples(
|
||||
Example{
|
||||
Description: "Create a task with all flags specified",
|
||||
Command: "coder exp task create --input \"Refactor CLI auth to use OAuth flow\" --template coder --org coder",
|
||||
Command: "coder exp task create \"Refactor CLI auth to use OAuth flow\" --template coder --org coder",
|
||||
},
|
||||
Example{
|
||||
Description: "Create a task with a preset",
|
||||
Command: "coder exp task create --input \"Add new API endpoint\" --template coder --preset backend",
|
||||
Command: "coder exp task create \"Add new API endpoint\" --template coder --preset backend",
|
||||
},
|
||||
),
|
||||
Middleware: serpent.Chain(
|
||||
|
||||
@@ -352,9 +352,9 @@ func TestTaskCreateHelp(t *testing.T) {
|
||||
output := sb.String()
|
||||
// Verify that the examples are present in the help output
|
||||
assert.Contains(t, output, "Create a task with all flags specified")
|
||||
assert.Contains(t, output, "coder exp task create --input \"Refactor CLI auth to use OAuth flow\"")
|
||||
assert.Contains(t, output, "coder exp task create \"Refactor CLI auth to use OAuth flow\"")
|
||||
assert.Contains(t, output, "--template coder --org coder")
|
||||
assert.Contains(t, output, "Create a task with a preset")
|
||||
assert.Contains(t, output, "coder exp task create --input \"Add new API endpoint\"")
|
||||
assert.Contains(t, output, "coder exp task create \"Add new API endpoint\"")
|
||||
assert.Contains(t, output, "--preset backend")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user