Skip to content

Commit 004248e

Browse files
committed
Add agent golden file
1 parent 3720443 commit 004248e

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

cli/root_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ func TestCommandHelp(t *testing.T) {
5353
"CODER_CACHE_DIRECTORY": "/tmp/coder-cli-test-cache",
5454
},
5555
},
56+
{
57+
name: "coder agent --help",
58+
cmd: []string{"agent", "--help"},
59+
env: map[string]string{
60+
"CODER_AGENT_LOG_DIR": "/tmp",
61+
},
62+
},
5663
}
5764

5865
root := cli.Root(cli.AGPL())
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Usage:
2+
coder agent [flags]
3+
4+
Flags:
5+
--auth string Specify the authentication type to use for the agent.
6+
Consumes $CODER_AGENT_AUTH (default "token")
7+
-h, --help help for agent
8+
--log-dir string Specify the location for the agent log files.
9+
Consumes $CODER_AGENT_LOG_DIR (default "/tmp")
10+
--no-reap Do not start a process reaper.
11+
--pprof-address string The address to serve pprof.
12+
Consumes $CODER_AGENT_PPROF_ADDRESS (default "127.0.0.1:6060")
13+
14+
Global Flags:
15+
--global-config coder Path to the global coder config directory.
16+
Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config")
17+
--header stringArray HTTP headers added to all requests. Provide as "Key=Value".
18+
Consumes $CODER_HEADER
19+
--no-feature-warning Suppress warnings about unlicensed features.
20+
Consumes $CODER_NO_FEATURE_WARNING
21+
--no-version-warning Suppress warning when client and server versions do not match.
22+
Consumes $CODER_NO_VERSION_WARNING
23+
--token string Specify an authentication token. For security reasons setting
24+
CODER_SESSION_TOKEN is preferred.
25+
Consumes $CODER_SESSION_TOKEN
26+
--url string URL to a deployment.
27+
Consumes $CODER_URL
28+
-v, --verbose Enable verbose output.
29+
Consumes $CODER_VERBOSE

0 commit comments

Comments
 (0)