Fix output-related tests (#4288)

* Fix command tests

* More test fixes

* Use backticks to escape quoted strings

* More test fixes

* Fix mismatched error output failures

* Fix mismatched error output failures
This commit is contained in:
Calvin Leung Huang
2018-04-05 20:43:29 -04:00
committed by GitHub
parent 2859c20cb5
commit b9ff16a4d1
10 changed files with 27 additions and 27 deletions

View File

@@ -73,7 +73,7 @@ func TestParseSSHHelperConfig_missingVaultAddr(t *testing.T) {
t.Fatal("expected error")
}
if !strings.Contains(err.Error(), "ssh_helper: missing config 'vault_addr'") {
if !strings.Contains(err.Error(), `missing config "vault_addr"`) {
t.Errorf("bad error: %s", err)
}
}
@@ -87,7 +87,7 @@ nope = "bad"
t.Fatal("expected error")
}
if !strings.Contains(err.Error(), "ssh_helper: invalid key 'nope' on line 3") {
if !strings.Contains(err.Error(), `ssh_helper: invalid key "nope" on line 3`) {
t.Errorf("bad error: %s", err)
}
}