- 修复资产新增、修改无权限的缺陷 fixed #314 - 修复执行动态指令时多行失败且无法自动执行的问题 fixed #313 #310 - 修复计划任务无法选择资产的问题 fixed #312 - 修复导入导出备份无效的问题 fixed #303 - 增加「资产详情」「资产授权」「用户详情」「用户授权」「用户组详情」「用户组授权」「角色详情」「授权策略详情」按钮 - 修复资产列表使用IP搜索无效的问题 - 资产列表增加最近接入时间排序、增加修改每页数量 fixed #311 - 修复登录页面双因素认证输入框无法自动获取焦点的问题 fixed #311 - 增加普通页面资产列表最后接入时间排序 fixed #311 - 计划任务增加执行本机系统命令
23 lines
364 B
Go
23 lines
364 B
Go
package utils
|
|
|
|
import "testing"
|
|
|
|
func TestExec(t *testing.T) {
|
|
commands := []string{
|
|
`pwd`,
|
|
`whoami`,
|
|
`cat /etc/resolv.conf`,
|
|
`echo "test" > /tmp/ddtest`,
|
|
`rm -rf /tmp/ddtest`,
|
|
}
|
|
for _, command := range commands {
|
|
output, errout, err := Exec(command)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log("output:", output)
|
|
t.Log("errout:", errout)
|
|
}
|
|
|
|
}
|