1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 17:37:12 +00:00
kyverno/cmd/cli/kubectl-kyverno/commands/command_test.go

24 lines
430 B
Go
Raw Normal View History

package commands
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestRootCommand(t *testing.T) {
cmd := RootCommand(false)
assert.NotNil(t, cmd)
assert.Len(t, cmd.Commands(), 6)
err := cmd.Execute()
assert.NoError(t, err)
}
func TestRootCommandExperimental(t *testing.T) {
cmd := RootCommand(true)
assert.NotNil(t, cmd)
assert.Len(t, cmd.Commands(), 8)
err := cmd.Execute()
assert.NoError(t, err)
}