resume active sessions
This commit is contained in:
1 parent
9e94c05fb6
commit
917a361370
19 files changed
+871
-42
No files matched your search
@@ -29,6 +29,8 @@ type FakeNode struct {
|
||||
FailWrites bool
|
||||
Usable model.Size
|
||||
Version string
|
||||
// Answers agent connections when set. Otherwise they echo.
|
||||
Goose *FakeGoose
|
||||
}
|
||||
|
||||
func NewFakeNode(name string) *FakeNode {
|
||||
@@ -81,6 +83,9 @@ func (f *FakeNode) DialAgent(_ context.Context, machine, secret string) (node.Ms
|
||||
if secret != "agent-secret" {
|
||||
return nil, errors.New("bad agent secret")
|
||||
}
|
||||
if f.Goose != nil {
|
||||
return f.Goose.Conn(), nil
|
||||
}
|
||||
return newEcho(), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user