remove unecessary get/pug config in tests; those are being referenced

This commit is contained in:
Adrien Delorme 2018-08-30 12:07:37 +02:00
parent 94d5bb7a3b
commit 157691c710
1 changed files with 0 additions and 4 deletions

View File

@ -19,7 +19,6 @@ func TestStepCreateSSHKey_privateKey(t *testing.T) {
step := new(StepCreateSSHKey) step := new(StepCreateSSHKey)
cfg := state.Get("config").(*Config) cfg := state.Get("config").(*Config)
cfg.Comm.SSHPrivateKeyFile = "test-fixtures/fake-key" cfg.Comm.SSHPrivateKeyFile = "test-fixtures/fake-key"
state.Put("config", cfg)
defer step.Cleanup(state) defer step.Cleanup(state)
// run the step // run the step
@ -28,7 +27,6 @@ func TestStepCreateSSHKey_privateKey(t *testing.T) {
} }
// Verify that we have a public/private key // Verify that we have a public/private key
cfg = state.Get("config").(*Config)
if len(cfg.Comm.SSHPrivateKey) == 0 { if len(cfg.Comm.SSHPrivateKey) == 0 {
t.Fatal("should have key") t.Fatal("should have key")
} }
@ -46,7 +44,6 @@ func TestStepCreateSSHKey(t *testing.T) {
} }
// Verify that we have a public/private key // Verify that we have a public/private key
cfg = state.Get("config").(*Config)
if len(cfg.Comm.SSHPrivateKey) == 0 { if len(cfg.Comm.SSHPrivateKey) == 0 {
t.Fatal("should have key") t.Fatal("should have key")
} }
@ -77,7 +74,6 @@ func TestStepCreateSSHKey_debug(t *testing.T) {
} }
// Verify that we have a public/private key // Verify that we have a public/private key
cfg = state.Get("config").(*Config)
if len(cfg.Comm.SSHPrivateKey) == 0 { if len(cfg.Comm.SSHPrivateKey) == 0 {
t.Fatal("should have key") t.Fatal("should have key")
} }