mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
* Update Insight service API and client * Add cli banner * Show API errors from insight API * Use standard error model * Add reporting interface * Update markdown template * Add trials registration client * Add trials registration support * Add supported ecosystem filter to parsers * Update OSV scanner * Use table renderer for CEL filter output * Rename filter opt to filter * Add an opinionated console summary reporter * Update README * Update README * Update README * Add filter spec * Update spec driven CEL filtering * Add query workflow with docs * Add secrets scan workflow
27 lines
486 B
Go
27 lines
486 B
Go
package parser
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestListParser(t *testing.T) {
|
|
parsers := List()
|
|
assert.Equal(t, 9, len(parsers))
|
|
}
|
|
|
|
func TestInvalidEcosystemMapping(t *testing.T) {
|
|
pw := &parserWrapper{parseAs: "nothing"}
|
|
assert.Empty(t, pw.Ecosystem())
|
|
}
|
|
|
|
func TestEcosystemMapping(t *testing.T) {
|
|
for _, lf := range List() {
|
|
t.Run(lf, func(t *testing.T) {
|
|
pw := &parserWrapper{parseAs: lf}
|
|
assert.NotEmpty(t, pw.Ecosystem())
|
|
})
|
|
}
|
|
}
|