go.crypto/ssh: fix test breakage
Followup CL for 9711043. The order that CombinedOutput returns data captured from stdout/stderr is not specified, so we have to test both variants. Thanks to fullung for the bug report. R=fullung, kr CC=golang-dev https://golang.org/cl/9921044
This commit is contained in:
+4
-3
@@ -177,11 +177,12 @@ func TestSessionCombinedOutput(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Remote command did not exit cleanly:", err)
|
||||
}
|
||||
w := "this-is-stdout.this-is-stderr."
|
||||
const stdout = "this-is-stdout."
|
||||
const stderr = "this-is-stderr."
|
||||
g := string(buf)
|
||||
if g != w {
|
||||
if g != stdout+stderr && g != stderr+stdout {
|
||||
t.Error("Remote command did not return expected string:")
|
||||
t.Logf("want %q", w)
|
||||
t.Logf("want %q, or %q", stdout+stderr, stderr+stdout)
|
||||
t.Logf("got %q", g)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user