diff --git a/pkg/data/data_test.go b/pkg/data/data_test.go new file mode 100644 index 00000000..c42c3c12 --- /dev/null +++ b/pkg/data/data_test.go @@ -0,0 +1,24 @@ +package data + +import ( + "io/fs" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCrds(t *testing.T) { + data := Crds() + { + file, err := fs.Stat(data, "crds/json.kyverno.io_policies.yaml") + assert.NoError(t, err) + assert.NotNil(t, file) + assert.False(t, file.IsDir()) + } + { + file, err := fs.Stat(data, "crds") + assert.NoError(t, err) + assert.NotNil(t, file) + assert.True(t, file.IsDir()) + } +}