mirror of https://github.com/coder/coder.git
fix: avoid logging env in unit tests (#9885)
This commit is contained in:
parent
d8515f02af
commit
fad02081fc
|
@ -161,7 +161,6 @@ func (r *RootCmd) Command(subcommands []*clibase.Cmd) (*clibase.Cmd, error) {
|
|||
},
|
||||
),
|
||||
Handler: func(i *clibase.Invocation) error {
|
||||
// fmt.Fprintf(i.Stderr, "env debug: %+v", i.Environ)
|
||||
// The GIT_ASKPASS environment variable must point at
|
||||
// a binary with no arguments. To prevent writing
|
||||
// cross-platform scripts to invoke the Coder binary
|
||||
|
|
|
@ -368,7 +368,7 @@ func TestSSH(t *testing.T) {
|
|||
// Ensure that SSH_AUTH_SOCK is set.
|
||||
// Linux: /tmp/auth-agent3167016167/listener.sock
|
||||
// macOS: /var/folders/ng/m1q0wft14hj0t3rtjxrdnzsr0000gn/T/auth-agent3245553419/listener.sock
|
||||
pty.WriteLine("env")
|
||||
pty.WriteLine(`env | grep SSH_AUTH_SOCK=`)
|
||||
pty.ExpectMatch("SSH_AUTH_SOCK=")
|
||||
// Ensure that ssh-add lists our key.
|
||||
pty.WriteLine("ssh-add -L")
|
||||
|
|
|
@ -54,7 +54,7 @@ func TestStart(t *testing.T) {
|
|||
Height: 24,
|
||||
},
|
||||
}))
|
||||
pty, ps := ptytest.Start(t, pty.Command("env"), opts)
|
||||
pty, ps := ptytest.Start(t, pty.Command(`/bin/sh`, `-c`, `env | grep SSH_TTY`), opts)
|
||||
pty.ExpectMatch("SSH_TTY=/dev/")
|
||||
err := ps.Wait()
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Reference in New Issue