@@ -162,7 +162,7 @@ func TestParseAndValidateVersion_UnparseableOutput(t *testing.T) {
162162 }
163163}
164164
165- func TestValidateSBOM_Success (t * testing.T ) {
165+ func TestExtractMetadata_Success (t * testing.T ) {
166166 tests := []struct {
167167 name string
168168 sbom string
@@ -249,7 +249,7 @@ func TestValidateSBOM_Success(t *testing.T) {
249249
250250 for _ , tt := range tests {
251251 t .Run (tt .name , func (t * testing.T ) {
252- metadata , err := validateSBOM ([]byte (tt .sbom ))
252+ metadata , err := extractMetadata ([]byte (tt .sbom ))
253253 assert .NoError (t , err )
254254 require .NotNil (t , metadata )
255255 assert .Equal (t , "pip" , metadata .PackageManager )
@@ -259,7 +259,7 @@ func TestValidateSBOM_Success(t *testing.T) {
259259 }
260260}
261261
262- func TestValidateSBOM_MissingComponent (t * testing.T ) {
262+ func TestExtractMetadata_MissingComponent (t * testing.T ) {
263263 tests := []struct {
264264 name string
265265 sbom string
@@ -302,7 +302,7 @@ func TestValidateSBOM_MissingComponent(t *testing.T) {
302302
303303 for _ , tt := range tests {
304304 t .Run (tt .name , func (t * testing.T ) {
305- metadata , err := validateSBOM ([]byte (tt .sbom ))
305+ metadata , err := extractMetadata ([]byte (tt .sbom ))
306306 assert .Nil (t , metadata )
307307 require .Error (t , err )
308308 var catalogErr snyk_errors.Error
@@ -312,8 +312,8 @@ func TestValidateSBOM_MissingComponent(t *testing.T) {
312312 }
313313}
314314
315- func TestValidateSBOM_InvalidJSON (t * testing.T ) {
316- metadata , err := validateSBOM ([]byte ("invalid json" ))
315+ func TestExtractMetadata_InvalidJSON (t * testing.T ) {
316+ metadata , err := extractMetadata ([]byte ("invalid json" ))
317317 assert .Nil (t , metadata )
318318 require .Error (t , err )
319319 var catalogErr snyk_errors.Error
0 commit comments