Skip to content

Commit

Permalink
chore: add unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Oct 3, 2023
1 parent 6558f94 commit 272fabb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pkg/data/data_test.go
Original file line number Diff line number Diff line change
@@ -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())
}
}

0 comments on commit 272fabb

Please sign in to comment.