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
Charles-Edouard Brétéché 34c1615090
chore: add cli unit tests (#8365)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-12 19:46:04 +00:00

23 lines
430 B
Go

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