Update failing tests
This commit is contained in:
parent
ac724e2800
commit
f094969c7b
|
@ -21,7 +21,7 @@ func TestHostFingerprint(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Host info
|
// Host info
|
||||||
for _, key := range []string{"os.name", "os.version", "hostname", "kernel.name"} {
|
for _, key := range []string{"os.name", "os.version", "unique.hostname", "kernel.name"} {
|
||||||
assertNodeAttributeContains(t, node, key)
|
assertNodeAttributeContains(t, node, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ func TestRunCommand_Fails(t *testing.T) {
|
||||||
if code := cmd.Run([]string{"/unicorns/leprechauns"}); code != 1 {
|
if code := cmd.Run([]string{"/unicorns/leprechauns"}); code != 1 {
|
||||||
t.Fatalf("expect exit 1, got: %d", code)
|
t.Fatalf("expect exit 1, got: %d", code)
|
||||||
}
|
}
|
||||||
if out := ui.ErrorWriter.String(); !strings.Contains(out, "Error parsing") {
|
if out := ui.ErrorWriter.String(); !strings.Contains(out, "Error opening") {
|
||||||
t.Fatalf("expect parsing error, got: %s", out)
|
t.Fatalf("expect parsing error, got: %s", out)
|
||||||
}
|
}
|
||||||
ui.ErrorWriter.Reset()
|
ui.ErrorWriter.Reset()
|
||||||
|
@ -181,7 +181,12 @@ job "job1" {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
args := []string{"-"}
|
args := []string{"-"}
|
||||||
if code := cmd.Run(args); code != 0 {
|
if code := cmd.Run(args); code != 1 {
|
||||||
t.Fatalf("expected exit code 0, got %d: %q", code, ui.ErrorWriter.String())
|
t.Fatalf("expected exit code 1, got %d: %q", code, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if out := ui.ErrorWriter.String(); !strings.Contains(out, "connection refused") {
|
||||||
|
t.Fatalf("expected runtime error, got: %s", out)
|
||||||
|
}
|
||||||
|
ui.ErrorWriter.Reset()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue