1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/cmd/cli/kubectl-kyverno/commands/version/command_test.go
Charles-Edouard Brétéché 67cfa341a5
chore: improve cli version command and add tests (#8336)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-11 20:36:35 +00:00

20 lines
315 B
Go

package version
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCommand(t *testing.T) {
cmd := Command()
err := cmd.Execute()
assert.NoError(t, err)
}
func TestCommandWithArgs(t *testing.T) {
cmd := Command()
cmd.SetArgs([]string{"test"})
err := cmd.Execute()
assert.Error(t, err)
}