fix: merging of binary packages (#1583)

This commit is contained in:
Keith Zantow
2023-02-22 12:03:15 -05:00
committed by GitHub
parent 8f6a317fef
commit f5e20521e0
23 changed files with 1867 additions and 190 deletions
+1
View File
@@ -213,5 +213,6 @@ func TestEncodeFullJSONDocument(t *testing.T) {
s,
*updateJson,
true,
schemaVersionRedactor,
)
}
+2 -1
View File
@@ -1,6 +1,7 @@
package syftjson
import (
"github.com/anchore/syft/internal"
"github.com/anchore/syft/syft/sbom"
)
@@ -8,7 +9,7 @@ const ID sbom.FormatID = "syft-json"
func Format() sbom.Format {
return sbom.NewFormat(
"6",
internal.JSONSchemaVersion,
encoder,
decoder,
validator,
@@ -1,7 +1,6 @@
package syftjson
import (
"strings"
"testing"
"github.com/scylladb/go-set/strset"
@@ -9,16 +8,10 @@ import (
"github.com/stretchr/testify/require"
"github.com/anchore/stereoscope/pkg/file"
"github.com/anchore/syft/internal"
"github.com/anchore/syft/syft/formats/syftjson/model"
"github.com/anchore/syft/syft/source"
)
func Test_SyftJsonID_Compatibility(t *testing.T) {
jsonMajorVersion := strings.Split(internal.JSONSchemaVersion, ".")[0]
assert.Equal(t, jsonMajorVersion, string(Format().Version()))
}
func Test_toSourceModel(t *testing.T) {
allSchemes := strset.New()
for _, s := range source.AllSchemes {