fmt
This commit is contained in:
parent
020e719e92
commit
2fff555e7f
|
@ -25,7 +25,7 @@ import (
|
||||||
// communicator packer.Communicator
|
// communicator packer.Communicator
|
||||||
type stepWaitForSSH struct {
|
type stepWaitForSSH struct {
|
||||||
cancel bool
|
cancel bool
|
||||||
comm packer.Communicator
|
comm packer.Communicator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *stepWaitForSSH) Run(state map[string]interface{}) multistep.StepAction {
|
func (s *stepWaitForSSH) Run(state map[string]interface{}) multistep.StepAction {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
type comm struct {
|
type comm struct {
|
||||||
client *ssh.ClientConn
|
client *ssh.ClientConn
|
||||||
config *Config
|
config *Config
|
||||||
conn net.Conn
|
conn net.Conn
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config is the structure used to configure the SSH communicator.
|
// Config is the structure used to configure the SSH communicator.
|
||||||
|
|
|
@ -125,7 +125,7 @@ func TestNew_Invalid(t *testing.T) {
|
||||||
|
|
||||||
config := &Config{
|
config := &Config{
|
||||||
Connection: conn,
|
Connection: conn,
|
||||||
SSHConfig: clientConfig,
|
SSHConfig: clientConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := New(config)
|
_, err := New(config)
|
||||||
|
@ -152,7 +152,7 @@ func TestStart(t *testing.T) {
|
||||||
|
|
||||||
config := &Config{
|
config := &Config{
|
||||||
Connection: conn,
|
Connection: conn,
|
||||||
SSHConfig: clientConfig,
|
SSHConfig: clientConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
client, err := New(config)
|
client, err := New(config)
|
||||||
|
|
|
@ -12,6 +12,6 @@ import (
|
||||||
func ConnectFunc(network, addr string) func() (net.Conn, error) {
|
func ConnectFunc(network, addr string) func() (net.Conn, error) {
|
||||||
return func() (net.Conn, error) {
|
return func() (net.Conn, error) {
|
||||||
log.Printf("Opening conn for SSH to %s %s", network, addr)
|
log.Printf("Opening conn for SSH to %s %s", network, addr)
|
||||||
return net.DialTimeout(network, addr, 15 * time.Second)
|
return net.DialTimeout(network, addr, 15*time.Second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue