未验证 提交 e2d42908 编写于 作者: M Medya Gh

functional test

上级 2cf49def
......@@ -837,7 +837,17 @@ func validateSSHCmd(ctx context.Context, t *testing.T, profile string) {
t.Skipf("skipping: ssh unsupported by none")
}
want := "hello\n"
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")))
var rr *RunResult
var err error
if runtime.GOOS == "windows" { // golang exec powershell needs some tricks !
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")), true)
} else {
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("echo hello")))
}
if ctx.Err() == context.DeadlineExceeded {
t.Logf("failed to run command by deadline. exceeded timeout : %s", rr.Command())
}
if err != nil {
t.Errorf("failed to run an ssh command. args %q : %v", rr.Command(), err)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册