Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe62f41

Browse files
committed
fix: update tests to add fish support
1 parentea7e55f commitbe62f41

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

‎agent/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ func (a *agent) run(ctx context.Context) error {
268268

269269
scriptDone:=make(chanerror,1)
270270
scriptStart:=time.Now()
271-
gofunc() {
271+
err=a.trackConnGoroutine(func() {
272272
deferclose(scriptDone)
273273
scriptDone<-a.runStartupScript(ctx,metadata.StartupScript)
274-
}()
274+
})
275275
gofunc() {
276276
vartimeout<-chan time.Time
277277
// If timeout is zero, an older version of the coder

‎agent/agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ func TestAgent_Lifecycle(t *testing.T) {
703703
t.Parallel()
704704

705705
_,client,_,_:=setupAgent(t, agentsdk.Metadata{
706-
StartupScript:"sleep10",
706+
StartupScript:"sleep5",
707707
StartupScriptTimeout:time.Nanosecond,
708708
},0)
709709

‎cli/root_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import (
2424
"github.com/coder/coder/testutil"
2525
)
2626

27+
funcinit() {
28+
// os.Setenv("NO_COLOR", "1")
29+
}
30+
2731
// To update the golden files:
2832
// make update-golden-files
2933
varupdateGoldenFiles=flag.Bool("update",false,"update .golden files")
@@ -112,7 +116,7 @@ ExtractCommandPathsLoop:
112116

113117
got:=buf.Bytes()
114118
// Remove CRLF newlines (Windows).
115-
got=bytes.ReplaceAll(got, []byte{'\r','\n'}, []byte{'\n'})
119+
//got = bytes.ReplaceAll(got, []byte{'\r', '\n'}, []byte{'\n'})
116120

117121
// The `coder templates create --help` command prints the path
118122
// to the working directory (--directory flag default value).

‎cli/ssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ func uploadGPGKeys(ctx context.Context, sshClient *gossh.Client) error {
458458
//
459459
// Note: we sleep after killing the agent because it doesn't always die
460460
// immediately.
461-
agentSocketBytes,err:=runRemoteSSH(sshClient,nil,`
461+
agentSocketBytes,err:=runRemoteSSH(sshClient,nil,`sh -c '
462462
set -eux
463463
agent_socket=$(gpgconf --list-dir agent-socket)
464464
echo "$agent_socket"
@@ -470,7 +470,7 @@ if [ -S "$agent_socket" ]; then
470470
fi
471471
472472
test ! -S "$agent_socket"
473-
`)
473+
'`)
474474
agentSocket:=strings.TrimSpace(string(agentSocketBytes))
475475
iferr!=nil {
476476
returnxerrors.Errorf("check if agent socket is running (check if %q exists): %w",agentSocket,err)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp