mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
Pr 1825 (#1865)
chore: code cleanup Signed-off-by: guoguangwu <guoguangwu@magic-shield.com> --------- Signed-off-by: guoguangwu <guoguangwu@magic-shield.com> Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Co-authored-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
co-authored by
guoguangwu
parent
d676e5e781
commit
f07581f504
@@ -44,9 +44,7 @@ func TestValidCycloneDX(t *testing.T) {
|
||||
args := []string{
|
||||
test.subcommand, fixtureRef, "-q",
|
||||
}
|
||||
for _, a := range test.args {
|
||||
args = append(args, a)
|
||||
}
|
||||
args = append(args, test.args...)
|
||||
|
||||
cmd, stdout, stderr := runSyft(t, nil, args...)
|
||||
for _, traitFn := range test.assertions {
|
||||
|
||||
@@ -57,9 +57,7 @@ func TestJSONSchema(t *testing.T) {
|
||||
args := []string{
|
||||
test.subcommand, fixtureRef, "-q",
|
||||
}
|
||||
for _, a := range test.args {
|
||||
args = append(args, a)
|
||||
}
|
||||
args = append(args, test.args...)
|
||||
|
||||
_, stdout, stderr := runSyft(t, nil, args...)
|
||||
|
||||
|
||||
@@ -50,9 +50,7 @@ func TestSPDXJSONSchema(t *testing.T) {
|
||||
args := []string{
|
||||
test.subcommand, fixtureRef, "-q",
|
||||
}
|
||||
for _, a := range test.args {
|
||||
args = append(args, a)
|
||||
}
|
||||
args = append(args, test.args...)
|
||||
|
||||
_, stdout, _ := runSyft(t, nil, args...)
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package integration
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
@@ -64,7 +63,7 @@ func TestEncodeDecodeEncodeCycleComparison(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(fmt.Sprintf("%s", test.formatOption), func(t *testing.T) {
|
||||
t.Run(string(test.formatOption), func(t *testing.T) {
|
||||
for _, image := range images {
|
||||
originalSBOM, _ := catalogFixtureImage(t, image, source.SquashedScope, nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user