Skip to content

Commit

Permalink
test: sort packages
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed May 6, 2024
1 parent 93c9c5a commit 725e4fd
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 110 deletions.
214 changes: 107 additions & 107 deletions pkg/fanal/artifact/image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,113 @@ func TestArtifact_Inspect(t *testing.T) {
Type: "bundler",
FilePath: "ruby-app/Gemfile.lock",
Packages: types.Packages{
{
ID: "[email protected]",
Name: "dotenv",
Version: "2.7.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string(nil),
Locations: []types.Location{
{
StartLine: 51,
EndLine: 51,
},
},
},
{
ID: "[email protected]",
Name: "faker",
Version: "1.9.3",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{"[email protected]"},
Locations: []types.Location{
{
StartLine: 53,
EndLine: 53,
},
},
},
{
ID: "[email protected]",
Name: "json",
Version: "2.2.0",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string(nil),
Locations: []types.Location{
{
StartLine: 60,
EndLine: 60,
},
},
},
{
ID: "[email protected]",
Name: "pry",
Version: "0.12.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 79,
EndLine: 79,
},
},
},
{
ID: "[email protected]",
Name: "rails",
Version: "5.2.0",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 86,
EndLine: 86,
},
},
},
{
ID: "[email protected]",
Name: "rubocop",
Version: "0.67.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 112,
EndLine: 112,
},
},
},
{
ID: "[email protected]",
Name: "actioncable",
Expand Down Expand Up @@ -1158,20 +1265,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "dotenv",
Version: "2.7.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string(nil),
Locations: []types.Location{
{
StartLine: 51,
EndLine: 51,
},
},
},
{
ID: "[email protected]",
Name: "erubi",
Expand All @@ -1186,20 +1279,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "faker",
Version: "1.9.3",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{"[email protected]"},
Locations: []types.Location{
{
StartLine: 53,
EndLine: 53,
},
},
},
{
ID: "[email protected]",
Name: "globalid",
Expand Down Expand Up @@ -1242,20 +1321,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "json",
Version: "2.2.0",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string(nil),
Locations: []types.Location{
{
StartLine: 60,
EndLine: 60,
},
},
},
{
ID: "[email protected]",
Name: "loofah",
Expand Down Expand Up @@ -1427,23 +1492,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "pry",
Version: "0.12.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 79,
EndLine: 79,
},
},
},
{
ID: "[email protected]",
Name: "psych",
Expand Down Expand Up @@ -1486,32 +1534,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "rails",
Version: "5.2.0",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 86,
EndLine: 86,
},
},
},
{
ID: "[email protected]",
Name: "rails-dom-testing",
Expand Down Expand Up @@ -1591,28 +1613,6 @@ func TestArtifact_Inspect(t *testing.T) {
},
},
},
{
ID: "[email protected]",
Name: "rubocop",
Version: "0.67.2",
Indirect: false,
Relationship: types.RelationshipDirect,
DependsOn: []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
},
Locations: []types.Location{
{
StartLine: 112,
EndLine: 112,
},
},
},
{
ID: "[email protected]",
Name: "ruby-progressbar",
Expand Down
6 changes: 3 additions & 3 deletions pkg/fanal/artifact/image/remote_sbom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func TestArtifact_inspectOCIReferrerSBOM(t *testing.T) {
putBlobExpectations: []cache.ArtifactCachePutBlobExpectation{
{
Args: cache.ArtifactCachePutBlobArgs{
BlobID: "sha256:7e0b5476a5ff5a10594ad1ed7566220fcc43ecff29b831236cb2e98e574a1d05",
BlobID: "sha256:a06ed679a3289fba254040e1ce8f3467fadcc454ee3d0d4720f6978065f56684",
BlobInfo: types.BlobInfo{
SchemaVersion: types.BlobJSONSchemaVersion,
Applications: []types.Application{
Expand Down Expand Up @@ -268,9 +268,9 @@ func TestArtifact_inspectOCIReferrerSBOM(t *testing.T) {
want: types.ArtifactReference{
Name: registry + "/test/image:10",
Type: types.ArtifactCycloneDX,
ID: "sha256:7e0b5476a5ff5a10594ad1ed7566220fcc43ecff29b831236cb2e98e574a1d05",
ID: "sha256:a06ed679a3289fba254040e1ce8f3467fadcc454ee3d0d4720f6978065f56684",
BlobIDs: []string{
"sha256:7e0b5476a5ff5a10594ad1ed7566220fcc43ecff29b831236cb2e98e574a1d05",
"sha256:a06ed679a3289fba254040e1ce8f3467fadcc454ee3d0d4720f6978065f56684",
},
},
},
Expand Down

0 comments on commit 725e4fd

Please sign in to comment.