This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/openwrt/executor_test.go
Philippe Caseiro b680e256b9 Updating executor to remove old util.go
Adding new Network interaction "class"
2018-09-21 13:42:43 +02:00

19 lines
455 B
Go

package openwrt
import (
"testing"
)
func TestRun(t *testing.T) {
exec := &localExecutor{}
res := exec.Run("uname", "-a")
if g, e := res.ReturnCode, 0; g != e {
t.Errorf("Run command failed ! Got bad return code [%d], [%d} is expected\n", g, e)
}
// res = exec.Run("noCommandWithThisNameExists", "-a")
// if g, e := res.ReturnCode, 127; g != e {
// t.Errorf("Run command failed ! Got bad return code [%d], [%d} is expected\n", g, e)
// }
}