mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 15:37:50 -08:00
analyzer_test: Adding seams for testability
Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
@@ -122,7 +122,7 @@ func TestExtractFiles(t *testing.T) {
|
||||
file string // Test input file
|
||||
filenames []string // Target files
|
||||
FileMap extractor.FileMap // Expected output
|
||||
opqDirs opqDirs // Expected output
|
||||
opqDirs OPQDirs // Expected output
|
||||
err error // Expected error to occur
|
||||
}{
|
||||
{
|
||||
@@ -167,7 +167,7 @@ func TestExtractFiles(t *testing.T) {
|
||||
t.Errorf("err: got %v, want %v", v.err, err)
|
||||
}
|
||||
if !reflect.DeepEqual(opqDirs, v.opqDirs) {
|
||||
t.Errorf("opqDirs: got %v, want %v", opqDirs, v.opqDirs)
|
||||
t.Errorf("OPQDirs: got %v, want %v", opqDirs, v.opqDirs)
|
||||
}
|
||||
if !reflect.DeepEqual(fm, v.FileMap) {
|
||||
t.Errorf("FilesMap: got %v, want %v", fm, v.FileMap)
|
||||
|
||||
Reference in New Issue
Block a user