mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
24 lines
430 B
Go
24 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)
|
||
|
}
|