@@ -49,7 +49,7 @@ func (m mockOSAnalyzer) Analyze(extractor.FileMap) (OS, error) {
49
49
}
50
50
51
51
func (m mockOSAnalyzer ) RequiredFiles () []string {
52
- return []string {"file1" , "file2" , "file3" }
52
+ return []string {"file1" , "file2" }
53
53
}
54
54
55
55
func TestAnalyze (t * testing.T ) {
@@ -64,17 +64,15 @@ func TestAnalyze(t *testing.T) {
64
64
{
65
65
name : "happy path with docker installed and image found" ,
66
66
extractFromFileFunc : func (ctx context.Context , r io.Reader , filenames []string ) (maps extractor.FileMap , e error ) {
67
- assert .Equal (t , []string {"file1" , "file2" , "file3" }, filenames )
67
+ assert .Equal (t , []string {"file1" , "file2" }, filenames )
68
68
return extractor.FileMap {
69
69
"file1" : []byte {0x1 , 0x2 , 0x3 },
70
- "file2" : []byte {0x1 , 0x2 , 0x3 },
71
- "file3" : []byte {0x1 , 0x2 , 0x3 },
70
+ "file2" : []byte {0x4 , 0x5 , 0x6 },
72
71
}, nil
73
72
},
74
73
expectedFileMap : extractor.FileMap {
75
74
"file1" : []byte {0x1 , 0x2 , 0x3 },
76
- "file2" : []byte {0x1 , 0x2 , 0x3 },
77
- "file3" : []byte {0x1 , 0x2 , 0x3 },
75
+ "file2" : []byte {0x4 , 0x5 , 0x6 },
78
76
},
79
77
},
80
78
{
@@ -84,17 +82,15 @@ func TestAnalyze(t *testing.T) {
84
82
},
85
83
extractFunc : func (ctx context.Context , imageName string , filenames []string ) (maps extractor.FileMap , e error ) {
86
84
assert .Equal (t , "fooimage" , imageName )
87
- assert .Equal (t , []string {"file1" , "file2" , "file3" }, filenames )
85
+ assert .Equal (t , []string {"file1" , "file2" }, filenames )
88
86
return extractor.FileMap {
89
87
"file1" : []byte {0x1 , 0x2 , 0x3 },
90
- "file2" : []byte {0x1 , 0x2 , 0x3 },
91
- "file3" : []byte {0x1 , 0x2 , 0x3 },
88
+ "file2" : []byte {0x4 , 0x5 , 0x6 },
92
89
}, nil
93
90
},
94
91
expectedFileMap : extractor.FileMap {
95
92
"file1" : []byte {0x1 , 0x2 , 0x3 },
96
- "file2" : []byte {0x1 , 0x2 , 0x3 },
97
- "file3" : []byte {0x1 , 0x2 , 0x3 },
93
+ "file2" : []byte {0x4 , 0x5 , 0x6 },
98
94
},
99
95
},
100
96
}
0 commit comments