Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix lint and update test golden snapshot
  • Loading branch information
bensejas committed Mar 15, 2023
commit 3723d0b0a85fc258553c2667587a4ae15ad16634
4 changes: 2 additions & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type Options struct {
EnvironmentVariables map[string]string
Logger slog.Logger
AgentPorts map[int]string
SshMaxTimeout time.Duration
SSHMaxTimeout time.Duration
}

type Client interface {
Expand Down Expand Up @@ -127,7 +127,7 @@ func New(options Options) io.Closer {
lifecycleReported: make(chan codersdk.WorkspaceAgentLifecycle, 1),
ignorePorts: options.AgentPorts,
connStatsChan: make(chan *agentsdk.Stats, 1),
sshMaxTimeout: options.SshMaxTimeout,
sshMaxTimeout: options.SSHMaxTimeout,
}
a.init(ctx)
return a
Expand Down
2 changes: 1 addition & 1 deletion cli/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func workspaceAgent() *cobra.Command {
"GIT_ASKPASS": executablePath,
},
AgentPorts: agentPorts,
SshMaxTimeout: sshMaxTimeout,
SSHMaxTimeout: sshMaxTimeout,
})
<-ctx.Done()
return closer.Close()
Expand Down
18 changes: 10 additions & 8 deletions cli/testdata/coder_agent_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ Usage:
coder agent [flags]

Flags:
--auth string Specify the authentication type to use for the agent.
Consumes $CODER_AGENT_AUTH (default "token")
-h, --help help for agent
--log-dir string Specify the location for the agent log files.
Consumes $CODER_AGENT_LOG_DIR (default "/tmp")
--no-reap Do not start a process reaper.
--pprof-address string The address to serve pprof.
Consumes $CODER_AGENT_PPROF_ADDRESS (default "127.0.0.1:6060")
--auth string Specify the authentication type to use for the agent.
Consumes $CODER_AGENT_AUTH (default "token")
-h, --help help for agent
--log-dir string Specify the location for the agent log files.
Consumes $CODER_AGENT_LOG_DIR (default "/tmp")
--no-reap Do not start a process reaper.
--pprof-address string The address to serve pprof.
Consumes $CODER_AGENT_PPROF_ADDRESS (default "127.0.0.1:6060")
--ssh-max-timeout duration Specify the max timeout for a SSH connection.
Consumes $CODER_AGENT_SSH_MAX_TIMEOUT

Global Flags:
--global-config coder Path to the global coder config directory.
Expand Down