sftpgo-mirror/sftpd/internal_unix_test.go
Nicola Murino f02e24437a add more linters
test cases migration to testify is now complete.
Linters are enabled for test cases too
2020-05-06 19:36:34 +02:00

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)
}