Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: log after test exit in TestAgent/StartupScript #1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 24, 2022
Merged

Conversation

coadler
Copy link
Contributor

@coadler coadler commented May 24, 2022

$ go test ./agent/ -v -run TestAgent/StartupScript -count 1
=== RUN   TestAgent
=== PAUSE TestAgent
=== CONT  TestAgent
=== RUN   TestAgent/StartupScript
=== PAUSE TestAgent/StartupScript
=== CONT  TestAgent/StartupScript
    t.go:56: 2022-05-24 20:22:39.648 [INFO]	<agent.go:112>	connected
--- PASS: TestAgent (0.00s)
    --- PASS: TestAgent/StartupScript (0.17s)
PASS
panic: Log in goroutine after TestAgent/StartupScript has completed: 2022-05-24 20:22:39.651 [WARN]	<agent.go:130>	agent script failed ...
"error": run:
             github.com/coder/coder/agent.(*agent).runStartupScript
                 /home/colin/Projects/coder/coder/agent/agent.go:183
           - signal: killed

@coadler coadler self-assigned this May 24, 2022
@coadler coadler force-pushed the colin/log-after-exit branch from 3caf8f8 to 5d9b4d2 Compare May 24, 2022 20:28
@coadler coadler force-pushed the colin/log-after-exit branch from 5d9b4d2 to 78cd9e0 Compare May 24, 2022 20:29
@coadler coadler marked this pull request as ready for review May 24, 2022 20:29
@coadler coadler requested a review from kylecarbs May 24, 2022 20:29
peer/channel.go Outdated
Comment on lines 44 to 48
const (
ProtocolReconnectingPTY = "reconnecting-pty"
ProtocolSSH = "ssh"
ProtocolDial = "dial"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should toss these in the agent instead, since the protocol types are disconnected from peer.

@coadler coadler linked an issue May 24, 2022 that may be closed by this pull request
@coadler coadler merged commit 4543a3b into main May 24, 2022
@coadler coadler deleted the colin/log-after-exit branch May 24, 2022 21:03
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
```
$ go test ./agent/ -v -run TestAgent/StartupScript -count 1
=== RUN   TestAgent
=== PAUSE TestAgent
=== CONT  TestAgent
=== RUN   TestAgent/StartupScript
=== PAUSE TestAgent/StartupScript
=== CONT  TestAgent/StartupScript
    t.go:56: 2022-05-24 20:22:39.648 [INFO]	<agent.go:112>	connected
--- PASS: TestAgent (0.00s)
    --- PASS: TestAgent/StartupScript (0.17s)
PASS
panic: Log in goroutine after TestAgent/StartupScript has completed: 2022-05-24 20:22:39.651 [WARN]	<agent.go:130>	agent script failed ...
"error": run:
             github.com/coder/coder/agent.(*agent).runStartupScript
                 /home/colin/Projects/coder/coder/agent/agent.go:183
           - signal: killed
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: log after test exit in TestAgent/StartupScript
2 participants