mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 09:00:27 +00:00
f02e24437a
test cases migration to testify is now complete. Linters are enabled for test cases too
17 lines
328 B
Go
17 lines
328 B
Go
// +build !windows
|
|
|
|
package sftpd
|
|
|
|
import (
|
|
"os/exec"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestWrapCmd(t *testing.T) {
|
|
cmd := exec.Command("ls")
|
|
cmd = wrapCmd(cmd, 1000, 1001)
|
|
assert.Equal(t, uint32(1000), cmd.SysProcAttr.Credential.Uid)
|
|
assert.Equal(t, uint32(1001), cmd.SysProcAttr.Credential.Gid)
|
|
}
|