fix(purl): skip unsupported library type (#4577)

This commit is contained in:
Nikita Pivkin
2023-06-08 08:45:32 +03:00
committed by GitHub
parent 52cbe79759
commit c20d466044
3 changed files with 11 additions and 17 deletions

View File

@@ -164,8 +164,8 @@ func TestDriver_Detect(t *testing.T) {
_ = dbtest.InitDB(t, tt.fixtures)
defer db.Close()
driver, err := library.NewDriver(tt.libType)
require.NoError(t, err)
driver, ok := library.NewDriver(tt.libType)
require.True(t, ok)
got, err := driver.DetectVulnerabilities("", tt.args.pkgName, tt.args.pkgVer)
if tt.wantErr != "" {