mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
20 lines
327 B
Go
20 lines
327 B
Go
package cli
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestInstallCmd(t *testing.T) {
|
|
t.Run("root", func(t *testing.T) {
|
|
cmd := installCmd("root")
|
|
assert.NotContains(t, cmd, "sudo")
|
|
})
|
|
|
|
t.Run("nonroot", func(t *testing.T) {
|
|
cmd := installCmd("nonroot")
|
|
assert.Contains(t, cmd, "sudo")
|
|
})
|
|
}
|