aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/exec_test.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/exec_test.go b/test/exec_test.go
index f4d1ac4..39f00c6 100644
--- a/test/exec_test.go
+++ b/test/exec_test.go
@@ -89,13 +89,23 @@ func TestExec(t *testing.T) {
sCli.Conn.On(xsapiv1.ExecOutEvent, func(ev xsapiv1.ExecOutMsg) {
cmdOut += ev.Stdout + ev.Stderr
})
-
- /*basic check: verify that environment is set correctly (use the right sdk)*/
+ /*error when exec with fakeid*/
var execRes xsapiv1.ExecArgs
cmd := "pwd && echo \"SDKTARGETSYSROOT=<$SDKTARGETSYSROOT>\""
exec := xsapiv1.ExecArgs{
ID: cfg.ID,
Cmd: cmd,
+ SdkID: "11111-invalid",
+ }
+ Debugf(t, "exec cmake cmd(%v)", cmd)
+ cmdOut = ""
+ assert.NotNil(t, HTTPCli.Post("/exec", exec, &execRes))
+
+ /*basic check: verify that environment is set correctly (use the right sdk)*/
+ cmd = "pwd && echo \"SDKTARGETSYSROOT=<$SDKTARGETSYSROOT>\""
+ exec = xsapiv1.ExecArgs{
+ ID: cfg.ID,
+ Cmd: cmd,
SdkID: sdkRes.ID,
}
Debugf(t, "exec cmake cmd(%v)", cmd)