@@ -258,7 +258,7 @@ func TestApplyLayers(t *testing.T) {
258258 },
259259 },
260260 {
261- name : "happy path with duplicate of debian packages" ,
261+ name : "happy path with duplicate packages" ,
262262 inputLayers : []types.BlobInfo {
263263 {
264264 SchemaVersion : 2 ,
@@ -276,6 +276,36 @@ func TestApplyLayers(t *testing.T) {
276276 },
277277 },
278278 },
279+ {
280+ FilePath : "foo/socat-1.7.3.2-2.el7.x86_64.rpm" ,
281+ Packages : types.Packages {
282+ {
283+ Name : "socat" ,
284+ Version : "1.7.3.2" ,
285+ Release : "2.el7" ,
286+ Arch : "x86_64" ,
287+ SrcName : "socat" ,
288+ SrcVersion : "1.7.3.2" ,
289+ SrcRelease : "2.el7" ,
290+ FilePath : "foo/socat-1.7.3.2-2.el7.x86_64.rpm" ,
291+ },
292+ },
293+ },
294+ {
295+ FilePath : "bar/socat-1.7.3.2-2.el7.x86_64.rpm" ,
296+ Packages : types.Packages {
297+ {
298+ Name : "socat" ,
299+ Version : "1.7.3.2" ,
300+ Release : "2.el7" ,
301+ Arch : "x86_64" ,
302+ SrcName : "socat" ,
303+ SrcVersion : "1.7.3.2" ,
304+ SrcRelease : "2.el7" ,
305+ FilePath : "bar/socat-1.7.3.2-2.el7.x86_64.rpm" ,
306+ },
307+ },
308+ },
279309 },
280310 },
281311 {
@@ -311,6 +341,38 @@ func TestApplyLayers(t *testing.T) {
311341 DiffID : "sha256:96e320b34b5478d8b369ca43ffaa88ff6dd9499ec72b792ca21b1e8b0c55670f" ,
312342 },
313343 },
344+ {
345+ Name : "socat" ,
346+ Version : "1.7.3.2" ,
347+ Release : "2.el7" ,
348+ Arch : "x86_64" ,
349+ SrcName : "socat" ,
350+ SrcVersion : "1.7.3.2" ,
351+ SrcRelease : "2.el7" ,
352+ FilePath : "bar/socat-1.7.3.2-2.el7.x86_64.rpm" ,
353+ Layer : types.Layer {
354+ DiffID : "sha256:96e320b34b5478d8b369ca43ffaa88ff6dd9499ec72b792ca21b1e8b0c55670f" ,
355+ },
356+ Identifier : types.PkgIdentifier {
357+ UID : "bfb68335f6284b36" ,
358+ },
359+ },
360+ {
361+ Name : "socat" ,
362+ Version : "1.7.3.2" ,
363+ Release : "2.el7" ,
364+ Arch : "x86_64" ,
365+ SrcName : "socat" ,
366+ SrcVersion : "1.7.3.2" ,
367+ SrcRelease : "2.el7" ,
368+ FilePath : "foo/socat-1.7.3.2-2.el7.x86_64.rpm" ,
369+ Layer : types.Layer {
370+ DiffID : "sha256:96e320b34b5478d8b369ca43ffaa88ff6dd9499ec72b792ca21b1e8b0c55670f" ,
371+ },
372+ Identifier : types.PkgIdentifier {
373+ UID : "4d8db4fac0caf460" ,
374+ },
375+ },
314376 },
315377 },
316378 },
0 commit comments