diff --git a/communicator/ssh/communicator_test.go b/communicator/ssh/communicator_test.go index c5b8832dd..aa241cca8 100644 --- a/communicator/ssh/communicator_test.go +++ b/communicator/ssh/communicator_test.go @@ -83,10 +83,10 @@ func newMockLineServer(t *testing.T) string { } t.Log("Accepted channel") - go func() { + go func(channelType string) { defer channel.Close() - conn.OpenChannel(newChannel.ChannelType(), nil) - }() + conn.OpenChannel(channelType, nil) + }(newChannel.ChannelType()) } conn.Close() }()