mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 01:16:55 +00:00
23 lines
359 B
Go
23 lines
359 B
Go
|
package create
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestCommand(t *testing.T) {
|
||
|
cmd := Command()
|
||
|
assert.NotNil(t, cmd)
|
||
|
err := cmd.Execute()
|
||
|
assert.NoError(t, err)
|
||
|
}
|
||
|
|
||
|
func TestCommandWithArgs(t *testing.T) {
|
||
|
cmd := Command()
|
||
|
assert.NotNil(t, cmd)
|
||
|
cmd.SetArgs([]string{"foo"})
|
||
|
err := cmd.Execute()
|
||
|
assert.Error(t, err)
|
||
|
}
|